How to do it:
- Get set up with Fly.io (only install
flyctl
and create an account/login) - Get set up with Tailscale
- Clone this repo
- Run the command
fly launch --name $APP_NAME --no-deploy
and answer the prompts (pick your own $APP_NAME) - Create an auth key in Tailscale and copy it to clipboard
- Run the command
fly secrets set TAILSCALE_AUTHKEY=<paste auth key here>
- Run the command
fly deploy --remote-only
- Test it out with
dig @${APP_NAME}.fly.dev google.com
- If $STEP-1 worked, get the IP address of the Tailscale interface (from the Tailscale admin) and set that as your DNS resolver (in
/etc/resolv.conf
, Advanced tab of macOS's Networking panel in System Preferences, iOS, etc.)
Reading/Reference:
- Pi-Hole Docker image
- Stuff Your Pi-Hole From Anywhere (Fly.io blog)
- Free, private pi-hole hosting with Fly.io and Tailscale
- Tailscale on fly.io (Tailscale docs)
- Need to use legacy iptables when adding Tailscale to Linux (GitHub issue comment)
- Trying to follow the "Fly-Hole" tutorial... (Fly.io forum post)
- Self-hosted RethinkDNS (Pi-Hole alternative)