Open
Description
By default, Nextcloud uses SQLite as its database. It has two benefits:
- It's the only DB backend that allows you to switch to a different one later
- It's easy to put the SQLite file into an arbitrary directory
The last point is especially relevant if you're hosting in a cloud. With SQLite, you can plug in a "block volume", mount it to /srv
, and configure datadirectory => '/srv'
. Doing so is a good idea regardless of the DB configuration.
With MariaDB or PostgreSQL, you have two options:
- Change their configurations to store data in the mount point
- Use managed databases
Both options require additional setup and are more error-prone.
So, I would go as far as suggesting SQLite be the default database backend. It's fit for individuals, and for more advanced use cases, one can always switch to a DB of their choice.