Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

VariableValue
KANADR_BASE_URLThe 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_PUBLIQUEPublic address of the portal (https://pbx.operator.example): links sent by email, phone links, passkeys.
KANADR_MOTEUR_ADRESSEControl connection of the telephony engine (127.0.0.1:8021). The names used before 26/10/2026 are still read.
KANADR_MOTEUR_MOT_DE_PASSEIts password.
KANADR_CDR_IDENTIFIANTSusername:password expected from the telephony engine for its call records (CDRs); without them, no call reaches the log.
KANADR_TROUSSEAUKeyring of the encryption keys (/etc/kanadr/cles).

Optional

VariableDefaultFor
KANADR_PIPER, KANADR_VOIX_PIPERabsent (set by the image)Text-to-speech (Piper program and French voice model); without it, announcements are uploaded as audio files.
KANADR_VOIX_PIPER_ENabsent (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_URLabsentThe vendor’s Hub, which receives license reports; without it, the report is downloaded from the portal.
KANADR_PARE_FEUnftablesAddress banning (nftables) or nothing (aucun, bans only recorded in the database).
KANADR_TELEPHONE_WEBSOCKET127.0.0.1:5066WebSocket 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_HOTEabsentPublic host name of the softphone’s TURN server (coturn); without it, no ICE server is given to the browser.
KANADR_TURN_IP_EXTERNEabsentPublic 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_SOFTPHONE60:300Jitter 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_TRUNKabsentThe 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_URLhttps://apt.kanadr.com/bureauAddress 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_ECOUTE127.0.0.1:8080Listening address of the portal and API, behind nginx.
KANADR_CDR_ECOUTE127.0.0.1:8085Listening address for the telephony engine’s CDRs.
KANADR_LOGinfoLog level (debug for troubleshooting: it may write signed links).
KANADR_ETAT/var/lib/kanadrThe service’s state directory: first access link of the setup, certificate request.
KANADR_ETAT_CERTIFICAT/var/lib/kanadr-certificatState 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.

CommandFor
mise-en-routeShow 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, restaurerBackup and restore.
verifierCheck 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.
migrateApply database migrations (the service does it on start).
bascule …Active/passive.
acces-assistance ouvrir --heures …, fermer, etatVendor support access, closed by default, 7 days at most.
audit verifierCheck that the audit log has not been tampered with (exit code 1 otherwise).
secrets nouvelle-cle, rechiffrer, etatRotation of the secrets encryption key.
consoleOpen the telephony engine console (its own arguments after --); console --journal follows its log.
adresse-publique [IP], --machinePublic 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.
licencesNotices 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.