Technical Anshu
Tutorials Blog
Nextcloud Remote Access

Access Nextcloud From Outside Your Home Safely VPN or Domain with HTTPS

Your cloud is only truly yours when you can reach it from anywhere - and only safe when you choose the right door. There are two good doors, and one that should never be opened.

By Technical AnshuUbuntu ServerSelf Hosted8 minute read
Watch the full video - the one-step Nextcloud install on Ubuntu, step by step

Inside the house, Nextcloud just works. From outside, you must make a decision with real consequences: who else can knock on this door? The two honest routes are a VPN, which keeps the door invisible to the internet, and a public domain with HTTPS, which makes the door visible but properly locked. The third route - forwarding the port and using plain HTTP with a password - is the one behind most hacked home servers.

The two safe doors, compared
Who can see the login pageVPN - nobody / Domain - anyone
Setup effortVPN - one app / Domain - DNS + cert
Sharing links with outsidersVPN - awkward / Domain - natural
Changing home IP addressVPN - does not care / Domain - needs DDNS
Neither door is wrong - the right one depends on who outside your house must reach the files
1

Route 1 - The VPN Door (Private by Default)

With a VPN or mesh-VPN tool on the server and on your phone and laptop, your devices find each other over an encrypted private network and Nextcloud stays completely unlisted on the public internet - no open ports, no login page for strangers to attack. You reach it by its private address or name exactly as if you were home.

This is the right door when the only outside users are you and your own family or staff, all with the VPN app installed. Its weakness is guests: sending a file link to a client or relative does not work, because the link leads to a private address they cannot reach.

2

Route 2 - The Public Door (Domain, HTTPS, Real Lock)

The public route done properly has four parts, none optional:

  1. A name: a domain or subdomain whose DNS points at your server, registered in Nextcloud's trusted domains (sudo nextcloud.occ config:system:set trusted_domains 2 --value=cloud.example.com - next free index)
  2. The certificate: sudo nextcloud.enable-https lets-encrypt so the login travels encrypted and the browser shows no warnings
  3. Only two ports forwarded in the router - 80 and 443, and 80 mainly so the certificate machinery and redirects work
  4. The lock: strong passwords, two-factor on admin and real accounts, and the snap's automatic updates left on

Millions of Nextclouds run exactly like this. Public is not the risk; public and careless is.

3

The Door That Must Never Be Opened

Forwarding a port to a Nextcloud served over plain HTTP - or with only a self-signed certificate standing in for identity - exposes a login page whose passwords cross the internet readable, on an address that scanners find within hours of it opening. Add a weak or reused admin password and the story writes itself. If you cannot do HTTPS with a real certificate yet, use the VPN route until you can. There is no version of in the meantime, just for testing that the internet respects.

4

The Home-IP Problem and DDNS

Most home connections have an address that changes - after a router reboot, or whenever the provider rotates it. The public route then points at a stranger's house until DNS catches up. The standard fix is a dynamic DNS name: a small updater (in the router, or a tool on the server) keeps one hostname pointed at your current address automatically. The VPN route simply does not care about your public address at all - one more reason small, private setups often choose it.

🔴 Decision in one line: only your own devices need access - VPN. Anyone else must open your shared links - domain with HTTPS. And whichever you build, it goes live after the first-login hardening, not before.

Watch the Install Behind Both Doors

The server itself takes one step - see it, then choose your door.

Watch Full Video
Frequently Asked Questions

Is forwarding port 443 dangerous by itself?

No - with HTTPS, strong unique passwords, two-factor authentication and automatic updates running, it is the normal way public Nextcloud servers operate. The danger is plain HTTP, weak passwords and an unpatched server, in any combination.

My home IP keeps changing. Can I still use a domain?

Yes, with a dynamic DNS service: your hostname stays fixed while a small updater keeps it pointed at your current address. Many routers have the updater built in.

Can I have both routes at once?

Yes, and many people do - the domain for sharing links, the VPN as the private admin path. Just keep the same discipline on both: HTTPS everywhere, two-factor on, updates on.

This guide is based on the Technical Anshu Nextcloud install video - stuck on a step? Ask in the video comments and you will get a reply.