Technical configuration

To be used together with the Marble installation guide at https://github.com/checkmarble/marble/tree/main/installation.

Marble Environment Variables

This table documents all environment variables expected by the Marble application, indicating which containers use them and which require them.

See our Github page for more details on the parts of the Marble application.

Container Legend

Marble consists of 4 main elements, described below, plus external dependencies for webhooks sending and (sanction and other) screening.

The "api", "worker" and "migrations" containers mentioned below are actually the same docker image, respectively executed with the arguments --server, --worker and --migrations. They are generally run separately.

  • api - Main API server (api container)
  • worker - Background job processor (cron container)
  • migrations - DB migration job
  • frontend - Frontend application (app container)

Environment Variables

Variable NameFormat & DetailsDefault ValueUsed In ContainersRequired In Containers
AUTHENTICATION_JWT_SIGNING_KEYRSA private key in PEM format for signing auth tokens. Line breaks as \n. Generate with openssl genrsa -out key.pem 4096. Recommended alternative: use AUTHENTICATION_JWT_SIGNING_KEY_FILEA new one is generated on the fly at container start time if not present, but this may lead to random disconnections on auto-scaling infrastructure.api-
AUTHENTICATION_JWT_SIGNING_KEY_FILEPath to a RSA private key in PEM format for signing auth tokens. Generate with openssl genrsa -out key.pem 4096.A new one is generated on the fly at container start time if not present, but this may lead to random disconnections on auto-scaling infrastructure.api-
CASE_MANAGER_BUCKET_URLBlob storage URL for case manager documents. See format in the section below.-api, workerapi, worker
CONVOY_API_KEYConvoy API key from project settings → Secrets-api, worker-
CONVOY_API_URLConvoy API URL for webhooks. Format: {scheme}://{host}:{port}/api. Must include /api and must be reachable from the api and worker containers.-api, worker-
CONVOY_PROJECT_IDConvoy project ID from project settings → Secrets-api, worker-
CREATE_ORG_ADMIN_EMAILInitial admin user email for bootstrap. Must match Firebase account. Can be empty after initial setup.-api-
CREATE_ORG_NAMEInitial organization name for bootstrap. Firebase user is created at login time for the first user. Can be empty after initial setup.-api-
DISABLE_SEGMENTBoolean (true/false). Disables basic product usage analytics.falseapi, frontend-
DISABLE_TELEMETRYBoolean (true/false). Disables product telemetry.falseworker-
ENVEnvironment name (e.g., production, staging). Used for logging and telemetry. Do not set to development in production."production"api, worker, frontend-
FIREBASE_API_KEYFirebase API key from Firebase project settings. Register new app to retrieve-apiapi
FIREBASE_AUTH_DOMAINFirebase auth domain for federated authentication. From Firebase settings → GeneralComputed from the Google cloud project or Firebase project ID.api-
FIREBASE_PROJECT_IDFirebase project ID from Firebase project settingsUses the same value as GOOGLE_CLOUD_PROJECT by default (which is sufficient in the majority of cases).apiapi
GOOGLE_APPLICATION_CREDENTIALSPath to GCP service account JSON key file (e.g., /shared/service_account_key.json)-api, workerRequired on those containers if running with Firebase authentication, outside of a GCP environment.
GOOGLE_CLOUD_PROJECTGCP Project ID for Firebase, GCS and tracingAutomatically retrieved from Metadata server if running on GCP infrastructure.api, workerRequired on those containers if running with Firebase authentication, outside of a GCP environment.
INGESTION_BUCKET_URLBlob storage URL for data ingestion. See format in the section below.-api, workerapi, worker
LICENSE_KEYMarble license key for premium features-api, workerRequired on api and worker to access premium features.
LOGGING_FORMATLog format (e.g., "json", "text"). Use "json" to enable structured logging."text"api, worker-
MARBLE_API_URLURL frontend uses to reach API. Must include scheme (e.g., http://api:8080 for docker-compose). May be an internal URL but must be reachable from the frontend container.-frontendfrontend
MARBLE_APP_URLURL users access Marble frontend from browser. Must include scheme (e.g., http://localhost:3000). Must be reachable from the browser of the people who will be using the Marble app.-apiapi
METABASE_GLOBAL_DASHBOARD_IDDashboard ID from Metabase static embedding-api-
METABASE_JWT_SIGNING_KEYJWT signing key from Metabase admin panel → Settings → Embedding → Static embedding-api-
METABASE_SITE_URLMetabase instance URL for embedded analytics-api-
OFFLOADING_BATCH_SIZENumber of records to offload per batch.10000worker-
OFFLOADING_BEFOREOffload rules older than this duration (e.g., 168h for 7 days). Go duration format .168hworker-
OFFLOADING_BUCKET_URLBlob storage URL for offloading. See format in the section below.-api, workerRequired on worker if OFFLOADING_ENABLED=true
OFFLOADING_ENABLEDBoolean (true/false). Enables offloading decision rules to blob storage.falseworker-
OFFLOADING_JOB_INTERVALInterval between offloading jobs (e.g., 30m, 1h). Minimum interval is 30m. Go duration format.30mworker-
OFFLOADING_SAVE_POINTSSave progress every N records.1000worker-
OFFLOADING_WRITES_PER_SECRate limit for offloading writes per second.200worker-
OPENSANCTIONS_API_HOSTOpen Sanctions API host. Must include scheme and must be reachable from the api and worker containers.-api, worker-
OPENSANCTIONS_API_KEYAPI key for Open Sanctions SaaS or auth credentials-api, worker-
OPENSANCTIONS_AUTH_METHODAuthentication method: bearer or basic. For basic: provide credentials as user:password-api, worker-
PG_CONNECTION_STRINGPostgreSQL DSN. Format: postgres://user:pass@host:port/dbname?sslmode=prefer. Alternative to individual PG_* variables and takes precedence over them if present. Key-value format "user=..." is not allowed.-api, worker, migrationsapi, worker (if not using individual PG_* variables)
PG_HOSTNAMEPostgreSQL hostname (e.g., db, localhost)-api, worker, migrationsapi, worker, migrations
PG_DATABASEPostgreSQL database namemarbleapi, worker, migrations
PG_PASSWORDPostgreSQL password. May be omitted in some cases, for example if IAM authentication is used.-api, worker, migrationsapi, worker, migrations (if not using PG_CONNECTION_STRING, and unless working with IAM-based DB authentication)
PG_PORTPostgreSQL port.5432api, worker, migrations-
PG_SSL_MODEPostgreSQL SSL mode (disable, prefer, require). Should be require for productionpreferapi, worker, migrations-
PG_USERPostgreSQL username-api, worker, migrationsapi, worker, migrations (if not using PG_CONNECTION_STRING)
PG_MAX_POOL_SIZEMaximum connection pool size40api, worker
PORTPort number the container listens on.8080 on api, 3000 on frontendapi, frontend-
SENTRY_DSNSentry DSN for error tracking (e.g., https://[email protected]/...)-api, worker, frontend-
SESSION_MAX_AGEFrontend cookie session max age in seconds.43200 (12 hours)frontend-
SESSION_SECRETRandom string for session encryption. Generate with openssl rand -base64 128 | tr -d "\n"-frontendfrontend

Notes

  1. Database Configuration: You must provide either PG_CONNECTION_STRING OR the individual PG_* variables (PG_HOSTNAME, PG_PORT, PG_USER, PG_PASSWORD, PG_SSL_MODE). PG_CONNECTION_STRING takes precedence if present. Only DSN format is accepted and special characters must be url-encoded.

  2. JWT Signing Key: You can use either AUTHENTICATION_JWT_SIGNING_KEY (inline key with \n line breaks) OR point to a file with AUTHENTICATION_JWT_SIGNING_KEY_FILE. The file approach is recommended because character escaping can be an issue with multiline environment variables.

  3. Blob Storage: Supports multiple providers:

  • Local file system: file://{path}?create_dir=true (limited functionality, do not use for production)
  • Google Cloud Storage: gs://{bucket} (requires GOOGLE_APPLICATION_CREDENTIALS)
  • AWS S3: s3://{bucket} (requires AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION)
  • Azure Blob: azblob://{bucket} (requires AZURE_STORAGE_ACCOUNT, AZURE_STORAGE_KEY)
  • Minio: s3://bucket?awssdk=v1&endpoint=https://minio.local&s3ForcePathStyle=true. When testing Marble, you can add the 'requireSSL=false' query parameter to connect in cleartext.

Requires explicit authentication variables passed, or uses automatic credentials discovery if running on GCP/AWS/Azure infrastructure.

See https://gocloud.dev/howto/blob/ for more details.

  1. Bootstrap Variables: CREATE_ORG_NAME and CREATE_ORG_ADMIN_EMAIL are only needed for initial setup of a new organization and can be removed after the it is created.

  2. Production Settings:

  • Set PG_SSL_MODE=require
  • Generate strong AUTHENTICATION_JWT_SIGNING_KEY (4096-bit RSA)
  • Generate random SESSION_SECRET (128+ bytes)
  • Do NOT set ENV=development
  • Use production-grade database (not docker-compose postgres)
  • Use production-grade Elasticsearch (not docker-compose ES)
  • Configure offloading of decision details with OFFLOADING_ENABLED