Tailscale
Connect to your containers and databases from devices on your Tailscale tailnet. Beta.
A Tailscale connector joins your tailnet as one device. Your devices reach the selected services through that device. You need a Tailscale account, and a device on the tailnet that runs the client.
1. Make an auth key
Section titled “1. Make an auth key”In the Tailscale admin console, open Settings, then Keys. Select Generate auth key. Set:
| Setting | Value |
|---|---|
| Reusable | On |
| Ephemeral | On |
| Tags | One tag, for example tag:pms. The tag must be in your tailnet policy file, under tagOwners. |
Copy the key. It starts with tskey-. Tailscale shows it one time.
2. Turn on the connector
Section titled “2. Turn on the connector”In the console, open Networking, then the Tailscale card. Paste the key and select Enable.
With the CLI, save the key in a private file and give the file. Do not put the key on the command line:
chmod 600 ~/.config/pms/tailscale-keypms network tailscale enable --auth-key-file ~/.config/pms/tailscale-keyTo use standard input, run pms network tailscale enable with no flag and pipe the key to it.
To replace the key, turn the connector on again with the new key. To turn it off:
pms network tailscale disable3. Choose the services
Section titled “3. Choose the services”In the Networking page, check each container port or database that Tailscale can reach. Each service has an external port. The default external port is the service port.
With the CLI:
pms network expose web --port 3000 --via tailscalepms network expose db --via tailscale4. Check the connector
Section titled “4. Check the connector”Run pms network show, or open Networking in the console. The Tailscale status must be Connected. The address appears when the connector knows its tailnet name.
5. Connect
Section titled “5. Connect”The address has this form:
<project>.<tailnet>.ts.net:<external port>Use the address that the console shows. Example for the database:
postgres://app:<password>@<project>.<tailnet>.ts.net:5432/appUse the database password from when you created the database. Use the external port that the console shows.
Two services on one port
Section titled “Two services on one port”Two services cannot use the same external port. If a container and the database both use port 5432, set a different external port for one of them. For example, set the container to 5433:
pms network expose api --port 5432 --via tailscale --external-port 5433Then connect to <project>.<tailnet>.ts.net:5433.
Access and limits
Section titled “Access and limits”- Your tailnet ACL decides which devices can connect to the connector. Set the ACL in the Tailscale admin console.
- PMServers does not set subnet routes or an exit node. The connector gives access only to the services that you select. It does not give access to your project network.
- The connector uses 0.1 vCPU and 128 MiB. See Networking.
Problems
Section titled “Problems”- Status is Stopped: the key is wrong, expired, used up or has no tag in the policy file. Make a new key, then turn on the connector again.
- Status is Disconnected: the connector has no link to Tailscale yet. Wait a minute. If it stays, check the key.
- No address: the connector has not learned its tailnet name yet. Wait for the status to be Connected.
- Connection times out: check that your device is on the tailnet, that the ACL allows it, and that the service is in the selected list. Check the external port.