Point subdomain to home server

Nextcloud version 15.0.7
Operating system and version Ubuntu 18.04
NC Snap install

Hi all,

I’ve just installed NC with Snap on a new Ubuntu install on a home laptop. I can access and login to the admin area at:

Now I want to point a subdomain to it so I access it securely via HTTPS over the internet.

I’ve pointed:
to my static IP
whatsmydns.net confirms it’s pointed to the correct IP

I’m now unsure what my next steps are. I have a tp-link router and have set the internal IP of the server as a static IP. I think my next step is to set-up port forwarding, I’m not too sure how to go about that. Can anyone point me in the right direction?


I’ve opened ports 80 & 443 in UFW with:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

In my router:
Forwarding > Virtual Servers
Service port = 80
Internal port = 80
IP Address =
Protocol = TCP

Service port = 443
Internal port = 443
IP Address =
Protocol = TCP

On visiting



Because you did not tell your internal name server that nc.example.com has ip address

How would I do that?

So I’ve added nc.example.com and with:

System config value trusted_domains => 1 set to string nc.example.com
System config value trusted_domains => 2 set to string

I can login on the LAN with the
but nc.example.com gives me:

what is the result of

host nc.axample.com

Leon, did you try to access your nextcloud from outside your lan? If that works you, you might need this: https://ownyourbits.com/2017/03/09/dnsmasq-as-dns-cache-server-for-nextcloudpi-and-raspbian/

@Sanook host nc.example.com is as expected

I’ve contacted my ISP (a small company), he thinks the problem may be on their end. I’ll update this thread once I know more…

@LeonM are you not able to connect from outside your network either? You normally can not connect the domain from inside your own network without dnsmasq afaik

Yes, in your LAN. But from outside of your LAN?

This issue is now resolved.

Although I had a static IP in as much as it never changed, it wasn’t a public facing IP. My ISP has now given me a new static public facing IP and after fixing my WAN router settings the subdomain works as expected without doing anything else.

Thanks to those that offered advice.