How I setup Nextcloud
Layout
My Nextcloud install is run on 2 vms and an LXC container, this is to spread the load over more servers.
web02 is the webserver, it runs nginx and only nginx php02 is the PHP server, all the data is stored here mysql02 is the DB server, it runs MariaDB docker swarm (2 nodes) is where I have the notify_push container
Installed things
Nginx has been installed from the nginx.org repo, if your on a pi and want a newer version. Go have a look at packages.sury.org
PHP is installed from https://packages.sury.org/php/
as it has PHP from 5.6 all the way up to 7.4, I use an Ansible role to get the repo setup and install all the things I need.
MariaDB is from the Debian repo, so a standard install. I have made changes to the my.cnf
to make it run in 1GB of memory.
nextcloud gets installed from the zip file from nextcloud.com, I then do steps to move the old version left and setup the new version (more below).
Nextcloud steps
To get nextcloud upgraded or installed I follow this list of steps
New Install
- select a location for the install
- make any directories I need (e.g.
mkdir /srv/www/
) - download the latest version from nextcloud.com
wget https://download.nextcloud.com/server/releases/nextcloud-29.0.6.zip
- unzip the download
unzip nextcloud-29.0.7.zip
- move to my own named directory
mv nextcloud horwood-nextcloud
- copy in my backed up config
cp /backups/config.php horwood-nextcloud/config/
upgrade
- goto were nextcloud is installed
cd /srv/www/
- download the latest version from nextcloud.com
wget https://download.nextcloud.com/server/releases/nextcloud-29.0.7.zip
- unzip the download
unzip nextcloud-29.0.7.zip
- move the old left and the new right
rm -fr horwood-nextcloud;mv horwood-nextcloud horwood-nextcloud.old;mv nextcloud horwood-nextcloud
- switch to the webserver user and run the upgrade
cd horwood-nextcloud
su www-data
php occ upgrade
Published: