How to change URL of existing NCsite

I have an experimental NC20 installation on a NAS Ubuntu 20.04. I want to change the URL from mylongsitename.dedyn.io to shortname.dedyn.io. I have registered the shortname at deSec.
Is it possible just to change the URL on the server side? What places should I look for to change?
Will the procedure be the same if I want to change URL on my production site which is on a commercial VPS?

Hi

First you have to change your dyndns name. After that you have to change it in the webserver configuration and in the config.php file of your nextcloud intallation. If you use Let’s encrypt certificates you have to run acme, cerbot or whatever Let’s Encrypt Client you are using again, to provision the certificates for the new name.

Thanks for answer. I have already another dyndns name.
What changes needs to be done “in the webserver configuration and in the config.php file of your nextcloud intallation”? Where are these located more spcifically? How can I find them? Using grep?

Need more info about your setup to answer that. Is it running as Snap, Docker or is it a manual install with Apache or NGINX?

I have essentially used the instructions by Cartsetn Rieger (https://www.c-rieger.de/). It is a manual install with nginx (Nextcloud 20 Installationsanleitung v. 2.1 – Carsten Rieger IT-Services). Collabora and OnlyOffice in docker ( Nextcloud mit Collabora Office – Carsten Rieger IT-Services and Nextcloud mit ONLYOFFICE – Carsten Rieger IT-Services )
The VPS server is a clean Ubuntu 18.04.

Basically, the name must be changed in the configuration files of the web server and in the config.php of the Nextcloud. In other words, you just have to change the name wherever you entered it during the installation …

After a quick look through the instructions you linked, I would say that it would be in the following files:

/etc/nginx/conf.d/http.conf
/etc/nginx/conf.d/nextcloud.conf
/var/www/nextcloud/config/config.php

After you made the changes, restart all related services (nginx and php-fpm).

Then of course you have to install the Let’s Encrypt certificates for the new name. This should work the same way as it worked the first time (see in the instructions you linked)

And last but not least you have to stop an remove your collabora docker container and start a new one with your new domain name. Look at the section " Wie aktualisieren Sie den Docker container" in the tutorial you linked.

Thanks

Roland