OpenVPN
One profile, one database. The Tailscale quick start is the usual path. Headscale is the other one.
1. A profile that is TCP
Build the client profile on the OpenVPN server you already run. OpenVPN’s community downloads and the reference manual are the source for the settings.
proto tcp-client, orproto tcp. A profile that only listens for UDP will not come up.- A
remoteyour database can reach. - No default route. Leave out
redirect-gateway. The database should not send the rest of its traffic through the tunnel.
Open the profile in a text editor. You will paste that text. There is no file upload.
2. 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.
3. Paste the profile
Open the database, set Network to OpenVPN, and paste the profile into the box. Save. The account page can hold a profile too, and a profile saved on the database is the one that database uses. OpenVPN covers that database only.
4. Connect
Install an OpenVPN client from the same downloads page on the computer you will connect from, and connect with that profile so your machine is on the VPN. Then install the PostgreSQL client.
The database page has the user, the password, and the connection line. Use the address the VPN gives the database:
psql "host=NAME port=5432 user=USER dbname=USER sslmode=require"
require encrypts and does not check the name. The connection is TLS only. Stop and start are under Power. Stopping does not change the price. Moving data is pg_dump into and out of this database.
A replica copies over a tailnet, not over OpenVPN. A database on OpenVPN cannot add one. Replication uses Tailscale or Headscale.