Tailscale - Private VPN

March 09, 2025

docker · networking · vpn

Tailscale is used to create a secure mesh network between devices and services. It simplifies internal access without exposing services publicly.

This is particularly useful for administrative access and debugging.

Docker Compose

code
version: "3.8"
services:
tailscale:
image: tailscale/tailscale:latest
container_name: tailscale
network_mode: host
volumes:
- /mnt/nas/tailscale:/var/lib/tailscale
env_file:
- .env
restart: unless-stopped

Explanation

  • network_mode: host: Required for proper networking
  • volume: Stores node identity and state
  • env_file: Contains auth key

Notes

  • Eliminates need for VPN server setup
  • Useful fallback if Cloudflare is unavailable
  • Works well for private service access