How to change domain name in nextcloud version 31.0.6.2

Hello,

I’m running Nextcloud AIO with Docker. My instance was originally set up with the old domain, but now I want to change it to new domain.

I followed the documentation and edited the configuration.json file inside the mastercontainer using:

sudo docker run -it --rm \
  --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config:rw \
  alpine sh -c "apk add --no-cache nano && nano /mnt/docker-aio-config/data/configuration.json"

I replaced the old domain with the new one, saved the file, and then restarted the containers (nextcloud-aio-mastercontainer, nextcloud-aio-apache, and nextcloud-aio-nextcloud).

But after restarting, my instance still redirects back to the old domain . Even when I delete the old domain from trusted_domains with occ, it comes back after a restart.

It looks like something is overwriting my changes.

Can anyone guide me through the correct steps to fully change the domain name in AIO so that the old one is removed and only the new one is active?

nextcloud instance details:
installed: true

  • version: 31.0.6.2
  • versionstring: 31.0.6
  • edition:
  • maintenance: false
  • needsDbUpgrade: false
  • productname: Nextcloud
  • extendedSupport: false
1 Like

And what is the domainname of your “main system”? - The Webserver of the main system receives the requst and forwars it to your docker instance, if the domain name fits.

Don’t forget, also to adopt the certificates to the new domain.

Because you did not post the configuration of your system using the Support Template, we only can dig in the dark.

Hi, you need to stop and start the containers cia the AIO interface. Only then are the changes applied to the sibling containers.