Keep It Local

oalders2 pts0 comments

Keep It Local · olafalders.com&darr;<br>Skip to main content

Latest Articles

Hire Me

Projects

PrettyGoodPing

is: an inspector for your environment

MetaCPAN

My dotfiles

Categories

About

Feed

Table of Contents<br>Table of Contents

Who wants to talk about networking today? I know I do. Two<br>addresses do most of the heavy lifting here: 127.0.0.1 (aka localhost or the<br>loopback address — only your own machine can reach it) and 0.0.0.0 (bind to<br>this and you&rsquo;re reachable on every network interface). See<br>Localhost and<br>0.0.0.0 for a refresher.<br>clodhopper<br>Yesterday I talked about clodhopper, my<br>personal Claude Code dashboard. It collects data from your running agents and<br>spins up a read-only app to show their status. By default, it<br>binds to localhost (127.0.0.1), which means I don&rsquo;t accidentally broadcast my<br>workflows to the world. I also run it on my Tailscale network, which means I can view it on my<br>own private network, but the world can&rsquo;t. I was doing this by interpolating the<br>Tailscale IP in the startup command: clodhopper serve --host "$(tailscale ip -4)". Today I added a --tailscale arg, to make this a touch easier.<br># Default: loopback only — only this machine can reach it<br>clodhopper serve

# Don't do this on an untrusted network — binds every interface<br>CLODHOPPER_HOST=0.0.0.0 clodhopper serve

# Tailnet only — reachable from your tailnet (subject to ACLs), not the LAN<br>clodhopper serve --tailscale

So, that&rsquo;s all fine, but we are now living in a world where anyone can spin up a custom app on their machine and accidentally broadcast it to the world. Is this bad? Not always, but consider the following:<br>your app keeps secrets in .env<br>your app spins up a web server<br>.env somehow ends up in the path that your app is serving<br>random bot sniffs out your app and fetches .env<br>now you need to rotate your secrets and you may not even be aware that your secrets are in the hands of a bad actor

"Localhost" by Wesley Nitsckie is licensed under CC BY-SA 2.0.<br>Ideally you&rsquo;d restrict access to your resources to only the audiences which<br>require them. So, defaulting to localhost and then expanding your reach from<br>there is a good way to go. In my case I&rsquo;ve been enjoying using a<br>Tailscale tailnet. Only my own authenticated devices<br>can connect. Internet creeping will have to take place elsewhere, because my<br>apps are now for my eyes only.<br>Moving beyond clodhopper, here are ways to apply the same principle to some open source apps.<br>air<br>air runs full_bin through a shell, so<br>you can interpolate tailscale ip -4 straight into your app&rsquo;s host flag in<br>.air.toml — no hardcoded address:<br>[build]<br># Loopback only<br>full_bin = "./tmp/main -port 5003 -host 127.0.0.1"

# Tailnet only — resolved at startup, no hardcoded address<br>full_bin = "./tmp/main -port 5003 -host $(tailscale ip -4)"

Python&rsquo;s built-in file server<br>http.server binds 0.0.0.0 by default — pass an explicit --bind.<br># Default binds 0.0.0.0 (all interfaces)<br>python3 -m http.server 5000

# Loopback only<br>python3 -m http.server 5000 --bind 127.0.0.1

# Tailnet only<br>python3 -m http.server 5000 --bind "$(tailscale ip -4)"

App::HTTPThis<br>App::HTTPThis<br>serves the current directory over HTTP.<br>Use --host to control the bind address.<br># Loopback only<br>http_this --host 127.0.0.1

# Tailnet only<br>http_this --host "$(tailscale ip -4)"

nota bene: the current version of http_this binds to every interface<br>but emits a message that implies that it is binding only to 127.0.0.1.<br>$ http_this .<br>Exporting '.', available at:<br>http://127.0.0.1:7007/

😬 Today I opened #13 to<br>clarify the behaviour, but maybe take this as a reminder that it&rsquo;s good to be<br>explicit about the things that really matter, rather than relying on the<br>defaults.

Related

On GitHub Issues as Untrusted Input<br>June 25, 2026·628 words·3 mins<br>AI<br>security

Claude Will Find a Way<br>June 11, 2026·804 words·4 mins<br>AI<br>security

Enabling Private Vulnerability Reporting<br>May 26, 2026·356 words·2 mins<br>security<br>github

&uarr;

tailscale rsquo clodhopper host tailnet server

Related Articles