[Unit] Description=Tailscale node agent Documentation=https://tailscale.com/kb/ Wants=network-pre.target After=network-pre.target [Service] EnvironmentFile=/etc/default/tailscaled ExecStartPre=/usr/sbin/tailscaled --cleanup ExecStart=/usr/sbin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock --port $PORT $FLAGS ExecStopPost=/usr/sbin/tailscaled --cleanup Restart=on-failure RuntimeDirectory=tailscale RuntimeDirectoryMode=0755 StateDirectory=tailscale StateDirectoryMode=0750 CacheDirectory=tailscale CacheDirectoryMode=0750 Type=notify DeviceAllow=/dev/net/tun DeviceAllow=/dev/null DeviceAllow=/dev/random DeviceAllow=/dev/urandom DevicePolicy=strict LockPersonality=true MemoryDenyWriteExecute=true PrivateTmp=true ProtectClock=true ProtectControlGroups=true ProtectHome=true ProtectKernelTunables=true ProtectSystem=strict ReadWritePaths=/etc/ ReadWritePaths=/run/ ReadWritePaths=/var/run/ RestrictSUIDSGID=true SystemCallArchitectures=native [Install] WantedBy=multi-user.target