Skip to content

Configuration Reference

The core backend is configured via a config.yaml file and/or environment variables. Viper is used for configuration loading with environment variable overrides.

KeyEnv VariableDefaultDescription
PORTPORT3000HTTP server port
GIN_MODEGIN_MODEdebugGin mode (debug, release, test)
LOG_LEVELLOG_LEVELinfoLog level (debug, info, warn, error)
KeyEnv VariableDefaultDescription
MONGO_URIMONGO_URIMongoDB connection URI (required)

The database name is extracted from the URI path. Defaults to kubeorch if not specified.

KeyEnv VariableDefaultDescription
JWT_SECRETJWT_SECRETSecret key for JWT token signing (required)
ENCRYPTION_KEYENCRYPTION_KEYAES-256-GCM key for encrypting cluster credentials (required)
TOKEN_REFRESH_MAX_AGE_DAYSTOKEN_REFRESH_MAX_AGE_DAYS7Max age for token refresh in days
KeyEnv VariableDefaultDescription
BASE_URLBASE_URLhttp://localhost:3000Backend external URL (for OAuth callbacks)
FRONTEND_URLFRONTEND_URLhttp://localhost:3001Frontend URL (for OAuth redirects)
KeyEnv VariableDefaultDescription
INVITE_CODEINVITE_CODERegistration invite code
REGENERATE_INVITE_AFTER_SIGNUPREGENERATE_INVITE_AFTER_SIGNUPtrueAuto-regenerate invite code after each signup
KeyEnv VariableDefaultDescription
TEMPLATES_DIRTEMPLATES_DIR./templatesPath to K8s resource templates directory
CLUSTER_LOG_TTL_HOURSCLUSTER_LOG_TTL_HOURS24How long to keep cluster connection logs

Authentication is configured under the AUTH key in config.yaml.

AUTH:
BUILTIN:
ENABLED: true # Enable email/password login
SIGNUP_ENABLED: true # Enable registration form
ALLOWED_DOMAINS: # Restrict signup to specific email domains
- "company.com"
AUTH:
PROVIDERS:
# OIDC provider (auto-discovers endpoints)
- NAME: "authentik" # URL-safe slug
DISPLAY_NAME: "Authentik SSO" # Login button label
TYPE: "oidc"
ENABLED: true
CLIENT_ID: "your-client-id"
CLIENT_SECRET: "your-client-secret"
ISSUER_URL: "https://auth.example.com/application/o/kubeorch/"
SCOPES: ["openid", "profile", "email"]
ICON: "lock" # Lucide icon name
ALLOWED_DOMAINS: ["company.com"] # (Optional) email domain filter
CLAIM_MAPPINGS: # (Optional) non-standard claim names
EMAIL: "email"
NAME: "preferred_username"
# OAuth2 provider (explicit endpoint URLs)
- NAME: "github"
DISPLAY_NAME: "GitHub"
TYPE: "oauth2"
ENABLED: true
CLIENT_ID: "your-github-client-id"
CLIENT_SECRET: "your-github-client-secret"
AUTHORIZATION_URL: "https://github.com/login/oauth/authorize"
TOKEN_URL: "https://github.com/login/oauth/access_token"
USERINFO_URL: "https://api.github.com/user"
SCOPES: ["user:email"]
ICON: "github"

If the AUTH section is omitted entirely, only built-in email/password auth is enabled (default behavior).

At least one authentication method must be enabled — the server will refuse to start if both built-in auth is disabled and no OAuth providers are configured.

The UI is configured via environment variables (.env.local file for local development).

VariableRequiredDefaultDescription
NEXT_PUBLIC_API_URLYesCore backend API URL (e.g., http://localhost:3000/v1/api)

The UI uses:

  • Next.js 15 with Turbopack for development
  • Tailwind CSS v4 with PostCSS
  • Vitest for testing
  • ESLint + Prettier for linting and formatting
ScriptDescription
npm run devStart dev server on port 3001 (with Turbopack)
npm run buildProduction build
npm run startStart production server on port 3001
npm run lintRun ESLint
npm run formatFormat with Prettier
npm run type-checkTypeScript type checking
npm run testRun tests with Vitest
npm run test:coverageRun tests with coverage report

The following collections are created automatically on startup:

CollectionIndexes
usersUnique on email; sparse compound on auth_provider + provider_user_id
workflows
workflow_versionsUnique compound on workflow_id + version; compound on workflow_id + created_at
workflow_runs
oauth_statesTTL index (10 min) on created_at
oauth_codesTTL index (30 sec) on created_at
dashboard_stats

Additional collections (clusters, resources, registries, plugins, builds, import_sessions) are created by their respective repositories with indexes as needed.