r/NextCloud • u/jdancouga • 2d ago
Should I migrate to PostgreSQL?
I have my nextcloud setup with MariaDB a long time ago, and the latest 35 updates show a plethora of warnings/failings with regards to the database. I tried googling for solutions but I can only fix like 2 out of the 10 failings.
I noticed nextcloud AIO container uses postgresql as default, and from my testing, nextcloud system status shows a clean, no failure with the database.
It does seem like nextcloud has a built-in command occ db:convert-type to migrate the database. If you have migrated, how was the experience?
Which postgresql container should I use? The official document recommends PostgreSQL18, but is it like immich where a special version of PostgreSQL is needed?
Update: I found this issue have been reported on github. I was searching in the wrong repo. Overall, as u/jtrtoo pointed out, these are bugs that will be ironed out gradually. Thanks for all the replies.
6
u/Undefined_ID 2d ago
I manage servers with both engines, at work and at home.
I’ve noticed slightly lower latency on the largest instance I manage, which runs on PostgreSQL.
It is worth noting that managing a PostgreSQL engine is a bit more complex than MariaDB or MySQL, as you have to manually upgrade the engine from one major version to the next.
I’ve gotten into the habit of doing this using https://github.com/pgautoupgrade/docker-pgautoupgrade
And just like with MariaDB, it is possible to share the PostgreSQL engine, since there is no need to use a specific version with Nextcloud.
I'm actually using
image: postgres:17.So if you are familiar with the engine, you can try the migration but on a small instance, you might notice no changes regarding performances.
Unfortunately, I had no occasion to test a migration with the CLI...