Change domain name

Hello.
Is it very difficult to change the domain of the server and in all the nextcloud configuration files until you can have it with the new domain?

For example, current domain pepe.net and new domain pepe.com

Best regards

I think it is not so complicated. You can use both domains for migration at the same time.

But you must differ between the Nextcloud settings and the e.g. Apache2 settings.

Nextcloud example config/config.php:

  'trusted_domains' => 
  array (
    0 => 'cloud1.server.tld',
    1 => 'cloud2.server.tld',
  ),
'overwrite.cli.url' => 'https://cloud1.server.tld',

In the first step only add the new domain and use the old domain.

Apache2:
You must add a new virtual host. The ip or CNAME must look to the webserver.
Also you must configure Lets Encrypt. Similar settings to the old domain.

If the new virtual host with the new SSL works, maybe Nextcloud works, too.
Then configure only the new domain. After a time of testing you can delete the configuration for the old domain at Apache2, too.

In other words, modifying the “nextcloud.conf” file and changing the domain names, and editing and modifying “config.php” and requesting an SSL certificate to configure Lets Encrypt is enough, right?

Hopefully yes. Try it out. If possible, try to use both domains at the same time.

At the moment I am evaluating it and I don’t know when I will do it.

I think I’m going to use an annual payment domain, because the family has liked nextcloud a lot, and I don’t want to have it with a free domain and renew it every 30 days by going to the NO-IP website and clicking every 30 days. …

When I do, I will leave the two domains at first, and when I see that everything works well, I will only leave the definitive one and delete the old one.

I do it like this, right?

A good plan.

I use the DynDNS service https://www.ddnss.de (more domain names available). For the dynamic ip / address it is configured on my FritzBox. I must not login on the website every 30 days. I never log in. Only my FritzBox uses the service.

Changing the domain is officially not supported. See Domain Change — Nextcloud latest Administration Manual latest documentation

1 Like

Wow, and then?
Installation from scratch?

No, you can do it technically but you need to change all clients manually to the new domain.

Do you mean users?

Should I cancel their accounts and register them again?

@szaimen
I can access the app store from both domains and also update the apps installed from the other domain. And yes all clients must be changed to the new domain name. Probably the data must also be resynchronized to the client.

@fgm
If i were you, i would just give it a try. Make a backup beforehand, so that you can reinstall completely in case of emergency.

No I mean the Android, iOS and Desktop clients.

after the domain change do I need to resync on clients or it recognize the files on the clients?

I just successfully moved my Nextcloud instance from one server/domain to another server/domain. I used rsync to sync the data and files directory rsync -av ...
Steps are basically:

  1. Follow this instructions Migrating to a different server — Nextcloud latest Administration Manual latest documentation
  2. edit config.php to update possible paths and domains

Worked perfectly, thank you all!
Andreas

1 Like