NextCloudPi Docker - Move the data-folder and the database to a other location

Hello,

just installed the NextCloudPi Docker container on my Synology NAS.
Everything works fine.
Ports are forwarded and a Lets Encrypt Certificate is setup.

My question now is if for security reasons the data-folder and the database should be moved to a other location (outside the NextCloud installation folder)?
This is at least what NextCloud recommends.

Hi
You can use nc-datadir to move the data folder to anywhere on your system.
https://docs.nextcloudpi.com/en/configuration-reference/#nc-datadir

Edit: sorry above is for regular ncp install, for docker use the -v option to mount data to where you want it.
https://docs.nextcloudpi.com/en/how-to-get-started-with-ncp-docker/

Hi,

thank you for your reply.
But does this bring a security benefit in a docker container, too?
I’m wondering why then this isn’t implemented by default in the NextCloudPi system.

If you just run your Nextcloud with it, there are no real security benefits because if someone manages to break in, they can mess up everything. It is different if you run different services, and e.g. a mail server uses the database as well. Then you don’t want that the attacker has direct access to the database which the mail server is using as well.