Nandling

Headscale

Use this when the coordination server is yours. The Tailscale quick start is the usual path. OpenVPN is the other one.

Nandling does not use its own coordination server for your database, and it does not use its own relay. Those are for Nandling’s machines.

1. Install Headscale

Follow Headscale’s own setup. The server needs a name your computers can reach, with https://.

2. A user and a key

Create a user on that server, then a pre-auth key for that user. Headscale’s getting started shows the command. Make the key reusable, and do not make it ephemeral. An ephemeral node is deleted when it stops, and the address goes with it.

The policy can use the same shape as the Tailscale ACL. Headscale’s policy file is documented in their ACL reference.

3. A Nandling account and 10MB of reserve

Create the account, then on Databases request 10MB of reserve. If a grant is open, it is added to the pool. If none is open, the request still goes in, and it can take a while. It is not a separate database.

4. Paste the server and the key

On Databases, set Network to Headscale. The server is the Headscale URL, including https://. The provisioning key is the pre-auth key. Save.

One key enrolls every database on the account. A database page can hold a different server and key for that database only.

Headscale does not issue a certificate. Nandling signs one for that database and renews it. The database page can import your own certificate, private key, and chain. sslmode=require encrypts without checking the name.

5. Install the client and connect

Install the Tailscale client and point it at your Headscale server. Headscale’s docs show the login command for each system. Then install the PostgreSQL client.

The database page has the user, the password, and the connection line:

psql "host=NAME port=5432 user=USER dbname=USER sslmode=require"

Stop and start are on that same page, under Power. Stopping does not change the price. Moving data is pg_dump into and out of this database.

A replica is a second machine, so it needs a second pre-auth key. The copy runs over this tailnet. Replication is the setup, the switch, and the failover log.