7422. The Docker Compose bundle
leaves the hub out, so private regions are off until you add it. This page adds it to an install
made with Install with Docker Compose.
When you’re done, workspace owners see Settings → Region in the dashboard, where they create a
private region and get its install command.
Before you begin
You need:- Fonoster installed with Docker Compose and served over HTTPS, with
TLS_CERTandTLS_KEYset in.env. Regions link to the hub over TLS with the same certificate, at the same domain (for examplevoice.example.com). - TCP port
7422open to the internet on this machine. Regions connect to it; nothing connects out.
fonoster folder.
Add the region hub
1
Generate the hub's keys and config
Run the hub setup from the API server image. It writes the hub’s config, the region-signing
key and the hub’s credentials into It prints The leaf port needs TLS, so the command asks for the certificate and key as the hub’s NATS server
will see them. For a local stack only, pass
config/:region hub material in /out and writes config/region-hub.conf,
config/keys/region-signing.pem and four files in config/keys/region-hub/. Running it again
leaves existing files alone.With the fonoster-region CLI (the region agent image or package) the same step is one command,
fonoster-region hub init. It writes the same files, all readable only by you (0600), keeps
any that already exist, and prints the next steps:--allow-no-tls instead; --leaf-port changes the
default 7422.The API server runs as another user, so let it read the new keys:2
Create an operator key
The operator key protects the region admin API, which manages public regions. Create one:You can skip it: private regions work without it, and the admin API stays off.
3
Run the hub
Save this as Then add it to
compose.regions.yaml, next to compose.yaml. It runs the hub with your
certificate and makes the API server wait for it:COMPOSE_FILE in .env:4
Connect the API server to the hub
Open
config/fonoster.example.yaml. Keep the regions.public list as it is and add these keys
under regions, with your domain in leafUrl:Edit the example, not
config/fonoster.yaml: init writes that file again from the example.5
Write the config and restart
Write and check the config, then start the hub and recreate the API server:
Check that it works
The API server says at start whether private regions are on:enrolled regions on; admin API on. If it says off, check signingKey and
hub in config/fonoster.example.yaml, and that region-hub is healthy in docker compose ps.
With an operator key, list every region through the admin API: