Deployment Manual6 min readReviewed 2026-05-15

Appendix: Environment Variables and Directories

This appendix provides a deployment reference for services, directories, environment variables, ports, validation commands, and glossary terms. It is intended for implementation and handover use.

Service List

ServiceRequiredPurpose
frontendYesNGINX-served React UI and /api/ proxy.
backendYesFastAPI application and main API runtime.
postgresYesPostgreSQL database.
gotenbergYesDocument conversion for preview workflows.
preview-workerYes in production Compose pathsPreview job processing.
index-workerYes in production Compose pathsOCR, search indexing, and retrieval/index processing.

Directory List

Directory / pathPurposeProduction note
/srv/edms/volumes/postgresLinux PostgreSQL dataMust be durable and backed up through a database-aware process.
/srv/edms/volumes/uploadsLinux uploaded documentsMust be included in backup and capacity planning.
/srv/edms/volumes/previewsLinux preview artifactsCan be regenerated in some cases but should be protected for operational continuity.
/srv/edms/volumes/faissLinux search/RAG/index artifactsInclude in backup or plan reindex time.
/srv/edms/volumes/backupsLinux backup outputPrefer off-host/off-site copy.
/srv/edms/volumes/licensingLinux licensing stateMust be preserved.
C:/ProgramData/DeskDoxWindows deploy-kit DATA_ROOTContains production data paths under the deploy-kit model.

Environment Variable Reference

Application and Public URL

VariablePurposeProduction note
IMAGE_TAGContainer image versionPin to the target release.
DEBUGRuntime debug behaviorProduction should be false.
FRONTEND_URL / PUBLIC_URLPublic application URLMust be the real FQDN, not a local-only URL.
ALLOWED_ORIGINS / CORS_ORIGINSBrowser origin allow-listVerify actual runtime behavior during validation.
EDMS_AUTO_SEEDAutomatic seed behaviorShould be disabled for production (0 or unset).

Database

VariablePurposeProduction note
POSTGRES_DBDatabase namePresent in production templates.
POSTGRES_USERDatabase userUse deployment-specific credentials.
POSTGRES_PASSWORDDatabase passwordMust be strong and secret.
DATABASE_URLBackend database connectionCompose uses service host postgres.
POSTGRES_CONTAINER_NAMEBackup/restore container referenceUsed by deploy-kit and backup tooling contexts.

Security and Authentication

VariablePurposeProduction note
JWT_SECRET_KEYToken signing secretMust be unique, random, and protected.
JWT_ALGORITHMToken signing algorithmTemplate value is HS256.
ACCESS_TOKEN_EXPIRE_MINUTESSession/token lifetimeSet according to customer security policy.

Email

VariablePurposeProduction note
SMTP_HOST, SMTP_PORTSMTP relay endpointRequired when email is in scope.
SMTP_USER, SMTP_PASSWORDSMTP credentialsHandle as secrets.
EMAIL_FROMDefault sender addressShould align with the customer email domain and relay policy.
SMTP_SEND_TIMEOUT_SECONDSSMTP socket timeoutDefault in backend example is 30 seconds.

Converter, Storage, and Workers

VariablePurposeProduction note
CONVERTER_URLGotenberg endpointIn Docker Compose, http://gotenberg:3000.
CONVERTER_TIMEOUT_SECONDSConversion timeoutTemplate default is 120.
OCR_ENABLEDOCR enablementDefault production templates enable OCR.
TESSERACT_CMDTesseract executable pathLinux Compose sets /usr/bin/tesseract; Windows can auto-detect or configure.
TESSERACT_LANGOCR languageTemplate default is eng.
OCR_MAX_PAGESOCR page limitTemplate default is 10.
INDEX_WORKER_ENABLEDIndex worker behaviorDedicated worker container sets this to true.
PREVIEW_WORKER_ENABLEDPreview worker behaviorDedicated worker container sets this to true.
DATA_ROOTWindows deploy-kit data rootDefault C:/ProgramData/DeskDox.
HTTP_PORT, HOST_BIND_IPWindows frontend bindingDefault 8088 and 0.0.0.0; review exposure.

Backup and Licensing

VariablePurposeProduction note
BACKUP_ROOTBackup output pathMust have sufficient capacity and protection.
BACKUP_ENCRYPTION_KEYBackup encryption keyStore separately from backup archives.
BACKUP_WORKER_ENABLEDBackup worker enablementTemplate default is true.
BACKUP_RETENTION_DAILY, BACKUP_RETENTION_WEEKLY, BACKUP_RETENTION_MONTHLYRetention controls in backend settingsDefaults in config.py are 7 daily, 4 weekly, and 12 monthly.
LICENSE_DATA_DIRLicensing data pathMounted in production Compose.

AI, Emii, WhatsApp, and Optional Redis URL

VariablePurposeProduction note
LLM_ENABLED, EMII_ENABLED, RAG_ENABLED, AI_EXTERNAL_ENABLEDAI/Emii featuresConfirm customer data handling and outbound access before enabling.
OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_MODELOpenAI-compatible AI integrationRequired only for cloud AI features.
AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_DEPLOYMENTAzure OpenAI integrationRequired only for Azure OpenAI mode.
OLLAMA_BASE_URL, OLLAMA_MODELLocal LLM integrationRequired only for Ollama mode.
WHATSAPP_PHONE_NUMBER_ID, WHATSAPP_ACCESS_TOKEN, WHATSAPP_APP_SECRET, WHATSAPP_VERIFY_TOKENWhatsApp Cloud APIRequired only when WhatsApp integration is enabled.
REDIS_URLOptional AI/WhatsApp state or rate-limit backingNo Redis service is present in the current production Compose baseline.

Validation Commands

Use commands only in implementation or handover contexts.

docker compose -f docker-compose.prod.yml --env-file .env.prod config
docker compose -f docker-compose.prod.yml --env-file .env.prod ps
docker compose -f docker-compose.prod.yml --env-file .env.prod logs --tail 100 backend
.\deploy-kit\scripts\healthcheck.ps1
.\deploy-kit\scripts\backup.ps1 -Tag "validation"

Glossary

TermMeaning
FQDNFully qualified domain name used as the production DeskDox URL.
RPORecovery Point Objective; maximum acceptable data loss measured in time.
RTORecovery Time Objective; maximum acceptable recovery duration.
GotenbergConversion service used by DeskDox for preview workflows.
FAISSLocal vector/index artifact storage used by retrieval/search-related features.
OCROptical character recognition for scanned or image-based documents.
Deploy-kitWindows-oriented deployment package containing Compose, configuration, scripts, and installer assets.

Was this article helpful?

Related articles

Continue with closely related deployment manual guidance.