How to change data directory in Nextcloud

Is there an option to change the data storage location in Nextcloud? I’m asking because I have an external drive that I wanted to use for data from Nextloud and I don’t want to reinstall the entire system to this external drive.

Are you running BigBearCasaOS?

You can mount the external hard drive at the location.

yes Nextcloud comes from BigBearCasaOS. Where should this disk be mounted in the docker container and what permissions should be on this mounted disk/folder

Here is a guide. You can mount it to the data directory on the host, not the container.

the disk was already formatted in ext4 and mounted, I just want to know where it should be mounted in docker, in what folder such as /data or /var/www/html/data or somewhere else and whether I need to set any permissions

You can mount it at


Don’t change the container path.

I don’t know if it’s a good solution, but I managed to do it and it works, the disk is mounted in /mnt, I had to use chown on the disk, in the container settings I added this disk to be mounted in /NextData (new folder) and in config.php I changed the data location

You could of mounted the disk to /DATA/AppData/big-bear-nextcloud/html then it would of been fine.

I am very new to CasaOS, I had only one SSD (240GB) when initially setup and I have now added another 2TB HDD that I want to use for Nextcloud (and possibly Immich down the line).

How do I specify that I want the 2TB HDD to be used for data storage?


In fact, I think I overcomplicated it and the quickest solution (as previously mentioned) would be to mount the disk in /DATA/Appdata/, I don’t remember how this path went.

Thanks for the reply but I don’t understand some of the terminology.

Would mounting be what is described in the linked post above?

I was hoping to test out Nextcloud and Immich and use the same drive for both. Is this possible?

I had followed a different tutorial and I think I already have the drive mounted in Proxmox