This project provides an automated way to set up a Tailscale exit node and subnet router using Docker on Linux or Raspberry Pi.
setup_tailscale.sh: The main installation and configuration script.
-
Prepare the Script: Ensure the script is executable:
chmod +x setup_tailscale.sh
-
Run the Script: Execute with root privileges:
sudo ./setup_tailscale.sh
-
Follow the Prompts:
- IP Forwarding: The script will enable this for you.
- Auth Key: Provide a Tailscale Auth Key if you have one, or use the Login URL provided during execution.
- Subnets: Select which local subnets you want to advertise to your Tailnet.
- Exit Node: Confirm if you want this node to act as an Exit Node.
After the script completes, you must manually approve the routes:
- Open the Tailscale Admin Console.
- Find your new machine (e.g.,
tailscale-node). - Click the "..." menu or machine name -> Edit route settings.
- Enable "Exit node".
- Enable the checkboxes for your Advertised routes (subnets).
- Check Status: Run
./setup_tailscale.sh --health. - View Logs: Run
docker logs -f tailscale-node. - Restart: The container is set to
alwaysrestart, so it will persist across reboots.