How to Open Nextcloud using my domain name?

I am fed up of this and have decided to approach the nextcloud community. So, basically, I have some a downloading website and I want all my files to download from ‘mydomain’.com instead of 1.xx.xx.xx/nextcloud/blah/blah.

Can anyone help me setting up my domain? I don’t want to set a DDNS from noip or stuff like that. My own domain, purchased from namecheap must access it. Help me, Please!

Also, just to add, I tried DDNS and also added it in config.php as a trusted domain; didn’t worked. I also put my own domain in trusted domain, didn’t worked either…

Also, how can I install HTTPS on nextcloud? I have it on Ubuntu 20.04 VPS.

Hi @mukeshwar,
For a standard installation ( not snap, not docker):

  • First redirect all trafic send to your domain into the ip you used to access to your nextcloud ( maybe your public ip if you self-host your server.

  • After edit your apache/ nginx files of you nextcloud nextcloud server and replace exemple.com by your domain ( restart apache / nginx ).

  • ( for self-hosted server ) Open your routers ports ( 80 and 443 ) to have access to your nextcloud from the outside.

  • Add your domain in trusted domain in config.php of nextcloud.

normaly you have access to your nextcloud from your domain.

To enable https on your page you can use certbot but you have to access to your nextcloud using your domain.

see : Certbot - Certbot Instructions

to set manually https :

apache : Installation on Linux — Nextcloud latest Administration Manual latest documentation

nginx : Nginx configuration — Nextcloud latest Administration Manual latest documentation

after https enable :
Enable HTTP Strict Transport Security ( on apache ): Hardening and security guidance — Nextcloud latest Administration Manual latest documentation

Thanks for taking the time to help me, however, I am noob in all these. I don’t know what’s going on… Can I set up a sub domain, and access nextcloud using that while my domain opens the Wordpress site I have? Like abc.com should open the downloading page and when the person click on the download button, they’ll redirect to sub.abc.com and download the file using that…

Also, can you please message me? I’ve a small yet crucial query. Basically, I can’t download my files from Google Chrome laptop…I have the link on a website button, and when I click on that, it simply opens a new window, buffer for a second and automatically closes. However, if I click the same button off Safari or Chrome Android, it downloads the file(it asks for permission first like do you want to download it)… What can be the problem?

@mukeshwar this is the same thing for a subdomain just set up your subdomain to redirect all request into your nextcloud ip .
for apache config file see : Installation on Linux — Nextcloud latest Administration Manual latest documentation

(don’t use Alias /nextcloud "/var/www/nextcloud/" inside unless you want to access to your nextcloud from sub.abc.com/nextcloud/)

after you just have to activate https (see my post above).