Making Nextcloud Public via Starlink with Cloudflare – The Complete Tutorial 🚀
You have Starlink as your internet provider, already run a Nextcloud instance on a Linux server, and don’t know how to make the whole thing accessible from outside without an extra router? Then grab a coffee – I’ll show you step by step how to get this rolling via e.g., Cloudflare.
Preliminary note: Cloudflare is just one of several solutions for making self-hosted services accessible from the outside without needing a separate router. And Cloudflare isn’t necessarily the best solution. There are reasons against using Cloudflare, which you can read about at Mike Kuketz .
Prerequisites
- A running Linux system with installed Nextcloud
- A domain name (e.g.,
meinecloud.de) - A Cloudflare account
- Starlink internet (obviously 😄)
- Optional but recommended: a Cloudflared Tunnel (the best solution with CGNAT)
Why is Starlink special?
Starlink uses CGNAT – meaning you don’t get a public IPv4 address. Port forwarding like with classic DSL or cable? Forget it. BUT: With Cloudflare, you can still make it work!
Step 1: Bring Domain to Cloudflare
- Register at Cloudflare.com and add your domain.
- Cloudflare asks for your DNS entries – ignore them for now.
- Change the Nameservers at your domain registrar to those of Cloudflare.
- Wait until Cloudflare has taken over the domain (can take 5–15 minutes).
Step 2: Set up Cloudflared Tunnel (because of CGNAT)
Since you can’t do port forwarding, you need the “Cloudflared Tunnel”. Sounds technical – but it’s super easy.
Installation of cloudflared
cloudflared is not directly installable from Debian repos – you must first add the official Cloudflare repository:
| |
Set up Tunnel
| |
This opens a browser – log in with Cloudflare there and confirm access to your domain.
| |
This creates your tunnel.
Configure Tunnel
Create the configuration file:
| |
Example content:
| |
Now run this as a system service:
| |
Done. Cloudflare now routes traffic directly to your server – without a public IP!
Enable HTTPS (via Cloudflare)
You don’t need Let’s Encrypt – Cloudflare can terminate TLS. Go to your domain in the Cloudflare web interface:
- Tab: SSL/TLS
- Choose “Flexible” or better “Full (strict)”, if you have an internal certificate.
- Under “Page Rules” you can also force HTTPS.
Testing
- Go to
https://cloud.meinecloud.de - You should see your Nextcloud
- Log in, done 🎉
Extra Tips
- Want to secure
/var/www/nextcloud? Setfail2banand a firewall. - Use
ufw:
| |
- Don’t forget backups!
Conclusion
With Starlink + Cloudflare Tunnels, it’s really easy to run your own cloud service – without complicated network configuration. You don’t need a static IP, no DynDNS, no port forwarding.


