Docker

Keep Turjuman running: with Docker it restarts by itself, also after a reboot, and you drive it with make helpers.

What you need

Windows
Docker Desktop with the WSL2 backend, and “Start Docker Desktop when you sign in” on. Git for Windows (winget install Git.Git) and GNU make (winget install ezwinports.make). Run every make command from Git Bash, not from PowerShell or cmd.
macOS
Docker Desktop, or OrbStack.
Linux
Docker. make up also writes your UID, GID and PULSE_SOCKET into .env.

Docker with Compose 2.24 or newer. There is no published image: make up builds it on this computer, the first time in a few minutes. Docker Desktop on Windows and macOS runs only while a user is logged in: let the computer log in by itself.

And the code, in a terminal:

git clone https://github.com/turjuman-translator/cli.git turjumancd turjuman

Start

make upmake admin
  • make up: the first time it also makes config/, data/ and .env (it never overwrites), then it builds and starts. It returns once Turjuman is healthy, and prints the address, http://127.0.0.1:8765/.
  • On its first start Turjuman makes config/config.yaml itself, and downloads the Quran text and translations into data/quran/ in the background, for verified verse references. Without internet it tries again later; make logs shows it.
  • make admin: opens the app. Create your admin account, then add your Soniox key under Keys. Or run make keys to enter it in the terminal.

The container restarts by itself, and make status shows its health. Then make your first screen: Install, step 7; make screens prints the screen links.

On the network (Phone & network): set server.exposure: lan in config/config.yaml and CAPTIONS_BIND=0.0.0.0 in .env; Docker sets server.host itself. make screens then still prints the http://127.0.0.1 links: copy the HTTPS link for another device in the app, opened at the computer's network address.

Coming from pnpm turjuman start? Stop it first: both use port 8765. Docker keeps its own settings and state in config/ and data/. To take your accounts, screens and keys along: Moving to Docker.

Everyday helpers

  • make statusThe container's state and health: sessions, audio.
  • make downStop Turjuman; a running session is finished first.
  • make logsFollow the logs.
  • make screensThe screens, with their screen links.
  • make adminOpen the app. With exposure local, the first visit creates the admin account; on the network, use make user-add. make app does the same.
  • make keysEnter your Soniox key (checked with Soniox, saved in config/.env); Turjuman then restarts.
  • make usersThe accounts of the app.
  • make updategit pull, rebuild, restart, and wait until healthy.
  • make backupArchive config/ and the transcripts to backups/, without .env, keys.yaml, master.key and admin.token.
  • make doctorCheck the setup: config, key, HTTPS certificate, Quran data, the connection to Soniox. Of the key it only checks that it is set.
  • make helpEvery helper and variable.

Every helper: Commands.

Update

make update

It runs git pull --ff-only, rebuilds, restarts, and waits until Turjuman is healthy.

Update outside a khutbah. Your settings and data stay: they are in config/ and data/. An older install: the Docker guide.

Back up

make backup

It writes backups/<date>_<time>.tar.gz with config/ and the transcripts, readable only by you. It leaves out the .env files (your API keys), config/keys.yaml (the access keys) and config/master.key: keep those safe separately. config/admin.token stays out too: the next start makes a new one.

Keep a copy of the master key somewhere else: together with orgs.yaml it unlocks the stored API keys.

Settings in .env

make up makes .env in the turjuman folder the first time. Docker reads these settings from it; without them, the defaults apply:

SettingDefaultWhat it does
HTTP_PORT8765The app's port on this computer
HTTPS_PORT8443The HTTPS port, for server.https.port: 8443
BRIDGE_PORT7000The audio bridge's port
CAPTIONS_BIND127.0.0.10.0.0.0 puts the app on your network (with server.exposure: lan)
TZEurope/AmsterdamThe time zone of session folders and log times
COMPOSE_PROJECT_NAMEturjumanThe name of this instance
CAPTIONS_IMAGE, CAPTIONS_BUILD_IMAGEturjuman:local, turjuman:buildThe images of this instance

make keys saves your Soniox key in config/.env. A SONIOX_API_KEY in this .env wins over it.

Several instances on one computer

Each checkout is one instance with its own config/ and data/. To run a second one next to the first, for example a test copy, give it its own name and ports in its .env:

COMPOSE_PROJECT_NAME=turjuman-testHTTP_PORT=8780HTTPS_PORT=8781BRIDGE_PORT=7080CAPTIONS_IMAGE=turjuman-test:localCAPTIONS_BUILD_IMAGE=turjuman-test:build

Every make helper then works on that instance: make up prints http://127.0.0.1:8780/. Links for this computer use these ports too. In a checkout without a COMPOSE_PROJECT_NAME in its .env, the helpers work on the default instance, turjuman.

More

  • Audio bridge: server-side capture of the audio. On Windows, make bridge-install starts it at logon as the scheduled task “Turjuman audio bridge”.
  • On a Mac, AirPlay Receiver also listens on port 7000. If the audio bridge cannot connect, turn AirPlay Receiver off (System Settings → General → AirDrop & Handoff), or set another BRIDGE_PORT in .env and run make up.
  • HTTPS and your hostname: your own reverse proxy (nginx) in front of Turjuman.
  • The Docker guide: every helper, the raw docker compose commands, and troubleshooting.