Sadly, Nextcloud's opportunistic file encryption has been very buggy for me, especially when I try to sync a lot of big files at once. So it was time for a clean install on Nextcloud 15, just in case.

I have experiemented with different hosters for my nextcloud installation, and since I never took the time to make an installation shell script (or Ansible etc.), I have fiddled with PHP settings every time I reinstalled Nextcloud, and it was getting annoying despite the good docs.

So I finally snapped (hurhurhur) and figured out how to install nextcloud via snap, and it's brilliant:

  1. Install snapd package (snap command) for your OS
  2. Run snap install nextcloud: Creates /snap/bin/ folder and adds it to PATH (hopefully)
  3. Run nextcloud.enable-https lets-encrypt and supply your domain name
  4. Go to the website and set an admin password

No need to edit 20 Apache and PHP configuration files with settings I don't fully understand, instead, someone else has hopefully done that properly for me. Hopefully also in a way that does not break due to the specific version of my OS like some ansible scripts I tried to use in the past, since that seems to the be the point of snaps? Or something? Will read up on that.

Later, I wanted to reconfigure the primary nextcloud storage directory to be a Hetzner Cloud Volume Storage. The simplest solution was instead of changing the configuration files of nextcloud, instead to mount --bind the volume into the data subdirectory of /var/snap/nextcloud/.

TODO

  • Read up on snapd
  • Figure out how change config files for packages installed via snap, editing /var/snap/nextcloud/current/nextcloud/config/config.php did not seem to have any effect.