install Tailscale on PVE by portainer docker
https://gist.github.com/bnhf/fed4cc3035f32a0f086b1da074a3d50b
version: '3.9'
services:
tailscale:
image: tailscale/tailscale:latest
container_name: tailscale
cap_add:
- NET_ADMIN
- NET_RAW
environment:
# - TS_HOSTNAME=${TS_HOSTNAME} # Usually not necessary for your hostname to be the same name on the tailscale network
# - TS_AUTHKEY=${TS_AUTHKEY} # Generate auth keys here: https://login.tailscale.com/admin/settings/keys
# - TS_ROUTES=${TS_ROUTES} # Creates a subnet router for Tailscale. Use your subnet's CIDR in the form: 192.168.1.0/24
# - TS_ACCEPT_DNS=${TS_ACCEPT_DNS} # Set to false for Pi-hole Docker setups
- TS_SOCKET=/var/run/tailscale/tailscaled.sock # Specifying the /var/lib/tailscale/tailscaled.sock location allows use of standard Tailscale commands
# - TS_EXTRA_ARGS=--accept-routes=192.168.88.0/24 --reset # Add any other supported arguments in the docker commandline style: e.g. --advertise-exit-node
- TS_STATE_DIR=$/var/lib/tailscale # Required to create a persistent container state that will survive reboots
- TS_ROUTES=192.168.88.0/24
volumes:
- /data:/var/lib # Creates a tailscale directory under /data for persistence
- /dev/net/tun:/dev/net/tun
network_mode: host
restart: unless-stopped
评论
发表评论