Reach apps over Tailscale
Put an app on your Tailscale network when only your own devices should reach it, such as an internal tool or an admin panel. Devices on your tailnet reach the app at a private address, so the app needs no public URL or open port.
Orchard runs a Tailscale proxy pod next to the app, in the same namespace. The proxy joins your tailnet with your auth key and forwards traffic to the app’s Service. The app’s own pods do not change or restart.
Prerequisites
Section titled “Prerequisites”- A Tailscale account.
- Edit access to the project.
- On an instance that uses PostHog, the Tailscale feature turned on for your account. Go to Account settings > Early access. On an instance with no PostHog key, the feature is always on.
Link your tailnet
Section titled “Link your tailnet”An auth key connects your Orchard account to your tailnet. Each person links their own key.
- In the Tailscale admin console, go to Settings > Keys and select Generate auth key.
- Turn on Reusable and Ephemeral. Leave the tags empty.
- Set the key to expire in 90 days, the longest period Tailscale allows.
- Copy the key. It starts with
tskey-auth-.
- Go to Account settings > Connections.
- In Tailscale, select Connect.
- Paste the auth key and select Connect.
orchard tailscale linkThe command prompts for the key. You can also set ORCHARD_TS_AUTHKEY or pass --auth-key.
Orchard encrypts the key before it stores it.
Put an app on your tailnet
Section titled “Put an app on your tailnet”- Open the app and go to the Network tab.
- In Ports, turn on the Tailscale switch.
The address appears in the same row when the proxy joins the tailnet.
orchard tailscale expose <deployment-id>orchard tailscale get <deployment-id>The device name on your tailnet is <app>-<namespace>. With MagicDNS on, the address is:
<app>-<namespace>.<tailnet>.ts.netTailscale access controls apply to this device in the same way as to any other device on your tailnet.
Remove an app from your tailnet
Section titled “Remove an app from your tailnet”- Open the app and go to the Network tab.
- In Ports, turn off the Tailscale switch.
orchard tailscale unexpose <deployment-id>Orchard deletes the proxy pod and its copy of the auth key. Orchard also removes the proxy when you delete the app or its project.
Unlink your tailnet
Section titled “Unlink your tailnet”Go to Account settings > Connections, and in Tailscale, select Disconnect. In the CLI, run orchard tailscale unlink.
When an auth key expires
Section titled “When an auth key expires”A proxy uses its auth key when it joins your tailnet. After the key expires, a proxy that has to join again fails, and new apps cannot join.
To replace the key:
- Generate a new auth key and link your tailnet again. The new key replaces the old one on your account.
- For each app, turn the Tailscale switch off and on. Each proxy keeps its own copy of the key, so an app only gets the new key when its proxy is created again.
Related resources
Section titled “Related resources”- Configure app networking - Set up ports, reach, and how traffic gets to an app.
- Protect an app - Require a sign-in or a password before a public URL opens.
orchard tailscalereference - Every flag of theorchard tailscalecommands.