Configuration
Configure Kubey using environment variables.
Environment Variables
| Variable | Default | Description |
|---|---|---|
| PORT | 8080 | Port for the web server |
| HOST | 0.0.0.0 | Host to bind to |
| AUTH_MODE | single | Authentication mode (single, shared, hybrid) |
| DATABASE_URL | — | PostgreSQL connection string (required for shared mode) |
| JWT_SECRET | — | Secret for JWT token signing |
| ENCRYPTION_KEY | — | Key for encrypting stored kubeconfigs |
| KUBECONFIG | ~/.kube/config | Path to kubeconfig file |
| LOG_LEVEL | info | Logging level (debug, info, warn, error) |
Authentication Modes
Single Mode
No authentication required. Anyone with network access can use Kubey. Best for local development or internal networks.
AUTH_MODE=singleShared Mode
Full multi-user support with OAuth. Requires PostgreSQL. Users authenticate and see clusters shared with them.
AUTH_MODE=shared
DATABASE_URL=postgres://user:pass@host:5432/kubey
JWT_SECRET=your-secret-key
GITHUB_CLIENT_ID=xxx
GITHUB_CLIENT_SECRET=xxxHybrid Mode
Like shared mode, but users can also see clusters from the mounted kubeconfig.
AUTH_MODE=hybridOAuth Configuration
GitHub
| Variable | Description |
|---|---|
| GITHUB_CLIENT_ID | GitHub OAuth App Client ID |
| GITHUB_CLIENT_SECRET | GitHub OAuth App Client Secret |
| Variable | Description |
|---|---|
| GOOGLE_CLIENT_ID | Google OAuth Client ID |
| GOOGLE_CLIENT_SECRET | Google OAuth Client Secret |
Admin Settings
These settings can be configured through the Admin Panel UI:
- Allowed Domains — Restrict sign-ups to specific email domains (e.g., @yourcompany.com)
- Invite Only — Disable self-registration, only invited users can sign up
- Cluster Sharing — Share clusters between users
Example Configuration
.envbash
# Server
PORT=8080
HOST=0.0.0.0
LOG_LEVEL=info
# Authentication
AUTH_MODE=shared
JWT_SECRET=change-me-to-a-secure-random-string
ENCRYPTION_KEY=change-me-to-another-secure-string
# Database
DATABASE_URL=postgres://kubey:kubey@localhost:5432/kubey?sslmode=disable
# OAuth - GitHub
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
# OAuth - Google (optional)
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# Kubernetes (optional, defaults to ~/.kube/config)
KUBECONFIG=/path/to/your/kubeconfig