How to add domain name to nextcloud

Hello,
i have just installed Nextcloud on my VPS. but i would like to access it through a domain name. please could you tell me how to do it . i would like to access it like www.companyname.com

Thanks guys

Yep, I just did this.

  1. You’ll need to setup proper dns with your domain service. Just login and make a support service chat session; they’ll be able to guide you through the process.

    If desired, you could also use a sub-domain ala cloud.companyname.com

  2. Once you’ve got the domain ready you’ll need to edit your config.php file to add your new trusted domain.

  3. Be sure to setup a https / SSL certificate to protect yourself. I use a community project called Let’s Encrypt.

Tip: If you use Let’s Encrypt, be sure it is set to auto-renew every three months.

Hope this helps!

Bonus: once your domain works, you might want to setup Pretty URL’s for Nextcloud. This will show files as:

Companyname.com/s/file

Rather than

Companyname.com/index.php/s/file