Beta - LXD image for Nextcloud 11

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

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

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…

1 Like

Nice one :slight_smile: 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.

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)"

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.

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.

1 Like

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

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.

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

@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 :thumbsup:

1 Like

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 :slight_smile: - 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:

WordPress-Configuration:

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 :slight_smile:

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

Hi Jason,
I intsalled your image! great. But… there is only apache2 running, no php… :frowning:
Do I have to run some script or how to proceed?
Thank you for any help :slight_smile:
-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

What! I launched that image on 3 hosts and it came up perfectly each time.
The install is based on my guide, 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:

Eh, just tried 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? :smiley:

Edit: OK, https://demo.nextcloud.bayton.org works.

Yeah, you tried accessing LXD directly, it’s not a web interface :slight_smile:
The 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, 10, 11 and 12.

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
USER: demo
PASS: orestadlinux#

They’re all valid for 60 minutes. The containers housing the NC installation are destroyed and re-cloned from images I’ve created, and the databases are dropped and re-imported.

More here: https://bayton.org/2017/02/introducing-nextcloud-demo-servers/
And on the forum: Demo instances of 9, 10, 11 and 12 now live

1 Like