Lev Lazinskiy

Catastrophic Nextcloud Upgrade

| Software | Selfhosted | Nextcloud |

I neglected by Nextcloud installation so much that I found myself in 2024 running Ubuntu 18.04 LTS, PHP 7.2, and Nextcloud 20. All the upgrade windows came and went and I blissfully continued running an incredibly insecure installation. Last night I came to my senses and ran the do-release-upgrade command twice, from 18.04 to 20.04 and then to 22.04 LTS. Everything mostly worked like a charm and the server came back online.

When I tried to use Nextcloud though, it told me that I was completely out of luck because I was running a version of PHP that was too new. (8.1)

I looked around online to see if there was something I could do and a lot of the advice that I got was to downgrade my PHP version which is basically the last thing I ever want to do. The idea was to downgrade PHP, upgrade Nextcloud, and then upgrade PHP.

I also saw a bunch of people saying “just run it in Docker” and I wish I had. I tried, to be honest, but found both the “all in one” container and the docker-compose file to be so confusing. I was not able to get it to work.

In the end, I did what any desperate NUC user would do, and installed a fresh copy of Nextcloud while manually moving all of my files from the previous installation to their right location. I think this would be a complete nightmare for an installation of Nextcloud that has more than a handful of users in it, but for my purposes it did the trick.

This procedure was pretty painless. Be careful though, you may lose all of your stuff if you type in the wrong order, be sure to make a backup before doing this type of directory surgery.

# Remove the new files directory of your new installation 

# If you are not sure where your Nextcloud Data Directory is, 
# check out the /var/www/nextcloud/config/config.php file

# the occ utility is inside of your nextcloud installation, 
# probably around /var/www/nextlcoud 
sudo -u www-data php occ files:scan --all

This took quite a bit of time to run but in the end everything is in the right place and I am am happily running the latest and greatest version of Nextcloud.

Articles from blogs I follow around the net


I’ve been a little less online lately, but not to worry, I have just been living my life :) Several weeks ago, I gave notice at work and left. Some people in my life were surprised, because it was a good job at a good company, I generally enjoyed it, I got…

via Notes on Kwon.nyc April 10, 2024


I’m writing this blog entry while my work laptop goes through its fourth update since the beginning of the week. This is not unusual, though the...

via Life Is Such A Sweet Insanity. April 10, 2024

The Component Gallery

There have been tons of design system roundup sites over the years, but The Component Gallery  by Iain Bean is particularly well designed and fun.

via Blog – Brad Frost April 10, 2024

Generated by openring