Skip to content

Configuration

OpenJam is configured via environment variables. For local development, use a .env file in the server/ directory.

Environment Variables

Server

VariableDescriptionDefaultRequired
PORTHTTP server port8080No
ENVIRONMENTdevelopment or productiondevelopmentNo

Database

VariableDescriptionDefaultRequired
DATABASE_URLPostgreSQL connection stringpostgres://postgres:postgres@localhost:5432/openjam?sslmode=disableYes
REDIS_URLRedis connection string(empty)No

Security

VariableDescriptionDefaultRequired
SESSION_SECRETSecret key for session management(insecure default)Yes (production)
CORS_ORIGINSComma-separated allowed originshttp://localhost:5173Yes (production)

Storage (MinIO / S3)

VariableDescriptionDefaultRequired
MINIO_ENDPOINTMinIO server endpointlocalhost:9000No
MINIO_ACCESS_KEYMinIO access keyminioadminNo
MINIO_SECRET_KEYMinIO secret keyminioadminNo
MINIO_USE_SSLUse SSL for MinIOfalseNo
MINIO_BUCKETStorage bucket nameopenjam-exportsNo

Example .env File

bash
PORT=8080
ENVIRONMENT=development

DATABASE_URL=postgres://postgres:postgres@localhost:5432/openjam?sslmode=disable
REDIS_URL=redis://localhost:6379

CORS_ORIGINS=http://localhost:5173

MINIO_ENDPOINT=localhost:9000
MINIO_ACCESS_KEY=minioadmin
MINIO_SECRET_KEY=minioadmin
MINIO_USE_SSL=false

SESSION_SECRET=your-secret-key-change-in-production

Frontend Configuration

The frontend supports these Vite environment variables:

VariableDescriptionDefault
VITE_API_URLBackend API base URL(empty, uses same origin)
VITE_WS_URLWebSocket URL(auto-detected from page URL)

These are only needed when running the frontend on a different origin than the backend.

Released under the MIT License.