Running Postgres over Tailscale or a VPN
How CoyoteDB nodes talk over Tailscale, Twingate, a site-to-site VPN or a plain LAN using one encrypted port, and what kinds of links it is built for.
CoyoteDB nodes need to reach each other. They do not need to be in the same room, but they do need a private network where they can always find each other.
One encrypted port
Nodes talk to each other over one encrypted port. Your apps connect on the normal Postgres port. Nothing else needs to be opened between the computers.
Networks it works over
- Plain LAN. Computers on the same local network. Nothing extra needed.
- Tailscale. Run nodes on your tailnet and they reach each other directly, wherever the computers are. Postgres over Tailscale is a good fit for homelabs and for small teams spread over a few places.
- Twingate. Run nodes behind Twingate and connect them through it.
- A site-to-site VPN, for example UniFi. Link computers in two offices or two homes, so each site holds a full copy.
These are other companies’ products; CoyoteDB simply works over the network they provide.
What links it is built for
CoyoteDB is built for a few computers on links like these: one building, a few homes, or a few sites joined by a VPN. It is not built for spreading one database across the world. Every save waits for a second computer (see what “saved on two computers” means), so the link between data nodes should be steady.
- Wired or solid Wi-Fi beats flaky links. The nodes check on each other all the time, and a link that keeps dropping looks like a computer that keeps dying.
- Not everything on one power strip or one internet line. If you can, put the witness in a different place or on a small cloud server, so one power cut or one router failure cannot take out the majority. See How automatic failover works.
Setting up the network
The setup guide shows the steps for your system, number of computers and network. For examples of what this looks like in practice, see Use cases.