Skip to content

Instantly share code, notes, and snippets.

@LuckyGeck
Last active December 17, 2023 06:54
Show Gist options
  • Save LuckyGeck/a72a5ec3f72564d11ad5d7fc1e6dded6 to your computer and use it in GitHub Desktop.
Save LuckyGeck/a72a5ec3f72564d11ad5d7fc1e6dded6 to your computer and use it in GitHub Desktop.
Tailscale exit node on Fly.io
app = "fly-scale"
[env]
PATH="/usr/local/bin"
TS_EXTRA_ARGS="--hostname=fly --advertise-exit-node"
[build]
image = "tailscale/tailscale:stable"
[deploy]
strategy="immediate"
[mounts]
source="ts_data"
destination="/var"

How to setup Tailscale exit note on fly.io

Install and authenticate your flyctl

$ brew install flyctl
$ flyctl auth login

Create a fly.io app from the provided fly.toml file

$ flyctl launch --copy-config

Set the TS_AUTH_KEY env var for the current app.

$ flyctl secrets set TS_AUTH_KEY=tskey-xxxxx

Create a volume to persist tailscale db.

$ fly volumes create ts_data --region fra --size 1

Re-deploy, if you change some settings

$ flyctl deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment