I'll soon travel to Australia for weeks, and I want to continue publishing content. How do I access it securely from there without exposing my home network and compromising my privacy?I'll soon travel to Australia for weeks, and I want to continue publishing content. How do I access it securely from there without exposing my home network and compromising my privacy?

How I Access My Home NAS from Anywhere (Without Doxxing My IP) Using Cloudflare Tunnel

2025/12/04 14:03

I decided to stop using Twitter, but for my own content and supporting Ukraine against its barbarian invaders, I understood the contemporary media landscape was quite fragmented. I bet on Mastodon, Bluesky, and LinkedIn. My flow is the following: when I read a piece I find interesting, I schedule it for publication. The problem is that every social media platform has a different scheduler: Mastodon has the Mastodon scheduler, LinkedIn has an in-built feature, and Bluesky has… nothing. I had enough.

Hence, I started building an application to schedule posts across multiple social media platforms. Details are irrelevant to this post. Suffice to say, modules are running in a Docker container on my Synology NAS at home. It's a .local name to access when I'm at home. However, I'll soon travel to Australia for weeks, and I want to continue publishing content. The question then arose: how do I access it securely from there without exposing my home network and compromising my privacy?

The problem

I have already written a full-fledged post on the privacy problems caused by subdomains. Here's a summary:

  • Port forwarding exposes your home IP address
  • Dynamic DNS requires constant updates
  • Opening ports is a security risk
  • SSL certificates are a hassle to manage

I wanted a solution that would:

  • Keep my home network secure
  • Provide HTTPS automatically
  • Add authentication
  • Be simple to maintain

Enter Cloudflare Tunnel

Cloudflare Tunnel creates a secure outbound connection from your network to Cloudflare's infrastructure. Requests to your domain are routed through this tunnel to your application. No inbound ports are needed!

The flow is straightforward:

InternetCloudflare EdgeTunnelNASApplication

All connections are outbound from your NAS, so your firewall stays untouched.

Setting up the Tunnel

The documentation is pretty good, but here are the steps.

Prerequisites

I already had:

  • A domain managed by Cloudflare
  • The Docker service running on my NAS
  • My application running as a Docker container

Create a Named tunnel

In the Cloudflare Zero Trust dashboard:

  1. Navigate to Access > Tunnels
  2. Click Create a tunnel
  3. Choose Cloudflared
  4. Name it however you want, e.g., nas
  5. Copy the tunnel token - you'll need it shortly

This token authenticates your tunnel to Cloudflare.

Run cloudflared on the NAS

Pull the official Docker image: \n

docker pull cloudflare/cloudflared:2025.9.1

Then, create a container via the Synology Docker UI with these settings:

  • Container name: cloudflared
  • Command: tunnel --no-autoupdate run
  • Environment variable: TUNNEL_TOKEN=<your-token-here>
  • Network: the same network as the one your application is bound to, e.g., bridge

The critical part here is the network. The cloudflared container and the application must be on the same network.

Create a link from the cloudflared container to the application container:

  • Link container: name of the container you want to link to, e.g., myapp
  • Alias: name under which you will access it from cloudflared. Do yourself a favour, use the same name.

It allows cloudflared to reach the application at http://myapp:<PORT> without needing to expose any ports.

Configure the public hostname

Back in the Cloudflare dashboard, in the tunnel configuration:

  1. Go to the Public Hostname tab
  2. Click Add a public hostname
  3. Configure your subdomain, the domain, and the service path, e.g., http://myapp:<PORT>

Note that the hostname here must match exactly what you configured in the Docker link. If you misconfigured (I did), look at the logs: \n

dial tcp: lookup wrongname on 192.168.1.254:53: no such host

Adding Authentication

At this point, anyone with the URL can access the application. It might be an option, but it's not in my context.

I considered creating my own authentication mechanism, but ultimately decided against it. Cloudflare provides everything needed with only configuration - no code changes required.

Cloudflare Access supports multiple identity providers:

  • One-time PIN via email
  • GitHub
  • Google
  • Azure AD
  • Okta
  • etc.

To add the One-time PIN login method:

  1. Navigate to Access > Applications
  2. Click Add an application > Self-hosted
  3. Configure the application with the application name, domain, and subdomain
  4. Click Next
  5. Create a policy:
  • Policy name: "Allow myself"
  • Action: Allow
  1. Configure rules:
  • Click + Add include
  • Selector: Emails
  • Value: john@doe.it
  1. Click Next, then Add application

Do not forget to add the policy to the tunnel. I initially hadn't linked it properly, and wondered why Cloudflare wasn't sending me an email.

Cloudflare policies are extremely powerful. Have a look.

Result

Now, when I visit my application from the outside:

  1. Cloudflare displays an authentication page
  2. I fill in my email
  3. Cloudflare sends a one-time code
  4. I authenticate
  5. Cloudflare proxies requests through the tunnel
  6. The application receives the request.

I can schedule posts from anywhere!

Conclusion

Cloudflare Tunnel is an elegant solution for self-hosting. The setup took about 30 minutes, most of which I spent troubleshooting my own mistakes with container names and policy assignments.

For personal projects running from home, it's hard to beat: no cost, automatic HTTPS, built-in authentication, and zero network exposure. I hope the above setup proves useful to others who encounter the same problem.

To go further:

  • Cloudflare Tunnel for Home Assistant
  • Cloudflare Access controls
  • Cloudflare Policies
  • I finally understand Cloudflare Zero Trust tunnels

\

Disclaimer: The articles reposted on this site are sourced from public platforms and are provided for informational purposes only. They do not necessarily reflect the views of MEXC. All rights remain with the original authors. If you believe any content infringes on third-party rights, please contact service@support.mexc.com for removal. MEXC makes no guarantees regarding the accuracy, completeness, or timeliness of the content and is not responsible for any actions taken based on the information provided. The content does not constitute financial, legal, or other professional advice, nor should it be considered a recommendation or endorsement by MEXC.

You May Also Like

XAG/USD refreshes record high, around $61.00

XAG/USD refreshes record high, around $61.00

The post XAG/USD refreshes record high, around $61.00 appeared on BitcoinEthereumNews.com. Silver (XAG/USD) enters a bullish consolidation phase during the Asian session and oscillates in a narrow range near the all-time peak, around the $61.00 neighborhood, touched this Wednesday. Meanwhile, the broader technical setup suggests that the path of least resistance for the white metal remains to the upside. The overnight breakout through the monthly trading range hurdle, around the $58.80-$58.85 region, was seen as a fresh trigger for the XAG/USD bulls. However, the Relative Strength Index (RSI) is flashing overbought conditions on 4-hour/daily charts, which, in turn, is holding back traders from placing fresh bullish bets. Hence, it will be prudent to wait for some near-term consolidation or a modest pullback before positioning for a further appreciating move. Meanwhile, any corrective slide below the $60.30-$60.20 immediate support could attract fresh buyers and find decent support near the $60.00 psychological mark. A convincing break below the said handle, however, might prompt some long-unwinding and drag the XAG/USD towards the trading range resistance breakpoint, around the $58.80-$58.85 region. The latter should act as a key pivotal point, which, if broken, could pave the way for further losses. On the flip side, momentum above the $61.00 mark will reaffirm the near-term constructive outlook and set the stage for an extension of the XAG/USD’s recent strong move up from the vicinity of mid-$45.00s, or late October swing low. Silver 4-hour chart Silver FAQs Silver is a precious metal highly traded among investors. It has been historically used as a store of value and a medium of exchange. Although less popular than Gold, traders may turn to Silver to diversify their investment portfolio, for its intrinsic value or as a potential hedge during high-inflation periods. Investors can buy physical Silver, in coins or in bars, or trade it through vehicles such as Exchange Traded Funds,…
Share
BitcoinEthereumNews2025/12/10 10:20
Aave DAO to Shut Down 50% of L2s While Doubling Down on GHO

Aave DAO to Shut Down 50% of L2s While Doubling Down on GHO

The post Aave DAO to Shut Down 50% of L2s While Doubling Down on GHO appeared on BitcoinEthereumNews.com. Aave DAO is gearing up for a significant overhaul by shutting down over 50% of underperforming L2 instances. It is also restructuring its governance framework and deploying over $100 million to boost GHO. This could be a pivotal moment that propels Aave back to the forefront of on-chain lending or sparks unprecedented controversy within the DeFi community. Sponsored Sponsored ACI Proposes Shutting Down 50% of L2s The “State of the Union” report by the Aave Chan Initiative (ACI) paints a candid picture. After a turbulent period in the DeFi market and internal challenges, Aave (AAVE) now leads in key metrics: TVL, revenue, market share, and borrowing volume. Aave’s annual revenue of $130 million surpasses the combined cash reserves of its competitors. Tokenomics improvements and the AAVE token buyback program have also contributed to the ecosystem’s growth. Aave global metrics. Source: Aave However, the ACI’s report also highlights several pain points. First, regarding the Layer-2 (L2) strategy. While Aave’s L2 strategy was once a key driver of success, it is no longer fit for purpose. Over half of Aave’s instances on L2s and alt-L1s are not economically viable. Based on year-to-date data, over 86.6% of Aave’s revenue comes from the mainnet, indicating that everything else is a side quest. On this basis, ACI proposes closing underperforming networks. The DAO should invest in key networks with significant differentiators. Second, ACI is pushing for a complete overhaul of the “friendly fork” framework, as most have been unimpressive regarding TVL and revenue. In some cases, attackers have exploited them to Aave’s detriment, as seen with Spark. Sponsored Sponsored “The friendly fork model had a good intention but bad execution where the DAO was too friendly towards these forks, allowing the DAO only little upside,” the report states. Third, the instance model, once a smart…
Share
BitcoinEthereumNews2025/09/18 02:28