Skip to main content

Server Configuration

The Community Edition server is configured via environment variables in deploy/.env.community. Copy deploy/.env.community.example as a starting point.

Environment variables

Database

VariableTypeDefaultDescription
DB_NAMEstringsielumPostgreSQL database name
DB_USERstringsielum_appPostgreSQL username
DB_PASSWORDstringrequiredPostgreSQL password. Min 32 chars. Generate: openssl rand -base64 32
DB_HOSTstringpostgresPostgreSQL host (container name in Docker Compose)
DB_PORTstring5432PostgreSQL port

Authentication (Community Edition)

VariableTypeDefaultDescription
ADMIN_PASSWORDstringrequiredPassword for the built-in admin user. Min 12 chars.
JWT_SECRETstringrequiredHMAC secret for signing local JWTs. Generate: openssl rand -base64 48

Server

VariableTypeDefaultDescription
LOG_LEVELdebug|info|warn|errorinfoLog verbosity
GRPC_PORTinteger9090gRPC port for agent communication (mTLS)
API_PORTinteger8080Internal REST API port (proxied via nginx)

mTLS Certificates

VariableTypeDefaultDescription
SERVER_CERT_FILEpath/etc/certs/server.crtServer TLS certificate
SERVER_KEY_FILEpath/etc/certs/server.keyServer TLS private key
CA_CERT_FILEpath/etc/certs/ca.crtCA certificate to verify agent client certs

Paths are relative to the container (volume-mounted from deploy/certs/).

Agent Enrollment

VariableTypeDefaultDescription
ENROLLMENT_TOKENstringShared secret for device certificate enrollment. Required to enable /api/enroll. Generate: openssl rand -base64 32

Additionally, start the backend with --ca-key /etc/certs/ca.key to enable the signing endpoint.

Alert Notifications

VariableTypeDefaultDescription
SMTP_HOSTstringSMTP server hostname
SMTP_PORTinteger587SMTP port (587=STARTTLS, 25=plain)
SMTP_TLSbooltrueEnable STARTTLS
SMTP_USERstringSMTP username
SMTP_PASSWORDstringSMTP password
ALERT_FROM_EMAILstringSender address for alert emails
ALERT_TO_EMAILstringRecipient(s), comma-separated
WEBHOOK_URLstringWebhook URL (Slack/Teams/custom)
ALERT_DEDUP_MINUTESinteger30Minutes before resending an identical alert

All three of SMTP_HOST, ALERT_FROM_EMAIL, ALERT_TO_EMAIL must be set to enable email notifications.

GDPR Data Retention

VariableTypeDefaultDescription
DATA_RETENTION_DAYSinteger90Days to retain telemetry data. Range: 7–3650

CLI flags

The backend binary also accepts CLI flags (passed via Docker Compose command):

FlagDescription
--caPath to CA certificate
--certPath to server TLS certificate
--keyPath to server TLS private key
--ca-keyPath to CA private key (enables enrollment endpoint)