Skip to main content
The install ships its own Postgres. To use one you manage instead, point every service at it through config/overrides/, turn the bundled database off, and start. Do this on a new install: the bundled database’s data isn’t moved.

Before you begin

  • Fonoster downloaded and unpacked, but not started yet, see Install with Docker Compose.
  • A Postgres you can reach from this machine, over TLS. Every URL below ends in ?sslmode=require; keep it, or the password and your call data travel in clear. Certificate verification (sslmode=verify-full) isn’t covered here.
  • Docker Compose v2, as the install page says.

Create the databases

Create three empty databases. The API server creates the tables in fonoster and fnidentity on every start, and Routr does the same in routr:

Point every service at it

Each service takes its database from its override file, with the same credentials in all four. This sets the API server’s and Identity’s:
config/overrides/fonoster.yaml
AppBridge and Autopilot share the API server’s database:
config/overrides/appbridge.yaml
config/overrides/autopilot.yaml
Routr has its own:
config/overrides/routr-one.yaml
These files hold the database password. Keep them readable by you only, and back them up with .env:
Set the Routr database here, not as a DATABASE_URL variable on the routr service. Since 0.35.0 that variable is ignored: Routr reads config/routr-one.yaml, and docker compose logs routr prints DATABASE_URL is ignored; spec.database.url in /etc/routr/one.yaml wins.

Turn the bundled Postgres off

The compose.external-db.yaml overlay that ships with the install keeps the bundled postgres from starting. Turn it on in .env (add :compose.http.yaml after it if you serve plain HTTP):
.env
This is what it does:
compose.external-db.yaml

Generate, check and start

Write the configuration with the overrides merged in:
Check the files. This validates what you wrote, not the connection:
Start, and wait for every service to be healthy. This is what proves the database is reachable:
If routr can’t reach its database, it reports unhealthy and the command exits with an error. Fix the URL in config/overrides/routr-one.yaml, run init again and start again. See what’s running:
postgres isn’t listed, and routr shows healthy.
Every service runs against your database.
On an external Postgres, the registry tool on Add providers to the catalog needs your database URL in FONOSTER_REGISTRY_DATABASE_URL instead of the bundled one.