Server settings
The service settings are in /etc/kanadr/kanadr.env (root:kanadr, 0640: it contains
passwords). On a VM installed from the image, the first boot fills them in. After a change:
sudo systemctl restart kanadr.
Everything else (brand, language, time zone, email, transcription, SSO, assistant, license…) is set in the portal: see Instance settings.
Required
| Variable | Value |
|---|---|
KANADR_BASE_URL | The instance’s PostgreSQL database, shared with the telephony engine (postgres://user:password@127.0.0.1:5432/database); Kanadr creates its centrex schema in it (internal name, unchanged). |
KANADR_URL_PUBLIQUE | Public address of the portal (https://pbx.operator.example): links sent by email, phone links, passkeys. |
KANADR_MOTEUR_ADRESSE | Control connection of the telephony engine (127.0.0.1:8021). The names used before 26/10/2026 are still read. |
KANADR_MOTEUR_MOT_DE_PASSE | Its password. |
KANADR_CDR_IDENTIFIANTS | username:password expected from the telephony engine for its call records (CDRs); without them, no call reaches the log. |
KANADR_TROUSSEAU | Keyring of the encryption keys (/etc/kanadr/cles). |
Optional
| Variable | Default | For |
|---|---|---|
KANADR_PIPER, KANADR_VOIX_PIPER | absent (set by the image) | Text-to-speech (Piper program and French voice model); without it, announcements are uploaded as audio files. |
KANADR_VOIX_PIPER_EN | absent (set by the image) | English voice model, for customers set to English. Other French or English models placed in the same folder as these two voices (fr_….onnx, en_….onnx, each with its .onnx.json) are offered to customers when the service starts (see Text-to-speech). |
KANADR_HUB_URL | absent | The vendor’s Hub, which receives license reports; without it, the report is downloaded from the portal. |
KANADR_PARE_FEU | nftables | Address banning (nftables) or nothing (aucun, bans only recorded in the database). |
KANADR_TELEPHONE_WEBSOCKET | 127.0.0.1:5066 | WebSocket listener of the internal SIP profile, enabled at startup, which the binary relays for the browser softphone (/api/v1/telephone/ws); on the loopback, the telephony engine is not exposed over WebSocket. The listener opens when the engine restarts (sudo systemctl restart kanadr-moteur, which drops calls in progress). |
KANADR_TURN_HOTE | absent | Public host name of the softphone’s TURN server (coturn); without it, no ICE server is given to the browser. |
KANADR_TURN_IP_EXTERNE | absent | Public address announced by TURN behind address translation. Not needed since 31/10/2026: when absent, TURN takes the one from kanadr adresse-publique (see Commands); when set, it wins. |
KANADR_TAMPON_GIGUE_SOFTPHONE | 60:300 | Jitter buffer of the telephony engine on calls from the instance’s softphones, in Opus: 60 to 300 ms, adapted to the measured jitter; it smooths an irregular mobile network and lets the engine rebuild a lost packet (Opus FEC). <min>:<max> in milliseconds, or in 20 ms packets (3p:15p); 0 for none. |
KANADR_TAMPON_GIGUE_TRUNK | absent | The same buffer on SIP trunk and connector legs, in G.711. None by default: it delays the whole call and can disturb a fax. Worth trying if a call trace shows jitter coming from the provider. |
KANADR_BUREAU_URL | https://apt.kanadr.com/bureau | Address of the desktop app installers, published by the vendor: the portal’s Download links (/telephone/telecharger/windows, /macos) redirect there, while /telephone/telecharger/android leads to the Google Play listing of the mobile app, whatever this setting. Change it only to serve the installers from elsewhere. |
KANADR_ECOUTE | 127.0.0.1:8080 | Listening address of the portal and API, behind nginx. |
KANADR_CDR_ECOUTE | 127.0.0.1:8085 | Listening address for the telephony engine’s CDRs. |
KANADR_LOG | info | Log level (debug for troubleshooting: it may write signed links). |
KANADR_ETAT | /var/lib/kanadr | The service’s state directory: first access link of the setup, certificate request. |
KANADR_ETAT_CERTIFICAT | /var/lib/kanadr-certificat | State and log of the Let’s Encrypt certificate service, read by the portal. |
Commands
They run on the VM with sudo kanadr <command>: the command reads /etc/kanadr/kanadr.env
itself, like the service. Those that write what the service reads back (mise-en-route,
initialiser, migrate, inviter, secrets…) switch to its account, kanadr, on their own;
verifier, sauvegarder, restaurer, bascule, console and adresse-publique stay as
root. A variable given on the
command line keeps its value.
| Command | For |
|---|---|
mise-en-route | Show a new first access link (24 h, single use), also written on the console and at SSH login; no effect once the operator exists. |
initialiser --operateur … --admin-courriel … --admin-nom … | Create the operator and its first administrator, once, without the first access link (automation). |
inviter --courriel … | Print a new link to choose one’s password (email not set up yet). |
reinitialiser-second-facteur --courriel … | Lost phone: remove an account’s two-step verification and close its sessions. |
cle-api --nom … [--heures N] | Create an operator admin API key valid for 1 to 24 hours (1 by default), to set up a freshly initialised instance through the API (automation). The key is shown once, alone on standard output; it is in the audit log. cle-api --revoquer revokes the key read from standard input, without waiting for it to expire. |
sauvegarder, restaurer | Backup and restore. |
verifier | Check the machine: settings, keyring, database and schema, telephony engine (tables, SIP profiles, CDRs), files, portal, service. Each item ok, attention or ÉCHEC; exit code 1 on failure. Read-only. |
migrate | Apply database migrations (the service does it on start). |
bascule … | Active/passive. |
acces-assistance ouvrir --heures …, fermer, etat | Vendor support access, closed by default, 7 days at most. |
audit verifier | Check that the audit log has not been tampered with (exit code 1 otherwise). |
secrets nouvelle-cle, rechiffrer, etat | Rotation of the secrets encryption key. |
console | Open the telephony engine console (its own arguments after --); console --journal follows its log. |
adresse-publique [IP], --machine | Public address announced behind 1:1 NAT, by the telephony engine and by the computer phone’s TURN: show it, set it, or go back to the machine’s address. The engine applies it when it restarts (sudo systemctl restart kanadr-moteur, calls in progress are cut), TURN within a minute, without a restart (unless KANADR_TURN_IP_EXTERNE is set, which wins: the command says so). It removes the “NAT détecté” notice from the console and SSH login. |
licences | Notices of the free software shipped with Kanadr, and where to get their sources. |
The telephony engine is the kanadr-moteur service: sudo systemctl status kanadr-moteur,
sudo systemctl restart kanadr-moteur.