Changing apache port


I have a running nextcloud aio installation on Ubuntu 22.04 which is available under a specific subdomain (followed the instructions under GitHub - nextcloud/all-in-one: Nextcloud AIO stands for Nextcloud All In One and provides easy deployment and maintenance with most features included in this one Nextcloud instance.).

I missed to consider a NPM which I now need for additional services. I added jc21/nginx-proxy-manager in docker on a different host to my installation and tested it. I am able to address servers in my lan.

I would now ike to change the apache port as described in all-in-one/ at main · nextcloud/all-in-one · GitHub

How can I do this without endangering my current installation? (backup available)
Should I run the startup command with added apache port again (i.e. -e APACHE_PORT=11000 ) and than import my backup or is there an easier way to do this?


Recreating the mastercontainer with changed settings will not delete your files as long as you do not delete the docker volumes so importing a backup should usually not be necessary.

Great, seems to be easy. I will check and report.


This worked for me in my environment.

Stop all containers via mastercontainer. Stop mastercontainer and remove it.

Now again start command “docker run” with new config. No need for restore.

But anyway, to be sure make a backup before.

1 Like