Nextcloud won't start after update with docker compose


I have been running my nextcloud for 2 years now and 2 weeks ago I decided to update it.

My instance is running with docker compose ( I followed this tutorial )

I don’t remember what tutorial I followed to update my nextcloud but now I only have this message when trying to access it from firefox :

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

I have been trying to troubleshoot it myself but at this point I am completely lost…

From what I have read online It seems that I messed up my database.

and I cannot run the occ command anymore :

tarle@SERVER:~$ docker exec -u www-data -it nextcloud-app ./occ
An unhandled exception has been thrown:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_appco exist in /var/www/html/3rdparty/doctrine/dbal/src/Driver/PDO/Connection.php:82
Stack trace:

I have found another topic on this forum where the guy “dropped the database” to make nextcloud recreate it but I know nothing about database.

Sorry if I am not being very clear about my issue I tried my best but I am not even sure I know what’s happening.

Can somebody confirm the origin of the issue or point me to another lead ?

Do you know what version you were on and which one you updated to?

I would not follow that because throwing out the database will mean a substantial loss in data. Not in files, but it would mean losing all configuration, accounts, history, shares… The database isn’t something you should just discard and start over.

Sadly I have no idea what version I was on.
I guess I could find somewhere the current version I’m in?

Concerning the database I know what would be lost and I can deal with it if this is the only way.

You can’t skip major versions when upgrading. If you hadn’t updated in two years, I’m guessing you probably skipped a bunch.

If you can restore your system from your backup before the update, I can show you how to step it through one version at a time.

You are probably right about me skipping versions…
As stupid as it sounds I don’t have any backup of my nextcloud instance…
I only copied the data folder to make sure I would not loose any files.

I guess you learn from that kind of mistake!

Do you think I might as well reinstall nextcloud from scratch and copy data?

Probably so.

In your Docker compose file, you can change the image tag to lock it into a specific version. So where you have this:

    image: nextcloud:latest

You could change it to image: nextcloud:24 and it would use the latest patched Nextcloud 24 image. Then when you’re ready to bump to 25, you change it to 25, and so on. And if you get behind, then you can step it through one upgrade at a time.

You really should stay on a currently supported version, even if it’s one or two behind, since it’s important for security.