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 everymakecommand from Git Bash, not from PowerShell or cmd. - macOS
- Docker Desktop, or OrbStack.
- Linux
- Docker.
make upalso writes yourUID,GIDandPULSE_SOCKETinto.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/ cd turjumanturjuman-translator/ cli.git turjuman
Start
make upmake admin
make up: the first time it also makesconfig/,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.yamlitself, and downloads the Quran text and translations intodata/quran/in the background, for verified verse references. Without internet it tries again later;make logsshows it. make admin: opens the app. Create your admin account, then add your Soniox key under Keys. Or runmake keysto 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, usemake user-add.make appdoes the same.make keysEnter your Soniox key (checked with Soniox, saved inconfig/.env); Turjuman then restarts.make usersThe accounts of the app.make updategit pull, rebuild, restart, and wait until healthy.make backupArchiveconfig/and the transcripts tobackups/, without.env,keys.yaml,master.keyandadmin.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 updateIt 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 backupIt 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:
| Setting | Default | What it does |
|---|---|---|
HTTP_PORT | 8765 | The app's port on this computer |
HTTPS_PORT | 8443 | The HTTPS port, for server.https.port: 8443 |
BRIDGE_PORT | 7000 | The audio bridge's port |
CAPTIONS_BIND | 127.0.0.1 | 0.0.0.0 puts the app on your network (with server.exposure: lan) |
TZ | Europe/Amsterdam | The time zone of session folders and log times |
COMPOSE_PROJECT_NAME | turjuman | The name of this instance |
CAPTIONS_IMAGE, CAPTIONS_BUILD_IMAGE | turjuman:local, turjuman:build | The 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-installstarts 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_PORTin.envand runmake up. - HTTPS and your hostname: your own reverse proxy (nginx) in front of Turjuman.
- The Docker guide: every helper, the raw
docker composecommands, and troubleshooting.