How to installed new instance of nextcloud changed datadir and Nginx Proxy manager support

Hi guys,
Can someone help me with my new nextcloud installation. I want to use nginx proxy manager and i want to change my datadir volume. I have read documentation but i im still confused. I am using ubuntu 22.04 LTS server. I what to keep my files in volume called “vol_2”.

If the installation is new enough that it doesn’t have any data in it, reinstalling is easiest. But this is the general process:

https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#troubleshooting-data-directory

If you have specific questions or concerns about that, ask away.

The proxy stuff can be addressed after you have a working non-proxied installation. But, did you have a specific question about NGINX Proxy Manager? Are you already using it for other things?

yes i am using nginx proxy manager for other stuff.

and for changing datadir i am willing to have a fresh install. I just need to confirm that the following command will change datadir or not.

sudo docker run \
docker volume create ^
--driver local ^
--name nextcloud_aio_nextcloud_datadir ^
-o device="/vol_2/nextcloud_data" ^
-o type="none" ^
-o o="bind"
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 80:80 \
--publish 8080:8080 \
--publish 8443:8443 \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest
sudo docker run \
--sig-proxy=false \
--name nextcloud-aio-mastercontainer \
--restart always \
--publish 8080:8080 \
--env APACHE_PORT=11000 \
--env APACHE_IP_BINDING=0.0.0.0 \
--env NEXTCLOUD_DATADIR="/vol_2/nextcloud_data" \
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
nextcloud/all-in-one:latest

The above tells the AIO mastercontainer to utilize/vol_2/nextcloud_data from your Docker host as the Nextcloud data directory for the deployment. The above is also adjusted to expect a reverse proxy to be used as per:

You can set-up NGINX Proxy Manager like this for usage with the above deployment:

You may want to further refine this depending on the rest of your needs:

1 Like

Thanks you for your support @jtr :+1: :+1:

1 Like