# Beta - LXD image for Nextcloud 11

**URL:** <https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Created:** [March 29, 2017, 8:18am UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782 "2017-03-29T08:18:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![JasonBayton](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jasonbayton/32/297_2.png) [@JasonBayton](https://help.nextcloud.com/u/JasonBayton)\
**Post date:** [March 29, 2017, 8:18am UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/1 "2017-03-29T08:18:23Z")

</div>

Hi folks,

I’ve just published a beta of my first Nextcloud 11-preinstalled LXD container.

Here’s how it’s configured:

- HTTP (Let’s Encrypt certbot is present, but hasn’t been run)
- Redis, APCu caching enabled
- Pretty links enabled
- Data directory one level up from Nextcloud (and therefore webroot)
- Getting started file is situated in `/media/nc/start.md` containing default passwords to be changed and some instructions.

The reason it’s a beta is two-fold:

1. I’ve tested deployment to 3 LXD hosts, each with their own IP ranges configured and it deploys fine, but it needs more testing.
2. I can’t script in bash at the moment, so passwords have to be manually changed until I find a solution (or someone helps :))

To deploy the container on your host, add my public image server to your environment:

`lxc remote add nextcloud demo.nextcloud.bayton.org --public`

(Where nextcloud is the name you give the remote server)

Then launch:

`lxc launch nextcloud:nextcloud11 myNCcontainer`

(Where myNCcontainer is the name you give the local container)

Give it a try, let me know what you think. If you can work with me to provide scripts to add more user interaction and not have to ship a pre-installed NC version that’d be great 🙂

---

<div class="post-metadata">

**Author:** ![bmullan](https://help.nextcloud.com/letter_avatar/bmullan/32/6_22734026db12803ebb3e059622ac3534.png) [@bmullan](https://help.nextcloud.com/u/bmullan)\
**Post date:** [April 2, 2017, 10:46pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/2 "2017-04-02T22:46:40Z")

</div>

Jason

When you say “I can’t script in bash at the moment, so passwords have to be manually changed” … what passwords are you referring to?

brian

---

<div class="post-metadata">

**Author:** ![JasonBayton](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jasonbayton/32/297_2.png) [@JasonBayton](https://help.nextcloud.com/u/JasonBayton)\
**Post date:** [April 3, 2017, 6:23am UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/3 "2017-04-03T06:23:53Z")

</div>

Database and Nextcloud, passwords for these are located on the getting started doc in the image.

---

<div class="post-metadata">

**Author:** ![bmullan](https://help.nextcloud.com/letter_avatar/bmullan/32/6_22734026db12803ebb3e059622ac3534.png) [@bmullan](https://help.nextcloud.com/u/bmullan)\
**Post date:** [April 3, 2017, 7:01am UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/4 "2017-04-03T07:01:28Z")

</div>

Jason  
I’d posted a note about your Nextcloud LXD image on the LXD sub-reddit  
yesterday and someone replied already that they’d just done something  
similar the day before…

link I saw on reddit…

> **[Beta - LXD image for Nextcloud 11 by Jason Bayton • r/LXD](https://www.reddit.com/r/LXD/comments/632to3/beta_lxd_image_for_nextcloud_11_by_jason_bayton/dfqwsxk)**
>
> 6 points and 3 comments so far on reddit

---

<div class="post-metadata">

**Author:** ![JasonBayton](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jasonbayton/32/297_2.png) [@JasonBayton](https://help.nextcloud.com/u/JasonBayton)\
**Post date:** [April 3, 2017, 7:41am UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/5 "2017-04-03T07:41:16Z")

</div>

Nice one 🙂 I haven’t publicised it beyond the forum as yet as I don’t think it’s autonomous enough with the fixed credentials.

Hopefully someone will help me script it all before long.

---

<div class="post-metadata">

**Author:** ![jrwren](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jrwren/32/3582_2.png) [@jrwren](https://help.nextcloud.com/u/jrwren)\
**Post date:** [April 3, 2017, 6:05pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/6 "2017-04-03T18:05:14Z")

</div>

Another option is to treat it like other cloud systems and not have any passwords.

lxd can pass user-data on instance start, just like AWS. If your image is using cloud-init (most cloud linux does), then you pass your public key.

e.g.  
cloud-config.yaml  
#cloud-config  
ssh-import-id: [gh:jrwren]

$ lxc launch nextcloud:nextcloud11 myNCcontainer -c user.user-data="$(cat cloud-config.yaml)"

---

<div class="post-metadata">

**Author:** ![JasonBayton](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jasonbayton/32/297_2.png) [@JasonBayton](https://help.nextcloud.com/u/JasonBayton)\
**Post date:** [April 3, 2017, 6:26pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/7 "2017-04-03T18:26:08Z")

</div>

There are no system/user passwords to consider here, though a cloud-init type script for the whole setup (lamp, databases, NC) would be excellent.

Maybe @enoch85 can help also, since he has scripts with the VM I bet we could adapt.

---

<div class="post-metadata">

**Author:** ![enoch85](https://help.nextcloud.com/user_avatar/help.nextcloud.com/enoch85/32/49403_2.png) [@enoch85](https://help.nextcloud.com/u/enoch85)\
**Post date:** [April 3, 2017, 7:10pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/8 "2017-04-03T19:10:41Z")

</div>

There are alot of stuff you can “borrow” from the VM. Just check how we did. The `cat` option that @jrwren meantioned is an alternative. In the VM we generate new strong passwords with /dev/urandom and lock it into root.

For user passwords it’s easy, just do `passwd $user` and use the `occ` command for Nextcloud. You could generate passwords here as well and put them in a file only readable by root.

---

<div class="post-metadata">

**Author:** ![jrwren](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jrwren/32/3582_2.png) [@jrwren](https://help.nextcloud.com/u/jrwren)\
**Post date:** [April 3, 2017, 9:05pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/9 "2017-04-03T21:05:20Z")

</div>

Ah! Sorry! I misunderstood which passwords were being discussed.

---

<div class="post-metadata">

**Author:** ![JasonBayton](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jasonbayton/32/297_2.png) [@JasonBayton](https://help.nextcloud.com/u/JasonBayton)\
**Post date:** [April 6, 2017, 9:26pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/10 "2017-04-06T21:26:52Z")

</div>

Temporary update on this, the server hosting the image died yesterday and given it’s new-ness I hadn’t yet added it to a backup rota. Silly me.

I’ll rebuild it over the coming days.

---

<div class="post-metadata">

**Author:** ![ingobaab](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ingobaab/32/3687_2.png) [@ingobaab](https://help.nextcloud.com/u/ingobaab)\
**Post date:** [April 10, 2017, 1:39pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/11 "2017-04-10T13:39:12Z")

</div>

Hello Jason, great idea! But I get Unable to connect to: [demo.nextcloud.bayton.org:8443](http://demo.nextcloud.bayton.org:8443)  
(or ‘ERR\_CONNECTION\_REFUSED’) - is it my fault? Thank you for any hint…

---

<div class="post-metadata">

**Author:** ![JasonBayton](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jasonbayton/32/297_2.png) [@JasonBayton](https://help.nextcloud.com/u/JasonBayton)\
**Post date:** [April 10, 2017, 3:18pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/12 "2017-04-10T15:18:12Z")

</div>

@ingobaab it was my fault, as I mentioned in the comment above yours the server died and I had to rebuild everything from scratch.

Everything should now work again. Give it a go 👍

---

<div class="post-metadata">

**Author:** ![ingobaab](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ingobaab/32/3687_2.png) [@ingobaab](https://help.nextcloud.com/u/ingobaab)\
**Post date:** [April 10, 2017, 4:35pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/13 "2017-04-10T16:35:24Z")

</div>

Hi Jason! Great I will try it.  
I did also some exploration and created a wordpress-hosting-container (fast caching, nginx, ready to run…) Maybe we should partner 🙂 - I will install a your-nextcloud… What I also did, was setting ab a ‘kolab-mailserver’ inside a container. What this containers should have, is a configuration-gui / webpanel. For my wordpress-thinky I developed such…

Did you consider a webpanel to configure your nextcloud-linuximage?

Container-Management:

 ![](https://help.nextcloud.com/uploads/default/original/2X/6/69f5d314960ab9482935f1fccf9b62f6c82f5f3f.png)

---

<div class="post-metadata">

**Author:** ![ingobaab](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ingobaab/32/3687_2.png) [@ingobaab](https://help.nextcloud.com/u/ingobaab)\
**Post date:** [April 10, 2017, 4:36pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/14 "2017-04-10T16:36:59Z")

</div>

WordPress-Configuration:

 ![](https://help.nextcloud.com/uploads/default/original/2X/5/51435fd0c5671d2b45150a81fc35f547ab11c825.png)

---

<div class="post-metadata">

**Author:** ![JasonBayton](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jasonbayton/32/297_2.png) [@JasonBayton](https://help.nextcloud.com/u/JasonBayton)\
**Post date:** [April 10, 2017, 4:45pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/15 "2017-04-10T16:45:32Z")

</div>

Oh wow that’s nice.  
Do you make use of the APIs in LXD to get that up and running? It’s way ahead of my skillset; I run ~20 containers at home and a further 10 on hosts around the net with different services I can move between hosts as I see fit, but it’s all CLI, no fancy GUIs for me 🙂

That said, I took a crack at one a while back but it’s not progressed much since:

> **[New project is coming along well... :) ##lxd   ##webui   ##webpanel   ##api  ](https://plus.google.com/+JasonBaytonX/posts/iFNMKYetqzU)**
>
> New project is coming along well... :) ##lxd   ##webui   ##webpanel   ##api   - Jason Bayton - Google+

---

<div class="post-metadata">

**Author:** ![ingobaab](https://help.nextcloud.com/user_avatar/help.nextcloud.com/ingobaab/32/3687_2.png) [@ingobaab](https://help.nextcloud.com/u/ingobaab)\
**Post date:** [April 10, 2017, 4:48pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/16 "2017-04-10T16:48:48Z")

</div>

Hi Jason,  
I intsalled your image! great. But… there is only apache2 running, no php… ☹  
Do I have to run some script or how to proceed?  
Thank you for any help 🙂  
-Ingo - I will look at the Webpanel you mentioned, thanx

```
systemd-+-accounts-daemon-+-{gdbus}
    | `-{gmain}
    |-agetty
    |-apache2---5*[apache2]
    |-atd
    |-cron
    |-dbus-daemon
    |-dhclient
    |-mysqld---27*[{mysqld}]
    |-polkitd-+-{gdbus}
    | `-{gmain}
    |-redis-server---2*[{redis-server}]
    |-rsyslogd-+-{in:imuxsock) S 1
    | `-{rs:main Q:Reg}
    |-snapd---7*[{snapd}]
    |-sshd
    |-systemd-journal
    |-systemd-logind
    `-systemd-udevd
```

---

<div class="post-metadata">

**Author:** ![JasonBayton](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jasonbayton/32/297_2.png) [@JasonBayton](https://help.nextcloud.com/u/JasonBayton)\
**Post date:** [April 10, 2017, 5:01pm UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/17 "2017-04-10T17:01:16Z")

</div>

What! I launched that image on 3 hosts and it came up perfectly each time.  
The install is based on my [guide](https://bayton.org/2016/07/installing-nextcloud-on-ubuntu-16-04-lts-with-redis-apcu-apache/), so PHP7 is installed with the lamp^ meta package.

Edit, just launched one again, it’s straight up with no issue aside from the domain error mentioned in `/media/nc/start.md`:

 ![](https://help.nextcloud.com/uploads/default/original/2X/d/dd7fc2bd0a7d657d52df6d4386a470d34be04688.jpg)

---

<div class="post-metadata">

**Author:** ![enoch85](https://help.nextcloud.com/user_avatar/help.nextcloud.com/enoch85/32/49403_2.png) [@enoch85](https://help.nextcloud.com/u/enoch85)\
**Post date:** [April 11, 2017, 9:11am UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/18 "2017-04-11T09:11:30Z")

</div>

Eh, just tried [https://demo.nextcloud.bayton.org:8443](https://demo.nextcloud.bayton.org:8443) and got this:

`{"type":"sync","status":"Success","status_code":200,"operation":"","error_code":0,"error":"","metadata":["/1.0"]}`

That’s not even the status.php, which file is that? 😃

Edit: OK, [https://demo.nextcloud.bayton.org](https://demo.nextcloud.bayton.org) works.

---

<div class="post-metadata">

**Author:** ![JasonBayton](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jasonbayton/32/297_2.png) [@JasonBayton](https://help.nextcloud.com/u/JasonBayton)\
**Post date:** [April 11, 2017, 9:19am UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/19 "2017-04-11T09:19:48Z")

</div>

Yeah, you tried accessing LXD directly, it’s not a web interface 🙂  
The [demo.nc](http://demo.nc) URL there is temporary, I’ll likely have a landing page for the actual demo servers in future. In the meantime you can access the demos [9](https://demo9.nextcloud.bayton.org/), [10](https://demo10.nextcloud.bayton.org/), [11](https://demo11.nextcloud.bayton.org/) and [12](https://demo12.nextcloud.bayton.org/).

---

<div class="post-metadata">

**Author:** ![enoch85](https://help.nextcloud.com/user_avatar/help.nextcloud.com/enoch85/32/49403_2.png) [@enoch85](https://help.nextcloud.com/u/enoch85)\
**Post date:** [April 11, 2017, 10:21am UTC](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782/20 "2017-04-11T10:21:55Z")

</div>

How do you do with the sessions? Are they valid for XX minutes and then everything is reset, or is each session it’s own container (like the Nextcloud demo)?

Here’s another demo server btw: [https://demo.orestad-linux.se](https://demo.orestad-linux.se)  
USER: demo  
PASS: orestadlinux#

[Next page](https://help.nextcloud.com/t/beta-lxd-image-for-nextcloud-11/10782.md?page=2)
