Tailscale is one of the easiest ways to set up a secure VPN mesh network across all your devices. If you’re running TrueNAS SCALE and prefer containerized deployments, you can run Tailscale inside Docker using Dockge (a self-hosted Docker Compose stack manager).
This guide will show you step by step how to deploy Tailscale on TrueNAS with Dockge.Thankfully, with open-source technologies, you can build your own private cloud productivity suite on a VPS — with full control, better privacy, and no recurring subscription fees.
We’re creating a self-hosted alternative to cloud services like Google Workspace and Microsoft 365. You’ll be able to:
Sync files across devices
Edit documents online (Word, Excel, etc.)
Use calendar, tasks, mail client
Share and collaborate — securely & privately
We’ll use:
TrueNAS SCALE – Base OS with storage + apps (Docker & Kubernetes ready)
Docker(Dockge): Container engine to manage apps like Nextcloud
Nextcloud: The all-in-one collaboration suite
Cloudflare Tunnel: Free & secure access to your server over the internet
A working TrueNAS SCALE installation
Dockge installed and running (used to manage docker-compose files)
Internet access on your NAS
Go to Tailscale.com
Click Sign Up and create a free account using Google, Microsoft, GitHub, or any email.
Once logged in, open the Admin Console → Settings → Keys
Generate a new Auth Key (copy this, you’ll use it later).
In Dockge, add a new project (for example, call it tailscale) and paste the following docker-compose.yml:
services:
tailscale:
image: tailscale/tailscale
restart: unless-stopped
volumes:
- /mnt/tank/configs/tailscale:/var/lib
- /dev/net/tun:/dev/net/tun
environment:
- TS_AUTHKEY= # Add your Tailscale Auth Key
- TS_ROUTES= # Add your LAN subnet /24
- TS_STATE_DIR=/var/lib/tailscale
- TS_EXTRA_ARGS=--advertise-exit-node
- TS_USERSPACE=false
network_mode: host
cap_add:
- NET_ADMIN
- NET_RAW
TS_AUTHKEY → Your Tailscale authentication key (from Step 1)
TS_ROUTES → The local subnet you want to route through Tailscale (example: 192.168.1.0/24)
TS_EXTRA_ARGS → Adds options like --advertise-exit-node so your TrueNAS can serve as an exit node
Save the compose file in Dockge and deploy it. Dockge will pull the Tailscale image and start the container.
You can check the logs in Dockge to confirm Tailscale is connected.
Open the Tailscale Admin Console
You should see your TrueNAS device listed as online
If you added --advertise-exit-node, you’ll have the option to use your NAS as an exit node
If you specified a subnet in TS_ROUTES (e.g., 192.168.1.0/24), approve the subnet router in the Admin Console → Machines tab.
That’s it — you now have Tailscale running inside Docker on TrueNAS SCALE, managed by Dockge. With this setup, your NAS is securely accessible from anywhere, and you can even use it as a subnet router or exit node.
Quick access anytime