nextCloud (NC) is an excellent PHP application to help manage documents, calendar, contacts, photos and much more. Phoenix Learning Labs (PLL) intends to use this platform to host training materials on new and exciting technologies. PLL uses the BlueHost hosting service, Pro Plan, for its nextCloud instance. PLL had been using version 9.0 for quite some time and decided to upgrade. Currently, nextCloud version 11 is available and has been tested and was the one we used for this tutorial.
These are the notes taken during the migration. WinSCP was used to perform most of the steps of the migration and setup. There are many good tutorials on how to set up Putty and WinSCP so we will skip that part.
To avoid frequent disconnects with WinSCP you need to modify the advanced site settings for your Bluehost connection.
Download nextCloud installation ZIP
The instructions for the NC download can be found at this link. We want the server owners version. PLL’s Bluehost instance is a Shared instance but when “Upgrading” from one NC version another it is safer to use the “Server Owners” version.
Download the file to a safe place on your PC.
Save the important stuff from your version 9.0 installation
PLL NC instance was installed in the
If you don’t want to loose all of the work you’ve done to build the NC instance you need to copy two directories (config and data) from your NC 9 instance to a safe place.
Next steps are to rename the original NC directory to something else, we added an ‘xxx’ to the front of the directory name. This quickly eliminates the directory but keeps it handy just in case we need something else.
Install Version 11 on Bluehost
Locate the downloaded copy of the NC “Server Owner” ZIP file and transfer it over to the public_html directory.
Unzip the NC “Server Owner” ZIP file, this may take a few minutes
This will create a new directory named NextCloud, we renamed it to the original directory name for PLL: phoenixlearninglabs.
Then we copy the (config and data) directory from the safe place back to the PLL NC directory.
Maintenance Mode Issues
With great confidence, we restarted out NC instance and got this
Turns out in previous attempts at using the “Web Installer” version of NC 11 failed half way through, leaving our NC instance in Maintenance Mode.
To turn off Maintenance mode we need to edit the NC config/config.php file, the last line that indicates maintenance mode needs to be set to ‘false’
As my dad used to say “Now we are cooking with gas”, he would have been surprised if he had gotten to see Microwaves.
Looks like I’m still cooking with a campfire because the maintenance message is still displaying. Turns out if the migration failed the details are logged into a file “data/owncloud.log”. owncloud.log? not nextcloud.log? When nextCloud branched out from ownCloud not everything got changed. Delete the damn “owncloud.log” file
Holy crap looks like we got somewhere with this. Almost afraid to click on the damn (Start Update) button.
It just never fracking ends, what the hell is this all about?
Well, this would have been nice to have known before we started this fateful journey.
Tale of Two Paths
Of course, the link to the “Older versions” brings up a blank “changelog” page. After a bit of Google-Foo I found a promising link with all the versions.
Repeat the process above and get the “phoenixlearninglabs” directory ready to go, remember to delete “owncloud.log” file and change the maintenance mode to “false”. If you’re lucky you might just see this. Down the path of ruination once more.
This looks very promising even with the warning messages
OK, let’s just hit that (F5) button and hold our breath.
If I log in and go to the admin page, what will happen? any guesses?
Well, it looks like we are “Stable”, if that is possible, at 10.0.4. See that (Open Updater) button, looks real inviting but it’s a trap. Many posts in nextCloud forum with tales of horror when clicking on that.
Critical Step copy Version 10 .config and .data directories
NOTE: You must copy the “config” and “data” directories from the NC Ver 10 install to a safe place. These will the one you copy back when NC V11 is installed over NC V10.
We will take the long root by Unzipping NC Version 11 over Version 10. and changing the maintenance mode to “False” one more time.
We are back to the point where we thought we were cooking with gas. Silly me I will click the (Start Update) button expecting magic to happen.
Holy cow… it worked!!! Went to the admin page and there are a few minor warnings that we will resolve later. V11 of nextCloud is working on my Bluehost Shared Pro instance.
The integrity check done by NC is important as it locates critical files that may not be correct or missing. In this case, it was the infamous .htaccess and .user.ini file that were munged up.
The easier solution is to unzip the NC 11 ZIP file into a safe area, locate those two files can copy them over to the root of the NC site.
If you have extra files like the NC zip files in the NC directory you should delete them.
Rinse, repeat until clean.
HTTPS and SSL certificates
This whole area of the WWW is just a plain and simple pain in the ass. Having said that it is still a necessary requirement to get NC to work properly and allow for better security. That is what this NC warning is all about.
When you get a Bluehost Pro account you get 1 free SSL certificate and the dedicated IP address you need for the whole shebang to work.
NOTE: Something very cool about WordPress sites. If you host a WordPress site on BlueHost you can get a free SSL certificate and have it automatically installed and it doesn’t require another dedicated IP address.
I di have a few issues with the free certificate I intended on using for PLL but the Bluehost folks took care of it. Remember that these certs take a little time to propagate across the world wide web.
If you are using Bluehost as your hosting platform the default name servers are set to the Bluehost names servers and you don’t need to do anything.
However, if you experimented with other hosting environments and changed the default name servers to something else, they will need to be changed back.
We experimented with InMotion Hosting and all I can say is “We learn from our failures”.
Don’t expect the change to be instantaneous it has to propagate across all the other parts of the Interweb.
Read ALL of the installation instructions for applications like nextCloud and save yourself some time and headaches.
Get a good hosting provider that allows for SSH access and helpful technical support. I can not say enough good things about Bluehost.
Learn how to use command line tools like Putty or Kitty and some basic Linux commands, you don’t need to know a lot to get this whole thing done.
Who is your friend? I ask this question at every class I teach. The correct answer is Google, practice on asking questions different ways to get the correct answer.
Frequent backups, and do a few more backups. With the Bluehost Pro account, they throw in the Backup tool.
The nextCloud integrity check should be reviewed and all the instructions followed, missing or incorrect files can cause hours of headaches.