Skip to content

Configuration

All configuration is done via environment variables.

Server

VariableDefaultDescription
RUNGU_LISTEN0.0.0.0:3000HTTP listen address
RUNGU_DBrungu.dbSQLite database path
RUNGU_CORS_ORIGINS(APP_URL only)Comma-separated CORS origins. Default: only APP_URL. Set to * to allow all (dev only).
RUNGU_SECURE_COOKIEtrueSet false for HTTP (no Secure flag on cookies)

Auth (Session)

VariableDefaultDescription
APP_URLhttp://localhost:3000Base URL (used for OAuth redirect URIs)
APP_SECRET(required)JWT signing secret. Must be set — generate with openssl rand -hex 32. Process exits if not set.

Google OAuth

Set these to enable Google login:

VariableDescription
GOOGLE_CLIENT_IDGoogle OAuth client ID
GOOGLE_CLIENT_SECRETGoogle OAuth client secret
GOOGLE_REDIRECT_URIOverride redirect URI (default: {APP_URL}/auth/google/callback)

GitHub OAuth

Set these to enable GitHub login:

VariableDescription
GITHUB_CLIENT_IDGitHub OAuth App client ID
GITHUB_CLIENT_SECRETGitHub OAuth App client secret
GITHUB_REDIRECT_URIOverride redirect URI (default: {APP_URL}/auth/github/callback)

Keycloak OAuth

Set these to enable Keycloak login:

VariableDescription
KEYCLOAK_URLKeycloak base URL (e.g., https://auth.example.com)
KEYCLOAK_REALMKeycloak realm name
KEYCLOAK_CLIENT_IDClient ID for Rungu in Keycloak
KEYCLOAK_CLIENT_SECRETClient secret for Rungu in Keycloak
KEYCLOAK_REDIRECT_URIOverride redirect URI

Example .env

env
# Server
RUNGU_LISTEN=0.0.0.0:3000
RUNGU_DB=/data/rungu.db
APP_SECRET=a1b2c3d4e5f6...

# Auth
APP_URL=https://feedback.example.com

# Google
GOOGLE_CLIENT_ID=123.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=GOCSPX-abc

# GitHub
GITHUB_CLIENT_ID=Iv1.abc
GITHUB_CLIENT_SECRET=def123

# Keycloak (optional — only if you have Keycloak)
# KEYCLOAK_URL=https://auth.example.com
# KEYCLOAK_REALM=myorg
# KEYCLOAK_CLIENT_ID=rungu
# KEYCLOAK_CLIENT_SECRET=xyz789

Provider Priority

  • Empty/unset provider ENV = that provider is disabled
  • Multiple providers can be active simultaneously
  • Users are identified by email — same email across providers = same user
  • First login creates the user, subsequent logins from any provider link to the same account