Breaking Borders: Making Your Home Server Accessible from Anywhere in the World


In my last post, we turned an old PC into a local cloud server. It worked perfectly... as long as I was sitting in my living room. But what’s a "Cloud" if you can't access it while traveling or share a file with a friend across the city?

Taking your server Public is where the real challenge begins. I spent hours fighting with router settings and ISP blocks. Here is how you can do it—the hard way and the smart way.

1. The "Public Domain" Path (DuckDNS + SSL)

This is the gold standard. You get a custom URL like yourname.duckdns.org and a secure HTTPS connection.

The Setup:

  • Step 1: Create a free account on DuckDNS and point it to your Public IP.
  • Step 2: Port Forwarding. You must tell your router to send traffic from Port 80 (HTTP) and Port 443 (HTTPS) to your server’s local IP (e.g., 192.168.0.222).
  • Step 3: Use dietpi-letsencrypt to get a security certificate.

The Nightmare: Why this often fails

I hit a massive wall here. My ISP (Internet Service Provider) used CGNAT, meaning they blocked Port 80 and 443. I kept getting Connection Timeout and SERVFAIL errors. If your ISP blocks these ports, no amount of settings will make this work unless you pay for a Static Real IP.


2. The "Smart" Path: Bypassing ISP Blocks with Tailscale

If you don’t want to argue with your ISP or pay extra money, this is the miracle solution. Tailscale creates a secure "private tunnel" between your devices regardless of where they are.

How it works:

  • Install Tailscale on your DietPi server: dietpi-software install 121 (or via terminal).
  • Install Tailscale on your phone or laptop.
  • Login with the same email. Suddenly, your server has a new IP (like 100.x.x.x) that works anywhere in the world.

Pro Tip: To share your server with a friend, use Tailscale's "Node Sharing" feature. They don't need your password; they just need their own Tailscale account!


3. The Final Boss: "Access through untrusted domain"

Even after fixing the connection, Nextcloud might show you a scary blue screen saying "Access through untrusted domain." This is a security feature, not an error.

You must manually tell Nextcloud to trust your new Public IP or Tailscale IP. In the terminal, run:

sudo nano /var/www/nextcloud/config/config.php

Add your IPs to the trusted_domains array:

'trusted_domains' => array ( 0 => 'localhost', 1 => '192.168.0.222', 2 => 'yourname.duckdns.org', 3 => '100.83.180.57', // Your Tailscale IP ),

4. Free vs. Paid: Which should you choose?

Feature Free (Tailscale/DuckDNS) Paid (Static Real IP)
Cost 0 BDT 500-1000 BDT/month
Ease of Use High (Tailscale is easiest) Medium (Requires config)
Speed Great for personal use Best for high traffic

Final Thoughts

Going public is a journey of troubleshooting. Whether you use a VPN tunnel like Tailscale or a public domain with a Real IP, the feeling of accessing your home files from a coffee shop miles away is incredible. Your old PC isn't just a box anymore—it's a global server.

Next Step: Want to see how to auto-backup your phone photos to this server? Stay tuned!

Comments