Skip to content

Environment Variables

Configure Artifact Keeper using environment variables. This page provides a complete reference of all available configuration options.

Core Settings

VariableRequiredDefaultDescription
PORTNo8080HTTP server port
HOSTNo0.0.0.0HTTP server bind address
RUST_LOGNoinfoLog level (trace, debug, info, warn, error)
LOG_FORMATNojsonLog format (json, pretty, compact)
DEMO_MODENofalseEnable demo mode (read-only)
BASE_URLNo-Public base URL (e.g., https://registry.example.com)

Database

VariableRequiredDefaultDescription
DATABASE_URLYes-PostgreSQL connection string (postgres://user:pass@host:port/db)
DB_POOL_SIZENo20Maximum database connection pool size
DB_TIMEOUT_SECONDSNo30Database connection timeout
DB_SSL_MODENopreferPostgreSQL SSL mode (disable, allow, prefer, require)

Authentication

VariableRequiredDefaultDescription
JWT_SECRETYes-Secret key for signing JWT tokens (generate with openssl rand -base64 64)
JWT_ACCESS_TOKEN_EXPIRYNo900Access token expiration in seconds (15 minutes)
JWT_REFRESH_TOKEN_EXPIRYNo604800Refresh token expiration in seconds (7 days)
ADMIN_USERNAMENoadminDefault admin username (first-time setup)
ADMIN_PASSWORDNoadminDefault admin password (change on first login)
REQUIRE_HTTPSNofalseRequire HTTPS for all connections
RATE_LIMIT_LOGINNo5Maximum login attempts
RATE_LIMIT_WINDOWNo300Rate limit window in seconds (5 minutes)

LDAP Integration

VariableRequiredDefaultDescription
LDAP_URLNo-LDAP server URL (e.g., ldap://ldap.example.com:389)
LDAP_BASE_DNNo-LDAP base DN (e.g., dc=example,dc=com)
LDAP_BIND_DNNo-LDAP bind DN for authentication
LDAP_BIND_PASSWORDNo-LDAP bind password
LDAP_USER_FILTERNo(uid={username})LDAP user search filter
LDAP_SYNC_INTERVALNo3600LDAP sync interval in seconds (1 hour)
LDAP_GROUP_FILTERNo-LDAP group search filter
LDAP_GROUP_BASE_DNNo-LDAP group base DN
LDAP_GROUP_ATTRIBUTENocnLDAP group name attribute

OIDC/SSO Integration

VariableRequiredDefaultDescription
OIDC_ISSUERNo-OIDC provider issuer URL
OIDC_CLIENT_IDNo-OIDC client ID
OIDC_CLIENT_SECRETNo-OIDC client secret
OIDC_REDIRECT_URINo-OIDC redirect URI
OIDC_SCOPESNoopenid,email,profileOIDC scopes (comma-separated)
OIDC_USERNAME_CLAIMNopreferred_usernameOIDC claim for username
OIDC_EMAIL_CLAIMNoemailOIDC claim for email
OIDC_NAME_CLAIMNonameOIDC claim for full name
OIDC_GROUPS_CLAIMNogroupsOIDC claim for groups

Storage Backend

VariableRequiredDefaultDescription
STORAGE_BACKENDNofilesystemStorage backend type (filesystem, s3)
STORAGE_PATHNo/var/lib/artifact-keeper/artifactsFilesystem storage path
STORAGE_DIRECT_IONofalseEnable direct I/O for large files
STORAGE_BUFFER_SIZENo1048576Buffer size in bytes (1 MB)

S3 Storage

VariableRequiredDefaultDescription
S3_BUCKETNo-S3 bucket name
S3_REGIONNous-east-1S3 region
S3_ENDPOINTNo-S3-compatible endpoint (for MinIO, DigitalOcean Spaces, etc.)
S3_ACCESS_KEY_IDNo-S3 access key ID
S3_SECRET_ACCESS_KEYNo-S3 secret access key
S3_PATH_PREFIXNo-Prefix for all S3 keys
S3_FORCE_PATH_STYLENofalseUse path-style addressing (required for MinIO)
S3_MULTIPART_THRESHOLDNo104857600Multipart upload threshold in bytes (100 MB)
S3_MULTIPART_CHUNK_SIZENo10485760Multipart chunk size in bytes (10 MB)
S3_MAX_CONNECTIONSNo50Maximum S3 connections
S3_USE_TRANSFER_ACCELERATIONNofalseEnable S3 transfer acceleration (AWS only)

Backup

VariableRequiredDefaultDescription
BACKUP_ENABLEDNofalseEnable scheduled backups
BACKUP_SCHEDULENo0 2 * * *Backup schedule (cron format)
BACKUP_RETENTION_DAYSNo30Backup retention in days
BACKUP_PATHNo/var/backups/artifact-keeperBackup storage path
BACKUP_INCLUDE_ARTIFACTSNotrueInclude artifacts in backups
BACKUP_COMPRESSIONNogzipCompression method (gzip, zstd, none)
BACKUP_STORAGENofilesystemBackup storage backend (filesystem, s3)
BACKUP_S3_BUCKETNo-S3 bucket for backups
BACKUP_S3_REGIONNous-east-1S3 region for backups
BACKUP_S3_PREFIXNobackups/S3 prefix for backups
BACKUP_ENCRYPTIONNofalseEnable backup encryption
BACKUP_ENCRYPTION_KEYNo-Path to encryption key file
BACKUP_TYPENofullBackup type (full, incremental)
BACKUP_FULL_SCHEDULENo0 2 * * 0Full backup schedule (cron)
BACKUP_INCREMENTAL_SCHEDULENo0 2 * * 1-6Incremental backup schedule (cron)
BACKUP_RETENTION_DAILYNo7Daily backups to keep
BACKUP_RETENTION_WEEKLYNo4Weekly backups to keep
BACKUP_RETENTION_MONTHLYNo12Monthly backups to keep

Garbage Collection

VariableRequiredDefaultDescription
GC_ENABLEDNofalseEnable automatic garbage collection
GC_SCHEDULENo0 2 * * *GC schedule (cron format)
GC_RETENTION_DAYSNo90Keep artifacts for N days
GC_DRY_RUNNofalseDry run mode (log without deleting)

Edge Nodes

VariableRequiredDefaultDescription
ROLENoprimaryNode role (primary, edge)
EDGE_ENABLEDNofalseEnable edge node support
EDGE_SECRET_KEYNo-Secret key for edge authentication
EDGE_AUTO_REGISTERNotrueAllow automatic edge registration
PRIMARY_URLNo-Primary node URL (for edge nodes)
EDGE_API_KEYNo-API key for edge node (from primary)
EDGE_REGIONNo-Edge node region identifier
EDGE_CACHE_SIZE_MBNo102400Edge cache size in MB (100 GB)
EDGE_HEARTBEAT_INTERVALNo60Heartbeat interval in seconds
EDGE_P2P_ENABLEDNofalseEnable peer-to-peer transfers
EDGE_P2P_MAX_PEERSNo5Maximum P2P peers
EDGE_REPLICATION_BANDWIDTH_MBPSNo-Replication bandwidth limit
EDGE_REPLICATION_SCHEDULENo-Replication schedule (cron)
EDGE_MIN_ARTIFACT_SIZE_MBNo-Minimum artifact size to replicate
EDGE_SYNC_STRATEGYNolruSync strategy (lru, all, popular)
EDGE_MAX_ARTIFACT_AGE_DAYSNo-Maximum artifact age to replicate
EDGE_CACHE_HIGH_WATER_MARKNo90Start eviction at N% capacity
EDGE_EVICTION_POLICYNolruEviction policy (lru, lfu, fifo)

Plugins

VariableRequiredDefaultDescription
PLUGINS_ENABLEDNofalseEnable plugin system
PLUGINS_PATHNo/var/lib/artifact-keeper/pluginsPlugin storage path
PLUGIN_MAX_MEMORY_MBNo256Max memory per plugin (MB)
PLUGIN_MAX_CPU_MSNo5000Max CPU time per plugin (ms)
PLUGIN_MAX_EXECUTION_TIME_MSNo30000Max execution time per plugin (ms)
PLUGIN_ALLOW_NETWORKNofalseAllow plugins network access
PLUGIN_REQUIRE_SIGNATURENofalseRequire plugin signature verification
PLUGIN_TRUSTED_KEYSNo-Path to trusted signature keys
PLUGIN_ALLOWED_SOURCESNo-Allowed plugin sources (comma-separated)
PLUGIN_LOG_LEVELNoinfoPlugin log level

Webhooks

VariableRequiredDefaultDescription
WEBHOOKS_ENABLEDNotrueEnable webhooks
WEBHOOK_TIMEOUT_SECONDSNo30Webhook delivery timeout
WEBHOOK_MAX_RETRIESNo5Maximum delivery retries
WEBHOOK_RETRY_BACKOFFNoexponentialRetry backoff strategy (exponential, linear)
WEBHOOK_CONCURRENCYNo10Concurrent webhook deliveries
WEBHOOK_QUEUE_SIZENo1000Webhook queue size
WEBHOOK_RATE_LIMITNo100Max deliveries per minute per webhook

Security Scanning

VariableRequiredDefaultDescription
TRIVY_ENABLEDNofalseEnable Trivy security scanning
TRIVY_URLNohttp://localhost:8090Trivy server URL
TRIVY_TIMEOUT_SECONDSNo300Trivy scan timeout (5 minutes)
SCAN_ON_UPLOADNofalseAutomatically scan artifacts on upload
BLOCK_VULNERABLE_UPLOADSNofalseBlock uploads with critical vulnerabilities
VULNERABILITY_SEVERITY_THRESHOLDNoHIGHSeverity threshold (CRITICAL, HIGH, MEDIUM, LOW)

Monitoring

VariableRequiredDefaultDescription
METRICS_ENABLEDNotrueEnable Prometheus metrics
METRICS_PATHNo/metricsMetrics endpoint path
TRACING_ENABLEDNofalseEnable distributed tracing
TRACING_ENDPOINTNo-Jaeger/OpenTelemetry endpoint
AUDIT_LOG_ENABLEDNotrueEnable audit logging
AUDIT_LOG_PATHNo/var/log/artifact-keeper/audit.logAudit log file path

Performance Tuning

VariableRequiredDefaultDescription
WORKER_THREADSNo4Number of worker threads
MAX_UPLOAD_SIZE_MBNo10240Maximum upload size (10 GB)
MAX_CONCURRENT_UPLOADSNo10Maximum concurrent uploads
CHUNK_SIZE_MBNo10Upload chunk size (MB)
CACHE_ENABLEDNotrueEnable metadata caching
CACHE_TTL_SECONDSNo3600Cache TTL (1 hour)
CACHE_SIZE_MBNo1024Cache size (1 GB)
VariableRequiredDefaultDescription
SEARCH_ENABLEDNotrueEnable search functionality
SEARCH_INDEX_PATHNo/var/lib/artifact-keeper/searchSearch index path
SEARCH_UPDATE_INTERVALNo60Index update interval (seconds)

CORS

VariableRequiredDefaultDescription
CORS_ENABLEDNotrueEnable CORS
CORS_ALLOWED_ORIGINSNo*Allowed origins (comma-separated)
CORS_ALLOWED_METHODSNoGET,POST,PUT,DELETE,OPTIONSAllowed methods
CORS_ALLOWED_HEADERSNo*Allowed headers
CORS_MAX_AGENo3600Preflight cache duration (seconds)

PostgreSQL WAL Archiving

VariableRequiredDefaultDescription
POSTGRES_WAL_ARCHIVINGNofalseEnable WAL archiving for PITR
POSTGRES_WAL_ARCHIVE_PATHNo/var/lib/postgres/wal_archiveWAL archive path
POSTGRES_WAL_RETENTION_DAYSNo7WAL retention in days

Development/Testing

VariableRequiredDefaultDescription
DEV_MODENofalseEnable development mode (hot reload, verbose logs)
MOCK_LDAPNofalseUse mock LDAP for testing
MOCK_OIDCNofalseUse mock OIDC for testing
DISABLE_AUTHNofalseDisable authentication (testing only)

Example Configuration Files

Minimal Production

Terminal window
# Required
DATABASE_URL=postgres://registry:password@localhost:5432/artifact_registry
JWT_SECRET=generate-secure-secret-here
# Storage
STORAGE_BACKEND=filesystem
STORAGE_PATH=/var/lib/artifact-keeper/artifacts
# Recommended
RUST_LOG=info
BACKUP_ENABLED=true
BACKUP_SCHEDULE="0 2 * * *"

S3 Storage with Edge Nodes

Terminal window
# Database
DATABASE_URL=postgres://registry:password@localhost:5432/artifact_registry
JWT_SECRET=generate-secure-secret-here
# S3 Storage
STORAGE_BACKEND=s3
S3_BUCKET=artifact-keeper-prod
S3_REGION=us-east-1
S3_ACCESS_KEY_ID=your-access-key
S3_SECRET_ACCESS_KEY=your-secret-key
# Edge Nodes
ROLE=primary
EDGE_ENABLED=true
EDGE_SECRET_KEY=edge-secret-key
# Backups
BACKUP_ENABLED=true
BACKUP_STORAGE=s3
BACKUP_S3_BUCKET=artifact-keeper-backups

LDAP/OIDC Authentication

Terminal window
# Database & JWT
DATABASE_URL=postgres://registry:password@localhost:5432/artifact_registry
JWT_SECRET=generate-secure-secret-here
# LDAP
LDAP_URL=ldap://ldap.example.com:389
LDAP_BASE_DN=dc=example,dc=com
LDAP_BIND_DN=cn=admin,dc=example,dc=com
LDAP_BIND_PASSWORD=ldap-password
# OIDC
OIDC_ISSUER=https://accounts.google.com
OIDC_CLIENT_ID=your-client-id
OIDC_CLIENT_SECRET=your-client-secret
OIDC_REDIRECT_URI=https://registry.example.com/api/v1/auth/oidc/callback

High-Security Configuration

Terminal window
# Database & JWT
DATABASE_URL=postgres://registry:password@localhost:5432/artifact_registry
JWT_SECRET=generate-secure-secret-here
JWT_ACCESS_TOKEN_EXPIRY=300 # 5 minutes
# Security
REQUIRE_HTTPS=true
RATE_LIMIT_LOGIN=3
TRIVY_ENABLED=true
SCAN_ON_UPLOAD=true
BLOCK_VULNERABLE_UPLOADS=true
VULNERABILITY_SEVERITY_THRESHOLD=HIGH
# Backups
BACKUP_ENABLED=true
BACKUP_ENCRYPTION=true
BACKUP_ENCRYPTION_KEY=/etc/artifact-keeper/backup.key
# Audit
AUDIT_LOG_ENABLED=true
# Plugins
PLUGINS_ENABLED=true
PLUGIN_REQUIRE_SIGNATURE=true