Skip to content

Environment Variables ​

This document lists the environment variables used to configure the Kleinkram application. These variables are typically defined in a .env file in the root directory.

Server Configuration ​

VariableDescriptionDefault
SERVER_PORTThe port on which the backend server listens.3000

Service URLs ​

These URLs are used for communication between services and for generating links.

VariableDescriptionDefault
FRONTEND_URLThe URL where the frontend application is accessible.http://localhost:8003
DOCS_URLThe URL where the documentation site is accessible.http://localhost:4000
BACKEND_URLThe URL where the backend API is accessible.http://localhost:3000

S3 Configuration (Object Storage) ​

Configuration for SeaweedFS (or S3-compatible storage), which is used for object storage.

VariableDescriptionDefault
S3_USERThe username for S3 access.seaweed
S3_PASSWORDThe password for S3 access.seaweed
S3_ACCESS_KEYThe access key for S3 clients.pMEKIOCnYJhmssiKZDGU
S3_SECRET_KEYThe secret key for S3 clients.ECnXGyUR5ZrPsxeD5JEWxtI1CMZFMJ8kTJMMAQ5B
S3_DATA_BUCKET_NAMEThe bucket name for main data storage.data
S3_DB_BUCKET_NAMEThe bucket name for database dumps/backups.dbdumps
S3_ARTIFACTS_BUCKET_NAMEThe bucket name for build artifacts.artifacts
S3_SCRIPTS_BUCKET_NAMEThe bucket name for single-file action scripts.action-scripts
S3_ENDPOINTThe hostname or IP address of the S3 service.localhost

Database Configuration ​

Configuration for the PostgreSQL database.

VariableDescriptionDefault
DB_HOSTThe hostname of the database server.database
DB_PORTThe port of the database server.5432
DB_DATABASEThe name of the database.dbname
DB_USERThe database username.dbuser
DB_PASSWORDThe database password.dbuserpass
DATA_SOURCE_NAMEThe full connection string/DSN for TypeORM/Postgres.postgresql://dbuser:dbuserpass@database:5432/dbname?sslmode=disable
DEVSet to true to enable development features (verbose logging, etc.).true

TypeORM Configuration ​

VariableDescriptionDefault
ENTITIESGlob pattern to locate entity files.dist/**/*.entity.js

Seeding Configuration ​

VariableDescriptionDefault
SEEDSet to true to populate the database with initial seed data on startup.true

Authentication Configuration ​

VariableDescriptionDefault
VITE_USE_FAKE_OAUTH_FOR_DEVELOPMENTSet to true to enable the mock OAuth provider for local dev.true
GOOGLE_KEY_FILEPath to the Google Cloud service account key file.google-service-account.json
GOOGLE_CLIENT_IDGoogle OAuth Client ID.-
GOOGLE_CLIENT_SECRETGoogle OAuth Client Secret.-
GITHUB_CLIENT_IDGitHub OAuth Client ID.-
GITHUB_CLIENT_SECRETGitHub OAuth Client Secret.-

Access Config ​

VariableDescriptionDefault
ACCESS_CONFIG_PATHPath (inside the container) to the access_config.json that defines the affiliation groups. Required: the backend refuses to start without a valid config./app/backend/access_config.dev.json
ACCESS_CONFIG_FILEHost path of the deployment's access_config.json, mounted by docker-compose.dev.yml and docker-compose.prod.yml../access_config.json
JWT_SECRETSecret key used to sign and verify JWT tokens.SECRET

Docker & Registry Configuration ​

VariableDescriptionDefault
DOCKER_HUB_USERNAMEUsername for Docker Hub authentication.-
DOCKER_HUB_PASSWORDPassword for Docker Hub authentication.-
VITE_DOCKER_HUB_NAMESPACERestricts allowed Docker images to a specific namespace.-
ARTIFACTS_UPLOADER_IMAGEDocker image used for uploading artifacts.rslethz/kleinkram:artifact-uploader-latest
DOCKER_GIDThe group ID of the docker group on the host system.984

Released under the MIT License.