Tailgate

Tailgate guides

Prepare your first Headscale deployment

Validate a Tailgate configuration, render a local bundle, and understand the manual steps needed to run Headscale, owned relays and private services.

The general installer is coming soon. The commands below validate and render files locally. They do not install services, enroll devices or change an existing network.

1. Get the source and check the example

You need Git and Python 3.9 or newer. These configuration tools use Python's standard library. Start with the public pilot example, which uses fictitious domains and an embedded relay.

git clone https://github.com/latchlabs-dev/tailgate.git
cd tailgate
python3 tools/tailgate.py validate examples/pilot.json
python3 tools/tailgate.py render examples/pilot.json --output build/pilot

Validation must finish successfully before you continue. Rendering requires an absent or empty output directory. If you repeat it, choose a fresh path such as build/pilot-review. Inspect the generated configuration, explicit policy, service definitions and receipts. The example is for local evaluation; its placeholder identities and addresses cannot serve a real deployment.

2. Describe your network

cp examples/pilot.json tailgate.json
# Edit tailgate.json with your deployment inputs.
python3 tools/tailgate.py validate tailgate.json
python3 tools/tailgate.py render tailgate.json --output build/my-network

Read the input contract before changing address pools, service audiences or policy storage. Draft output is for planning and must never be activated.

3. Prepare verified binaries

Choose the platform of the target host. These commands prepare Linux ARM64 artifacts; use linux_amd64 for a supported AMD64 target. Builds require the exact Go toolchain in versions.lock.json.

python3 tools/tailgate.py fetch headscale --platform linux_arm64 --output .cache/linux_arm64
python3 tools/tailgate.py fetch lego --platform linux_arm64 --output .cache/linux_arm64
python3 tools/tailgate.py fetch tailscale --platform linux_arm64 --output .cache/linux_arm64

For standalone relays, also build derper. Build the optional console separately:

python3 tools/tailgate.py build-derper --platform linux_arm64 --output .cache/linux_arm64
python3 tools/build-admin.py --platform linux_arm64 --output .cache/linux_arm64/tailgate-admin

Artifact fetching checks pinned hashes and a minimum seven-day upstream release age. Keep those checks enabled. The development guide covers platform-specific builds and smoke checks.

4. Install the bundle manually

There is no single production install command today. Host provisioning, DNS, credentials and service activation depend on your environment. Work through the component installation contracts in this order:

  1. Provision the controller and any standalone relay hosts. Set up their public DNS, maintained Nginx and the required firewall rules. Keep controller metrics and administrative listeners private.
  2. Deliver the verified binaries, rendered configuration and systemd definitions to their configured paths. Supply credentials through the documented secret references.
  3. Issue DNS-01 certificates using staging first, then public issuance. Install certificates with the expected permissions, schedule renewal and validate Nginx before reload.
  4. Initialize explicit deny-all policy before starting listeners. Database-backed approvals require initialization with the pinned Headscale offline CLI; an unset database policy is not deny-all.
  5. Start and check the controller and relays. If using the console, configure its separate Google authentication, administrator allowlist and durable approval state. Rendering the controller does not install the console.
  6. Enroll an official Tailscale client against your control URL. Review and grant only the intended device, destination and port.

For application listeners, follow the private HTTPS guide. Public control and relay endpoints are separate from private application endpoints.

5. Verify before depending on it

For isolated evaluation before production, use the disposable Docker lab. Its fictitious identities do not qualify real Google authentication. The integration checks exercise allowed and denied traffic and relay behavior in disposable fixtures.

Decide whether to operate it

You own updates, backups, certificates and outages. Read Tailgate vs hosted Tailscale before choosing who will run the control plane.