Nextcloud 18 change Server URL (incl. webdav)

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 18.0.0
Operating system and version (eg, Ubuntu 17.04): Ubuntu 19.10
Apache or nginx version (eg, Apache 2.4.25): Apache2
PHP version (eg, 7.1): PHO 7.3

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N):N

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

  GNU nano 4.3                                                    /var/www/nextcloud/config/config.php
$CONFIG = array (
  'instanceid' => 'cleaned',
  'passwordsalt' => 'cleaned',
  'secret' => 'cleaned',
  'trusted_domains' =>
  array (
    0 => '',
    1 =>'',
  'datadirectory' => '/mnt/smb/cloudspace/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nc_user',
  'dbpassword' => 'cleaned',
  'installed' => true,

THe Problem what i have that the Server URL in Settings and webdav is the local ip of the Server. Is there any way to Change this Server URL to an external URL?

nobody has an idea?

Like this you can use either one. To have a preferred one, you’d have to redirect the access via IP to the domain with a permanent redirect (301), then the clients update the URL.
That is something to be done in your webserver config.

You porbably need to check your poxy settings as well with nginx this header did the trick for me.

    proxy_set_header    Host $host;