Skip to content

Getting started

This page takes you from a clone to an operator console with a first organisation in it. Taking calls, HTTPS and running on a server are in Deploying to a server.

Start the stack

You need Docker with the compose plugin.

git clone https://github.com/siphon-project/siphon-pbx.git
cd siphon-pbx/deploy
docker compose up -d
docker compose logs siphon-pbx | grep setup    # the one-time link to create the operator account

That pulls the published image of the release your checkout names, ghcr.io/siphon-project/siphon-pbx (linux/amd64 and linux/arm64; X.Y.Z, X.Y, X and latest tags), and never builds. SIPHON_PBX_IMAGE names another one. To build the image from your checkout instead, add the build layer, which tags the result siphon-pbx:local:

docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build

Each compose layer that runs the image (see Deploying to a server) has a build layer of its own (docker-compose.telephony.build.yml, docker-compose.tls.build.yml): name it after the layer it builds for.

Create the operator account

Open the link from the log. It carries a code that works once, so a freshly started box on a public address cannot be claimed by whoever reaches it first. It opens the operator console, at the address in SIPHON_PBX_PUBLIC_URL: set that to the address you run siphon-pbx at (https:// also makes the session cookies secure), and SIPHON_PBX_PORT to publish another port.

Add the first organisation

In the console, create an organisation, give it a hostname and invite its first administrator. The invite link opens setup on that hostname, and from then on the organisation's people sign in there and nowhere else. A hostname is a DNS name pointing at siphon-pbx; the operator's own address and IP addresses cannot be one, and any address that is neither shows nothing.

Behind a reverse proxy, pass the Host header through unchanged (proxy_set_header Host $host; in nginx): it is how siphon-pbx tells the operator console and each organisation apart.

When someone is locked out

A forgotten password is reset where siphon-pbx runs, by whoever can run it there:

docker compose run --rm --no-deps siphon-pbx reset-password --operator operator@example.com
docker compose run --rm --no-deps siphon-pbx reset-password --organisation office.example.com admin@example.com

It prints a new password once and ends every session of the account. Two-step sign-in and passkeys stay.

An organisation that allows its identity provider only, while the provider is down, has no way in: it refuses passwords. An operator undoes that from the organisation's page in the console, or where siphon-pbx runs:

docker compose run --rm --no-deps siphon-pbx reset-sign-in-methods --organisation office.example.com --as operator@example.com

It allows every way in again, changes nothing else of the provider's setup, and is recorded against that operator.

Branding from configuration management

The deployment's brand can be set from a directory instead of the console, for configuration management: docker compose run --rm brand-apply applies brand.yaml and its files (format in the architecture, under Branding) and says whether anything changed.

Running from source

From source, against a Postgres of your own:

(cd web && npm ci && npm run build)     # the UI is embedded in the binary
cargo run --release -- --config siphon-pbx.yaml

Configuration

Configuration is a small YAML file, or environment variables on top of it. The configuration reference lists every variable: what it does, its default, which compose layer passes it, who reads it, and what has to restart when it changes. Everything about the PBX itself lives in the database and is edited in the UI.

The master key

Some secrets siphon-pbx has to read back, such as a trunk's password or an authenticator app's secret, so they cannot be kept as digests the way sign-in passwords, phone passwords and tokens are. They are sealed instead, with AES-256-GCM under a master key: 32 random bytes that init-secrets writes to master_key in the secrets volume on first start, readable by siphon-pbx's user alone, and never replaces. SIPHON_PBX_MASTER_KEY_FILE (master_key_file in the YAML) names the file, and the compose stack sets it. siphon-pbx refuses to start on a key file it cannot read or that does not hold 64 hexadecimal characters. Without a key configured it starts, warns, and stores no such secret.

Back the key up together with the database, and store the two copies apart. A database without its key is a database whose sealed secrets nobody can recover; each has to be entered again. A copy that holds both is as good as those secrets in plain text. Running init-secrets as another user than root, or for a siphon-pbx that runs as a uid other than the image's 10001, takes --key-owner <uid>.