Hi, I want to move the user files outside of the Nextcloud installation directory without having to recreate or re-upload the database. Is it possible to move the data folder using a symlink?

I have no support/technical question and have seen the support category. (Be aware that direct support questions will be deleted.)

on

Which general topic do you have

Hi, I want to move the user files outside of the Nextcloud installation directory without having to recreate or re-upload the database. Is it possible to move the data folder using a symlink?

1 Like

Maybe the discussion above could help you

1 Like

Thx. I will not need to make nextcloud rescan the folders?

It shall work. But personally I prefer a bind-Mount in /etc/fstab instead of symbolic links. The reason is every bind-mount is in one place to find and to edit if you wanna change it later (eg. in case to upgrade the OS, change hardware).

2 Likes

I just wanted to add that symlinking or bindmounting a folder outside of the webroot into the webroot won’t change anything regarding the security risks that keeping the datafolder inside the webroot may impose, i.e. there’s still the same chance that the datafolder will be accidentally exposed to the public in case of e.g. a misconfiguration of the webserver.

See also the recommendation in the official docs: Hardening and security guidance — Nextcloud latest Administration Manual latest documentation

it worked and upgraded to the latest version … i probably need to harden it though