Repo of the Day
CoyoteDB/coyotedb
Published: Dec 4, 2026
Open repository ↗PostgreSQL 18 that stays up: automatic failover across 2-3 machines, no saved write lost
Summary
CoyoteDB is a Go program that runs unchanged PostgreSQL 18 across multiple computers, keeps copies in sync, and sends connections to the current main computer. It targets self-hosted high availability: applications can continue using standard PostgreSQL drivers, but the README identifies release 0.3.1 as something to test and back up before trusting with critical data.
What it is useful for
- PostgreSQL-compatible applications. Apps connect to port 5432 on any participating computer. The connection is forwarded over TLS to the current main node, so applications do not need a CoyoteDB-specific client or SQL changes.
- Small, self-hosted high-availability deployments. Computers can be added using one-time invite codes. The project’s stated safety model is that automatic takeover does not lose a saved write.
- Private-network deployments. Traffic between computers uses mutual TLS and can run over a LAN, Tailscale, or another private network. Linux is recommended for database computers, while the Docker image provides a Linux environment on supported Windows and macOS systems.
- Teams that need operational visibility. The included control panel and
statuscommand show which computer is main and whether the copies are healthy.
An important limitation is the witness requirement: with exactly two database computers, automatic takeover needs a small witness on a third computer. The witness stores no data and only helps the database computers agree. Without a witness, the database waits for the failed main computer to return rather than failing over automatically.
How engineers can use it
The quickest documented path is Docker. Run the same release on each computer:
docker run -d --name coyote --restart unless-stopped \
--stop-timeout 120 --shm-size 256m \
-p 127.0.0.1:7480:7480 -p 7481:7481 -p 5432:5432 -v coyote-data:/data \
coyotedb/coyote:0.3.1 setup
Retrieve the sign-in link:
docker logs coyote
docker exec coyote coyote dashboard
The setup page can start a new database or join one using an invite code from an existing computer. After forming the cluster, inspect its state and obtain application connection details with:
docker exec coyote coyote status
docker exec coyote coyote conninfo
A source build is also documented:
go build -o bin/coyote ./cmd/coyote
./bin/coyote --help
It requires the Go version listed in go.mod and no C compiler. The dashboard is a separate Node build; without it, the Go binary serves a short page instead. Before real use, test it with the actual application, keep the default backups, use the same version on every computer, and follow docker/README.md. Existing deployments should use the procedure in docs/MIGRATE.md.