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 secrets set WEBPASSWORD=<admin interface password here>
- Run the command
fly deploy --remote-only
- Test it out with
dig @${APP_NAME}.fly.dev google.com
- If $STEP-1 worked, navigate to the Tailscale admin interface, grab the IP of your instance, then navigate to the "DNS" tab and add the IP as a nameserver. Make sure to activate "Override local DNS" in order to be able to use it on iOS and not have to configure the nameservers manually on every device.
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)