Tailscale® meets Adguard in a tiny Docker container.
6.3K
Tailscale® meets Adguard in a tiny Docker container.
I wanted a simple and lightweight way to deploy Tailscale exit nodes & Adguard ad blocking to low powered (1 shared CPU, 265mb memory) VPS's around the world. I have these running on the fly.io legacy free tier but they should work anywhere containers are run.
Tail-guard takes the same environment variables as the official Tailscale Docker container.
Note: I haven't thoroughly tested all flags so you may find bugs.
MODIFY_RESOLVCONF: Some hosts need the resolv.conf to be modified to listen on 127.0.0.1/::1 or Adguard won't receive local queries. Defaults to false.
TS_ACCEPT_DNS: Accept DNS configuration from the admin console. Not accepted by default.
TS_AUTH_ONCE: Attempt to log in only if not already logged in. False by default, to forcibly log in every time the container starts.
TS_AUTHKEY: A Tailscale auth key used to authenticate the container.
TS_DEST_IP: Proxy all incoming Tailscale traffic to the specified destination IP.
TS_KUBE_SECRET: If running in Kubernetes, the Kubernetes secret name where Tailscale state is stored. The default is tailscale.
TS_HOSTNAME: Use the specified hostname for the node.
TS_OUTBOUND_HTTP_PROXY_LISTEN: Set an address and port for the HTTP proxy.
TS_ROUTES: Advertises subnet routes. Equivalent to tailscale set --advertise-routes=. To accept advertised routes, use TS_EXTRA_ARGS to pass in --accept-routes.
TS_SOCKET: Unix socket path used by the Tailscale binary, where the tailscaled LocalAPI socket is created. The default is /var/run/tailscale/tailscaled.sock.
TS_SOCKS5_SERVER: Set an address and port for the SOCKS5 proxy.
TS_STATE_DIR: Directory where the state of tailscaled is stored. This needs to persist across container restarts.
TS_USERSPACE: Enable userspace networking, instead of kernel networking. Enabled by default.
TS_EXTRA_ARGS: any other CLI flags for tailscale set
TS_TAILSCALED_EXTRA_ARGS: any other flags for tailscaled
tail-guard:
image: ghcr.io/hucknz/tail-guard:latest
container_name: tail-guard
environment:
- TS_AUTHKEY='tskey-auth-'
- TS_HOSTNAME='tail-guard'
- TS_EXTRA_ARGS= '--advertise-exit-node --accept-routes'
restart: unless-stopped
volumes:
- /tailguard/tailscale:/data/tailscale
- /tailguard/adguardhome/work:/data/adguard/work
- /tailguard/adguardhome/conf:/data/adguard/conf
ports:
- '53:53/udp'
- '53:53/tcp'
- '3000:3000/tcp'
- '8008:80/tcp'
If you find any other problems feel free to raise an issue.
Content type
Image
Digest
sha256:5484cb371…
Size
57.5 MB
Last updated
3 days ago
docker pull hucknz/tail-guard