Configuration

Copy .env.example to .env for local development. Do not commit .env or production secrets.

Required settings

VariablePurpose
APP_DATABASE_URLPostgreSQL connection URL
APP_SESSION_SECRETSession-signing secret with at least 32 bytes
APP_RESEND_FROM_EMAILSender address used for magic links
APP_BASE_URLHTTP or HTTPS base URL used to build magic links

Generate a session secret with:

openssl rand -base64 32

Email

Set APP_RESEND_API_KEY to send production magic-link emails through Resend. Without it, CloudSeed uses its mock email sender and logs magic links for local development.

Optional application settings

VariablePurpose
APP_PORTHTTP port; defaults to 5000
APP_SESSION_CLEANUP_INTERVAL_HOURSExpired-session cleanup interval; 0 disables cleanup
APP_DB_MAX_CONNECTIONSPostgreSQL pool limit
APP_WORKER_CONCURRENCYNumber of background job workers
APP_JOB_MAX_RETRIESMaximum background job retries
APP_JOB_RETRY_BACKOFF_SECONDSInitial retry backoff
RUST_LOGTracing filter, such as info or cloudseed=debug

OpenTelemetry

Logs always go to standard output. To export logs and metrics over OTLP, configure:

  • APP_OTEL_ENABLED
  • APP_OTEL_ENDPOINT
  • APP_OTEL_SERVICE_NAME
  • APP_OTEL_SERVICE_VERSION
  • APP_OTEL_ENVIRONMENT

Standard OTEL_EXPORTER_OTLP_ENDPOINT and OTEL_SERVICE_NAME variables are also supported.