Skip to content

Configuration

All variables are optional. Set them in .env (see .env.example); the web and worker services both read it.

variabledefaultrole
ADMIN_PASSWORD(empty)UI password. Optional: if empty, a random password is generated on first start (see Change or reset the admin password). When set, it always wins.
SECRET_KEY(empty)Key used to encrypt mailbox passwords and sign sessions. Empty: generated in data/secret.key.
UPLOAD_CHUNK_SIZE33554432 (32 MiB)Upload chunk size, in bytes (16 to 64 MiB recommended). Do not change it during a migration, see Pause, resume and retry.
UPLOAD_DISK_MARGIN536870912 (512 MiB)Free disk space margin required on top of the PST size.
WORKER_CONCURRENCYautoNumber of mailboxes migrated simultaneously by the worker. Unset or 0: chosen from the usable cores (cgroup-aware) and the free memory (2 cores and 512 MB per job, at most 4, at most the jobs waiting).
BUILD_PROCESSESper server tuningWhen set, forces in both tuning modes the number of processes building MIME messages for one mailbox (each opens the PST read-only). A builder killed by a libpff crash marks its item “libpff crash” and is restarted; crashes count towards MAX_CHILD_CRASHES. 0 = build inside the job process (previous behaviour). Total CPU use is about WORKER_CONCURRENCY × BUILD_PROCESSES.
AUTOTUNE_BENCH_SECONDS1.5Length of the build benchmark run at the start of an auto-tuned job (0 = none).
AUTOTUNE_INTERVAL5Seconds between two auto-tuning samples during the mail phase.
BUILD_MAX_INFLIGHT_MB256Memory budget for built messages waiting for their APPEND.
VERIFY_SAMPLE20Number of mails re-read for the sample check at the end of a job.
IMAP_MAX_RETRIES5Attempts on temporary IMAP errors (exponential backoff).
MAX_CHILD_CRASHES3Subprocess (libpff) crashes tolerated per job before it is marked failed (minimum 1).
CHILD_TERM_GRACE20Seconds given to subprocesses to stop on SIGTERM before SIGKILL.
COOKIE_SECURE01 = Secure session cookie (HTTPS behind a reverse proxy). The cookie is also Secure if the request arrives over HTTPS.
SESSION_MAX_AGE604800 (7 days)Session lifetime, in seconds.
WORKER_STALE_SECONDS60A running job whose heartbeat is older is considered orphaned and requeued.
PORT22362Listening port of the web service inside the container (the compose file publishes 22362).
DATA_DIR/dataData directory (set by the compose file).
PSTMIG_ENGINEapp.engineEngine module; used only by tests.

.env.example only lists the common variables; SESSION_MAX_AGE, WORKER_STALE_SECONDS, CHILD_TERM_GRACE and PORT are read by app/server/config.py and are optional.