Moving from localhost to

Nextcloud version 12.0.3
OS Linux Mint 18.2
Apache 2.4.18
PHP 7.0.22 - -0ubuntu0.16.04.1 (cli) ( NTS )
Zend Engine v3.0.0, Copyright © 1998-2017 Zend Technologies
with Zend OPcache v7.0.22-0ubuntu0.16.04.1, Copyright © 1999-2017, by Zend Technologies

have successfully installed Nextcloud, but want to move from localhost to

what steps are necessary to do this?

I changed the config.php

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

is that all that is necessary ?

restart apache… no dice!

You’ll need to:

  • Point DNS of your domain to your server IP (setup dynamic DNS first if necessary, then CNAME instead)
  • Open 443 on your firewall/router and NAT to the internal IP of your server
  • Configure an Apache VHOST to accept the hostname (domain) and point it to the relevant apache directory on the server
  • Restart Apache


last time I did this is was Owncloud, and the method was to use overwrite.cli.url am starting fresh with a much larger hard drive, and wanted to make this work well. May have other content in the server, so don’t like messing with host file.

Vhost is already pointing to nextcloud

<VirtualHost *:443>
DocumentRoot /var/www/html/nextcloud/

Options FollowSymLinks
AllowOverride All

<Directory /var/www/html/nextcloud/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
#Order allow,deny
#allow from all
Require all granted

ErrorLog ${APACHE_LOG_DIR}/error-cloud.log
CustomLog ${APACHE_LOG_DIR}/access-cloud.log combined

This doesn’t work with the config.php set for localhost… should it ?

As well since I am using a subdomain, I can’t very well make another CNAME file. Would be most confusing I’m sure.

No, I skipped the edit to config.php because you’d already done it.
But! Overwrite CLI you’ve set needs to be httpS, and not end with /nextcloud as your vhost setup will bring you to the root by default.

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

What do you see when you browse to your domain then?

Absolutely no idea what you mean.

Thanks I’ll give that a try… anxious to get Cloud back up. Then I need to unerase a bunch of files accidentally erased. It’s been a lot of work.

made the change:
still no joy

<?php $CONFIG = array ( 'instanceid' => 'oc7p09gtupva', 'passwordsalt' => 'my stuff', 'secret' => 'my stuff, 'trusted_domains' => array ( 0 => 'localhost', 1 => '', ), 'datadirectory' => '/var/www/html/nextcloud/data', 'overwrite.cli.url' => '', 'dbtype' => 'mysql', 'version' => '', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'myusername', 'dbpassword' => 'mypasswd', 'installed' => true,

the address line on browser goes to:

if I add https:// in front of that it logs in perfectly. Is the https:// stored in the database or is it somewhere else ?