Useful for

  • Personal file storage (has sync client for Linux and Windows)
  • Also serves as backup (but also do backup the data directory of nextcloud-server)
  • Sync calendar and contacts over caldav

Upgrades

I do upgrades over the CLI as i consider this to be more safe and inside a tmux session (see here for some tmux-commands) on the server.

cd /var/SOMETHING/
  • directory which contains the nextcloud folder
wget https://download.nextcloud.com/server/releases/nextcloud-MAJOR.MINOR.PATCH.zip
sudo -u www-data php /var/www/html/nextcloud/occ maintenance:mode --on
rsync -a nextcloud/ nextcloud_`date +"%Y_%m_%d"`/
  • creates a backup of the current version
mv nextcloud/ nextcloud_old/
sudo unzip nextcloud-MAJOR.MINOR.PATCH.zip
sudo cp nextcloud_old/config/config.php nextcloud/config/
  • use the old configuration for the new installation
sudo chown www-data -R nextcloud
sudo -u www-data php nextcloud/occ upgrade
  • upgrades the database (this command may take some time and it's good practice to run it inside tmux, such that connection interruptions do not halt or corrupt the upgrade)
sudo -u www-data php /var/www/html/nextcloud/occ maintenance:mode --off

AFTER you made sure that the installation works you can delete nextcloud_old with (rm -rf ./nextcloud_old/)