Skip to content

Instantly share code, notes, and snippets.

@jaichandra
Created April 27, 2025 14:04
Show Gist options
  • Save jaichandra/ea9d4b2223ef7991007d7ae03c7044e3 to your computer and use it in GitHub Desktop.
Save jaichandra/ea9d4b2223ef7991007d7ae03c7044e3 to your computer and use it in GitHub Desktop.
Setup Tailscale with Docker compose
---
version: "3.7"
services:
tailscale:
image: tailscale/tailscale:latest
container_name: tailscale
hostname: tailscale-nas
environment:
- TS_AUTHKEY=<AUTHKEY HERE...>
- TS_STATE_DIR=/var/lib/tailscale
- TS_USERSPACE=false
- TS_EXTRA_ARGS=--advertise-exit-node
- TS_ROUTES=192.168.0.0/24,192.168.10.0/24,192.168.20.0/24,192.168.30.0/24
volumes:
- ${PWD}/tailscale/state:/var/lib/tailscale
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- NET_ADMIN
restart: unless-stopped
nginx-tailscale:
image: nginx
network_mode: service:tailscale
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment