How to – Upgrade Nextcloud

Yet another Nextcloud blog post, yearh. I have to admit I am out of inspiration wen it comes to get new ideas for new posts at the time. But then again it is good that Nextcloud is fairly new and there is a lot to cover on that front.

In this post will I show you how to perform an easy manual upgrade there should be a lot safer than using the package manager, I was speaking with some of the nextcloud developers last month where they said they wouldn’t create repos for nextcloud but it appears somebody have created a repo if you take a look here. For your own sake and safety please do NOT use these repositories a use a few minitues of your life to do the upgrade manually it isn’t that hard and you will not have to fight the repos! I’ve had multiple issues with the old Owncloud repo earlier and it isn’t worth it.

As a start we will put nextcloud in manitaince mode to make sure the is no user interference (I will do everything as root-user)

The next thing is to create a backup of the current nextcloud installation you have

Then download the latest version of nextcloud and make sure to change the wget cmd.

unpack the tarball with

then copy everything from the new nextcloud folder to your current nextcloud installation in /var/www (make sure to copy the hidden files)

then we will need to moove the old config/ and data/ direcories back again

make sure your nextcloud folder & files have the right permissions.
you can use this script to automaticly set the permissions just save the code below to a file and give it permissions to execute with chmod +x permission_file

then go to you installation folder and perform the actual upgrade and exit maintenance mode.

Fell free to contact me if you have any troubles or thought regarding the post or anything else.