Skip to content

Instantly share code, notes, and snippets.

@Andrewpk
Last active August 10, 2024 20:30
Show Gist options
  • Save Andrewpk/65f214e506796e12434895b09687fa86 to your computer and use it in GitHub Desktop.
Save Andrewpk/65f214e506796e12434895b09687fa86 to your computer and use it in GitHub Desktop.
tailscale docker-compose example
version: '3.8'
services:
tailscale:
image: tailscale/tailscale:stable
container_name: tailscaled
privileged: true
volumes:
- /dev/net/tun:/dev/net/tun
- tailscale-data:/var/lib/tailscale
network_mode: "host"
environment:
- TS_STATE_DIR=/var/lib/tailscale
- TS_AUTHKEY=${TS_AUTHKEY}
- TS_EXTRA_ARGS=--advertise-exit-node
restart: unless-stopped
cap_add:
- NET_ADMIN
volumes:
tailscale-data:
@Andrewpk
Copy link
Author

Running Tailscale in Docker

Remember to:

  • Set the env var for TS_AUTHKEY to your key you've created in tailscale's admin UI.
  • Go to your newly connected machine, change route settings, and toggle the exit node switch to on

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