Skip to content

Configuration reference

Repod is configured through three places: .env (Docker Compose variables), backend.env (backend application settings) and settings.json (runtime settings, edited in the web interface). This page covers the main options; the complete list of environment variables, with defaults, is in Environment variables.

A value set in docker-compose.yaml wins over backend.env

The environment: block of the backend service fixes ENV, DATABASE_URL, REPO_FORMAT and the storage paths. Setting them in backend.env has no effect: edit docker-compose.yaml instead.


.env — Docker Compose variables

These variables control how the containers are built and exposed. Place a .env file next to docker-compose.yaml (cp .env.example .env).

Variable Default Description
BIND_HOST 0.0.0.0 IP address Docker binds container ports to. Set to 127.0.0.1 if behind a reverse proxy on the same host.
APT_PORT 80 Host port for depot-apt — serves .deb (APT) and .apk (Alpine) repositories.
RPM_REPO_PORT 8080 Host port for depot-rpm — serves .rpm repositories.
BACKEND_PORT 8000 Host port for the FastAPI backend.
FRONTEND_PORT 3003 Host port for the React web UI.
REACT_APP_API_URL (empty) URL the browser uses to call the backend API. Must stay empty so calls remain relative (/api/v1/...) and are proxied by the frontend's Nginx — see Frontend.
REACT_APP_REPO_URL (empty) Base URL shown to users for the APT/APK repositories. Leave empty: the interface derives it from the browser's address. Set it only if you moved APT_PORT.
REACT_APP_RPM_REPO_URL (empty) Same for the RPM repositories (only if you moved RPM_REPO_PORT).
POSTGRES_PASSWORD repod_dev_password Password for the repod PostgreSQL user. Compose builds the backend's DATABASE_URL from it. Change this in production: the backend refuses to start with the default.
UPSTREAM_CACHE_PORT 8090 Host port for depot-cache (the upstream cache).
APT_TLS_PORT 8085 Used by docker-compose.tls.yml — depot-apt falls back to this port when nginx-proxy takes over port 80 for HTTP→HTTPS redirection.

BIND_HOST in production

If you expose Repod directly (no reverse proxy), keep BIND_HOST=0.0.0.0. If you run a reverse proxy on the same host, set BIND_HOST=127.0.0.1 to prevent direct access to backend ports. See Reverse proxy guide.


backend.env — Application settings

Database

Variable Required Description
DATABASE_URL ✅ PostgreSQL connection string: postgresql://repod:<password>@db:5432/repod. db/engine.py raises RuntimeError at startup if unset. The db service (PostgreSQL 16) is defined in docker-compose.yaml, which builds this value from POSTGRES_PASSWORD (.env); a value in backend.env is ignored. Schema is managed by Alembic migrations in backend/alembic/versions/.

Repository format

Variable Default Description
REPO_FORMAT apt (the bundled Compose file sets all) Read once at startup by format_router.py. Set in docker-compose.yaml. Controls which package format(s) this instance manages:
Value .deb (reprepro) .rpm (createrepo_c) .apk (apk index)
apt (default) ✅
rpm ✅
apk ✅
both ✅ ✅
all ✅ ✅ ✅

Any unrecognized value is rejected (warning logged, falls back to apt).

Authentication

Variable Required Description
JWT_SECRET_KEY ✅ HS256 signing secret for JWT tokens. Generate with openssl rand -hex 32. The application refuses to start in production if it is empty or the default value.
JWT_EXPIRE_MINUTES — JWT token lifetime in minutes. Default: 60.
SETTINGS_ENCRYPTION_KEY recommended Dedicated key encrypting secrets stored in settings.json (SMTP/LDAP password, OIDC client_secret). Generate with openssl rand -hex 32. Falls back to JWT_SECRET_KEY if unset (a startup warning is logged) — keeping it independent means rotating JWT_SECRET_KEY doesn't break decryption of existing secrets.
WEBHOOK_SECRET ✅ HMAC secret for /webhooks/github and /webhooks/kev. Generate with openssl rand -hex 32. The application refuses to start in production if this is empty or a known default. Compose also reads WEBHOOK_SECRET from .env: keep both identical.

Initial admin account

By default no admin account is created — use the first-run setup wizard (POST /api/v1/setup, exposed in the web UI on first access) to create it interactively.

Variable Required Description
ADMIN_USERNAME — Username (default admin) of an admin account to pre-provision at startup (e.g. for automated deployments). Only takes effect together with a valid ADMIN_PASSWORD_HASH.
ADMIN_PASSWORD_HASH — bcrypt hash of the admin password ($2a$/$2b$/$2y$). Generate: python3 -c "import bcrypt; print(bcrypt.hashpw(b'YourPass1!', bcrypt.gensalt(12)).decode())". Escape $ as $$ in .env files. If empty or invalid, no admin is seeded and the setup wizard remains available.
SETUP_TOKEN — POST /api/v1/setup requires a matching X-Setup-Token header, which closes the bootstrap race window before the first admin is created. In production, if you do not set it, the backend generates one at each start and writes it once in its log (docker compose logs backend \| grep SETUP_TOKEN); the setup wizard asks for it.

Environment mode

Variable Default Description
ENV production (fixed by the bundled Compose file) development enables Swagger UI (/docs) and hot-reload. Never use development in production.
APP_VERSION dev Version string returned by /health. Set at image build time.

Paths (pre-configured via Docker volumes — do not change)

Variable Value Description
POOL_DIR /repos/pool Canonical package store — .deb/.rpm files land here on upload
MANIFEST_DIR /repos/manifests Package manifest JSONs + index.json
STAGING_INCOMING /repos/staging/incoming Upload landing zone
STAGING_QUARANTINE /repos/staging/quarantine Quarantined packages
AUDIT_DIR /repos/audit Audit log JSONL files
INDEX_PATH /repos/manifests/index.json Aggregated package index file
INDEX_DIR /repos/package-index Full-text search working files
IMPORTS_DIR /repos/imports Working directory for sync/mirror imports
SETTINGS_PATH /repos/settings/settings.json Application settings file
SECURITY_DIR /repos/security CVE decisions, CISA KEV and EPSS caches
GNUPG_HOME /repos/gnupg GPG keyring shared with depot-apt / depot-rpm
NGINX_LOGS_DIR /repos/logs Nginx access logs (for download stats)
CLAMAV_DB_DIR /var/lib/clamav ClamAV signature database
GRYPE_DB_CACHE_DIR /repos/grype-db Grype vulnerability database cache
REPREPRO_BASE /repos -b path for reprepro — contains conf/, dists/, db/, pool/ (APT mode)
DISTS_DIR /repos/dists reprepro-managed Release + Packages trees (APT mode)
CONF_DIR /repos/conf reprepro distribution configuration (APT mode)
REPO_BASE /repos/rpm createrepo_c directories per <distro>/<arch>/ (RPM mode)
APK_REPO_BASE /repos/apk Alpine repositories — APKINDEX.tar.gz + .apk files (APK mode)
SSH_KEY_PATH /home/appuser/.ssh/id_ed25519 Ed25519 key for SSH-based inventory scanning

Network & proxy

Variable Default Description
TRUSTED_PROXIES 127.0.0.1 Comma-separated IP addresses trusted to set X-Forwarded-For. Passed by the container entrypoint to uvicorn as --forwarded-allow-ips. Behind a reverse proxy, list its address.
CORS_ORIGINS — Comma-separated allowed origins (e.g. https://repod.example.com). Must include every host/IP+port used to reach the frontend.

SMTP (email notifications)

Configured via the web UI (Administration → Paramètres, section Notifications email (SMTP)) and stored encrypted in settings.json. Not set via environment variables.

LDAP

Configured via the web UI (Administration → Paramètres, section LDAP / Active Directory) and stored in settings.json. See Configure LDAP.


settings.json — Runtime configuration

The file at /repos/settings/settings.json (mounted volume) stores runtime settings modified through the web UI. It is read at startup and updated when you save changes in the UI. Secrets inside it (SMTP/LDAP password, OIDC client_secret) are encrypted with SETTINGS_ENCRYPTION_KEY.

Info

You can edit settings.json directly as a text file if the web UI is unavailable, but encrypted fields must be set through the API/UI (plaintext values written by hand will not decrypt). Restart the backend container after manual edits: docker compose restart backend.

The defaults below are those of a fresh installation. Other sections exist (compliance_scan, drift, cve_rematch, oidc, upstream_cache, notification_rules, app_deps_scan, and more); each is set from its own page of the web interface.

On the multi-tenant (SaaS) service, the sections of scheduled jobs (inventory_scan, drift, compliance_scan, app_deps_scan, cve_rematch, dual_scan, app_repos_retroactive_scan, oci_retroactive_scan, mirror, app_repos_mirror, oci_mirror, oci_retention, retention) belong to each tenant: the time, the enabled flag and the limits you set apply to your tenant only. The scheduler checks every 5 minutes, so a job starts within about 5 minutes after its time.

Full default structure

settings.json (defaults, main sections)
{
  "app_url": "http://localhost:3003",
  "repo_url": "",
  "sync": {
    "enabled": true,
    "hour": 3,
    "minute": 0,
    "timezone": "UTC"
  },
  "sources": {
    "ubuntu-jammy": true,
    "ubuntu-jammy-universe": true,
    "ubuntu-jammy-updates": true,
    "ubuntu-jammy-updates-universe": true,
    "ubuntu-noble": true,
    "ubuntu-noble-universe": true,
    "ubuntu-focal": true,
    "ubuntu-focal-universe": true,
    "debian-bookworm": true,
    "debian-bookworm-contrib": true,
    "debian-bookworm-non-free": false,
    "ubuntu-jammy-security": true,
    "ubuntu-jammy-security-universe": true,
    "ubuntu-noble-security": true,
    "ubuntu-noble-security-universe": true,
    "ubuntu-focal-security": true,
    "debian-bookworm-security": true
  },
  "mirror": {
    "enabled": false,
    "hour": 5,
    "minute": 45,
    "timezone": "UTC",
    "max_packages_per_run": 300,
    "max_runtime_minutes": 90,
    "min_free_disk_gb": 5,
    "sources": {}
  },
  "notifications": {
    "enabled": false,
    "webhook_url": "",
    "webhook_enabled": false,
    "webhook_min_packages": 1
  },
  "email": {
    "enabled": false,
    "smtp_host": "",
    "smtp_port": 587,
    "smtp_user": "",
    "smtp_password": "",
    "from_address": "",
    "to_addresses": "",
    "use_tls": true
  },
  "ldap": {
    "enabled": false,
    "host": "",
    "port": 389,
    "use_ssl": false,
    "use_starttls": false,
    "bind_dn": "",
    "bind_password": "",
    "base_dn": "",
    "user_filter": "(sAMAccountName={username})",
    "attr_username": "sAMAccountName",
    "attr_email": "mail",
    "attr_fullname": "displayName",
    "attr_groups": "memberOf",
    "group_admin": "",
    "group_maintainer": "",
    "group_uploader": "",
    "group_auditor": "",
    "group_reader": "",
    "default_role": "reader",
    "auto_provision": true,
    "verify_cert": true,
    "ca_bundle_path": ""
  },
  "retention": {
    "audit_days": 90,
    "import_cleanup_days": 30,
    "deployment_history_days": 90
  },
  "backup": {
    "enabled": true,
    "hour": 4,
    "minute": 30,
    "retention_count": 7
  },
  "validation": {
    "sha256_check": true,
    "clamav_scan": true,
    "grype_scan": true,
    "grype_fail_on": "critical",
    "gpg_required": false,
    "max_upload_size_mb": 500,
    "clamav_timeout_seconds": 180
  },
  "cve_policy": {
    "critical": "block",
    "high": "review",
    "medium": "warn",
    "low": "allow",
    "negligible": "allow",
    "sla_critical_days": 0,
    "sla_high_days": 30,
    "sla_medium_days": 90,
    "auto_enrich": true
  },
  "epss_policy": {
    "enabled": true,
    "block_threshold": 0.9,
    "review_threshold": 0.5
  },
  "mfa_policy": {
    "enforce_admin_mfa": false,
    "grace_period_days": 7
  },
  "gpg": {
    "signing_key": ""
  },
  "versioning": {
    "max_versions_per_package": 10,
    "min_version_age_days": 0
  },
  "security": {
    "kev_ttl_hours": 24,
    "epss_ttl_hours": 24
  },
  "rate_limits": {
    "auth_per_minute": 10,
    "roles": "(see API reference, Rate limiting)"
  }
}

Section reference

Section Key Default Description
sync enabled true Whether the daily security sync cron runs (Enterprise only)
sync hour 3 Hour of day for the sync cron, in the sync.timezone zone
sync minute 0 Minute for the sync cron
sync timezone UTC Time zone of hour/minute
sources <source-id> true Toggle each upstream APT source on/off
mirror enabled false Whether the daily bulk mirror cron runs (Enterprise only). Runs at 05:45 UTC by default (hour, minute, timezone), capped by max_packages_per_run (300), max_runtime_minutes (90) and min_free_disk_gb (5)
mirror sources {} Per-source bulk mirror configuration, opt-in
notifications webhook_url "" Slack/Teams/Mattermost incoming webhook URL — validated by the SSRF guard before use
notifications webhook_enabled false Enable webhook notifications
notifications webhook_min_packages 1 Minimum packages changed to trigger a webhook
email enabled false Enable SMTP email notifications
email smtp_host "" SMTP server hostname
email smtp_port 587 SMTP port (465 → implicit TLS, 587/25 → STARTTLS)
email use_tls true Use STARTTLS
ldap enabled false Enable LDAP/AD authentication
ldap user_filter (sAMAccountName={username}) LDAP search filter; must contain {username}, which is replaced at login (a filter without it is rejected with 422 and denies logins)
ldap attr_groups memberOf Attribute of the user entry that lists its groups, read for the role mapping
ldap default_role reader Role assigned when no group mapping matches
ldap auto_provision true Create a local user record on first LDAP login
ldap verify_cert true Validate the LDAP server TLS certificate
mfa_policy enforce_admin_mfa false Require MFA for admin accounts after a grace period
mfa_policy grace_period_days 7 Days an admin without MFA can still log in; 1 to 90 (0 is rejected with 422)
retention audit_days 90 Days to keep audit log files (Enterprise only)
retention import_cleanup_days 30 Days to keep import staging files (Enterprise only)
backup enabled true Whether the daily backup cron runs (04:30 by default; Enterprise only)
backup retention_count 7 Number of backup archives kept
validation clamav_scan true Enable antivirus scan on upload
validation grype_scan true Enable CVE scan on upload
validation max_upload_size_mb 500 Maximum package file size accepted
validation clamav_timeout_seconds 180 Time allowed for one antivirus scan
validation gpg_required false Reject packages without a valid external signature
epss_policy enabled / block_threshold / review_threshold true / 0.9 / 0.5 EPSS exploitation probability (0 to 1) from which a package is blocked, or sent to review, when it is promoted to another distribution
gpg signing_key "" Key id used to sign the repository. Empty: the first key of the keyring (see Rotate GPG keys)
versioning max_versions_per_package / min_version_age_days 10 / 0 Version retention per package
security kev_ttl_hours / epss_ttl_hours 24 / 24 Lifetime of the CISA KEV and EPSS caches
rate_limits auth_per_minute 10 Limit on authentication endpoints (see Rate limiting)
cve_policy critical block Action for Critical CVEs: block, review, warn, allow
cve_policy high review Action for High CVEs
cve_policy medium warn Action for Medium CVEs
cve_policy low allow Action for Low CVEs
cve_policy negligible allow Action for Negligible CVEs
cve_policy sla_critical_days 0 SLA days for Critical CVE decisions (0 = immediate)
cve_policy sla_high_days 30 SLA days for High CVE decisions
cve_policy sla_medium_days 90 SLA days for Medium CVE decisions
cve_policy auto_enrich true Fetch EPSS scores and CISA KEV flags at upload time

Resource limits (Docker Compose)

The backend container has default resource limits:

docker-compose.yaml (excerpt)
deploy:
  resources:
    limits:
      memory: 4g
      cpus: "1.5"

The memory limit is 4g because the clamd daemon requires approximately 800 MB to load the ClamAV signature database into memory, on top of the Python process, Grype's working set and the package index (a repository of more than 500,000 packages needs about 2 GB for it). Increase further for large repositories or high upload throughput. Grype and ClamAV scans are CPU-intensive.


ClamAV daemon configuration

ClamAV scanning uses the clamd daemon, which is started by entrypoint.sh at container boot. Key details:

  • appuser is added to the clamav group so it can write to /var/lib/clamav.
  • The Unix socket is at /var/run/clamav/clamd.ctl.
  • Signatures (~800 MB) are loaded once at container start; clamscan is used as a fallback only if the daemon is unavailable.
  • Manual signature updates are available via Administration → Supervision (ClamAV card) in the web UI.

GPG configuration

GPG key generation uses --pinentry-mode loopback and requires gpg-agent, which is included in the Docker image.

GNUPG_HOME defaults to /repos/gnupg — a volume shared between the backend and the repository containers (depot-apt, depot-rpm).


Community Edition — excluded modules

The Community Edition does not include the following service modules; the code is simply absent and REPOD_EDITION has no effect:

Module Description
cve_enrichment EPSS/KEV enrichment at upload time
security_decisions CVE review workflow (pending/approve/reject)
sla_alerts SLA deadline tracking and alerts
sbom SBOM export endpoints (returns HTTP 402)
ldap_auth LDAP/AD authentication (returns HTTP 401)
email_notifications SMTP email alerts
security_sync / mirror Scheduled and manual CVE database sync / bulk mirroring
retention Audit log and import cleanup retention policy
inventory SSH-based machine inventory and remote install
leader_election (HA) Multi-replica active-passive scheduling

Changing REPOD_EDITION in your environment file has no effect — the modules above are not compiled into the Community image.


Environment: production vs. development

Behaviour ENV=production ENV=development
Swagger UI (/docs, /redoc, /openapi.json) Disabled (404) Enabled
JWT secret validation Refuses to start if missing or default Warning log only
Source code mount Not mounted (image is immutable) ./backend:/app mounted via docker-compose.dev.yml
Docker socket Never mounted Not mounted (GPG uses shared volume in all modes)

To run in development mode:

docker compose -f docker-compose.yaml -f docker-compose.dev.yml up