SCUBA's GitHub Site
for a self hosted Nextcloud I turned to Ubuntu Server and LXD to create an LXC container for Nextcloud snap. There is a great community behind Nextcloud snap and support is fantastic. The greatness of Linux together with supported hardware enables anyone to run a 24/7 Nextcloud server.
My goal is a simple safe and reliable setup with ample resources for 5+ family users, affordable, efficient and low maintenence. My day job is software support for a leading WMS. I'm an avid scuba diver and enjoy Linux and FOSS. I'm a dad and husband thus I'm not keen on spending much of my free time doing server-maintenence.
Quicklinks
Requirements:
2x Lenovo ThinkCentre M92p Tiny (refurbished) - stackable 1xServer & 1xBackup
- CPU: Intel Core i5-3470T
- PSU: 16W/12W load/idle
- RAM: 16GB
- SSD: 500GB
Requirements:
cockpit, htop, lnav, mc, openssh-server, sysstat, tmux
lxd, lxdmosaic, nextcloud
ctr-wake
(weekly) container synchronisation
/etc/hosts
in LXC-containernextcloud.enable-https lets-encrypt
/var/lib/snapd/snapshots
and copy/move to whereverThis works fine as weekly automatic cronjob (as root) and has the added convenience of easy snap transfer to different server when needed. Thus always 4 weeks of snap-snapshots on backup media.
man snap
and snapcraft
1. copy compressed file (*.zip) from backup media to /var/lib/snapd/snapshots
2. discover snapshot-ID using snap saved
3. issue command sudo snap restore "snapshot-ID"
This works fine as scripted cronjob or LXDMosaic schedule. 0 downtime.
rotating LXC container snapshot script
lxc image import $PATH/to/$IMAGENAME.tar.gz --alias $IMAGENAME
lxc launch $IMAGENAME $CONTAINERNAME
See also personal LXD-LXC Wiki (just notes)