Change URL Nextcloud


i’m running nextcloud over years.
Now i would change the ULR from nextcloud.
From “” to “” as example.
Which files i must change ?


Should only be:

  • nextcloud/config/config.php (trusted_domains and overwrite.cli.url)
  • web server files (server_name, regarding new cert path and cert files)
  • SSL certs (keep in mind to get new certificates for new domain)

Hi Schmu,

thanks for your reply. For the new Domain i have a Wildcard Certificate :slight_smile:

I tried this changes afternoon.


You’re welcome :slight_smile:

I’m just wondering however, are you really sure your wildcard cert will still work? The way I understand wildcard here is, that you can use a wildcard cert for domain.tld for example for:
and so on.

For another-domain.tld however you would need a new wildcard cert, which can then again be used for:
and so on.

Please verify before, to avoid running into issues.

Hi Schmu,

i transfered the domain and all is okay !

Thanks for your Help !


Hello tux73,

and what did you do with the clients? I have set a permanent redirect in the apache config, ok works, but the clients open a window in a browser and I have to enter my credentials again (and all other users too). Is there a way to change the url without this trouble with the clients?

No te recomiendo redireccionarlos lo que si puedes hacer es paulatinamente migrar a cada uno de tus clientes pero puedes mantener ambos hostname.

Edit your config.php on your nextcloud , for wopy - loolwsd.xml and default-ssl.conf or 00-default.conf for your site web use virtualhost

File: config.php
… ‘trusted_domains’ =>
…array (
.0 => ‘localhost’,
.1 => ‘’, (your old link-to config.php)
.2 => ‘’, (your new link-to config.php)

…‘overwrite.cli.url’ => ‘’,

edit file wopy: loolwsd.xml
https://***:9980 or http://:9980

edit file virtualhost: conf if apache
ServerName old.nextcloud
In this file add other <virtual host :> with same configuration and change this
ServerName new.nextcloud


I am also trying the same thing. Please check

<?php $CONFIG = array ( 'instanceid' => 'oc4dggvxs6vk', 'passwordsalt' => 'pOOyDgV1pFLR+Jl5zdv7HeXSYAz/mz', 'secret' => 'lnzXKhTfD/Y9dGvsLLRu5nPpZnR8VSMOkYr50ftmzJKMypav', 'trusted_domains' => array ( 0 => '', ), 'datadirectory' => '/var/www/html/nextcloud/data', 'dbtype' => 'mysql', 'version' => '', 'overwrite.cli.url' => '', 'dbname' => 'nextclouddb', 'dbhost' => 'localhost:3306', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'nextcloud_user', 'dbpassword' => 'jeyadevan123$', 'installed' => true, ); Now the webdav page lis I am not able to log into my netlink modem page, it opens the apache default page... What should I do? How can I change the local host address and use my mobile hotspot and use that IP? Please help

Is this a legit entry? I got help from someone