Skip to main content
The API Server stores the Connect resources (Agents, Domains, Peers, Trunks, Numbers, Credentials, and Access Control Lists) and serves them over gRPC. It has two interchangeable backends that expose the same contract:
  • pgdata stores resources in PostgreSQL. It supports reads and writes, so you can manage resources with rctl and the SDK.
  • simpledata loads resources from YAML or JSON files at startup. It is read-only and suited to tests and small, static setups.

Docker images

Ports

pgdata

Environment variables

Example

This command runs pgdata against an existing database. Run the migrations image with the same DATABASE_URL first.

simpledata

Environment variables

Resource files

simpledata reads every file in PATH_TO_RESOURCES. Each file holds a YAML or JSON list of resources of any kind. By convention, use one file per kind: For the fields of each kind, see Resources.

Example

This file defines one Credentials resource.
This command runs simpledata with a local resources directory.

gRPC contract

Both backends register one service per resource kind. List takes page_size and page_token and returns items and next_page_token. FindBy takes field_name and field_value. See the Connect protos.

Notes

  • simpledata implements only Get and FindBy. Create, Update, Delete, and List return “not implemented”, so rctl and the SDK cannot manage simpledata resources.
  • simpledata exits at startup if a ref contains spaces or if two resources share the same ref.
  • pgdata stores the extended attribute of each resource as JSON. simpledata has no equivalent.
  • The fonoster/routr-pgdata image generates self-signed certificates in PATH_TO_CERTS every time it starts.
  • The internal port 51907 is always plaintext. Do not expose it outside your private network.