Switching to cloud.domain.com

What I need to do to switch from domain.com/nextcloud to cloud.domain.com? My current setup is working fine with domain.com/nextcloud but I want to change.

Thanks in advance.

search-function is your friend here… as there are several threads about it.

otherwise fell free to fill in the template (that you just deleted) to tell us more about your environment, setting and instance


Debian Stretch
PHP 7.0.27
SQLite 3.16.2
Apache 2.4.25
NC dir /var/www/html/nextcloud

Anything else? What files you need?

I think this will help you

Setting the sub-domain is what you do with your domain provider directly. It is fully documented, but can also be dealt with via live support chat through your domain provider.

Since Nextcloud itself just provides us the community software, you’ll need to handle technical specifics through your domain provider. Good luck!

Do you have root or sudo access to change Apache’s conf files? (I’m assuming that you’ve already got your “cloud.domain.com” domain pointing at your real-world IP.)

You need to change your Apache vhosts conf to recognise the domain and direct it to your Nextcloud install. I’m running FreeBSD, so my locations are different to yours, but here’s what my vhosts looks like:

<VirtualHost *:443>
    DocumentRoot /usr/local/www/nextcloud
    ServerName cloud.darksteve.tk
    Header always set Strict-Transport-Security "max-age=15768000"
    SSLEngine on
    SSLCertificateFile /path/to/my/fullchain.pem
    SSLCertificateKeyFile /path/to/my/privkey.pem

Of course, the above assumes you’re using TLS (as you should be!) If you’re not, replace the “443” with “80” and leave out the four “header” and “ssl” lines.

Good luck!

EDIT: If you are using TLS, you’ll need a certificate for “cloud.domain.com”, otherwise your existing cert will throw errors in all modern browsers!