Created
April 27, 2025 14:04
-
-
Save jaichandra/ea9d4b2223ef7991007d7ae03c7044e3 to your computer and use it in GitHub Desktop.
Setup Tailscale with Docker compose
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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