Configuration Reference
Environment variables you set for a self-hosted KubeWatch install.
A self-hosted install is configured through the .env file the installer writes to ~/kubewatch-erp/.env. The variables below are the ones you set or may want to change, the installer fills in sensible values for everything else automatically.
Core
Set by the installer, edit only if you know you need to.
| Variable | Description |
|---|---|
KUBEWATCH_MODE | Deployment mode. selfhosted for a self-hosted install. |
DOMAIN | The domain or IP this instance is served on. A real domain enables automatic HTTPS. |
ADMIN_EMAIL | Email for the first admin account. |
ADMIN_PASSWORD | Initial admin password (generated at random). Change it after first login. |
JWT_SECRET | Secret used to sign login sessions (randomly generated). Required: the platform refuses to start without it (see the note below). Keep it private. |
DB_PASSWORD | Database password (randomly generated). |
Licensing
| Variable | Description |
|---|---|
KUBEWATCH_LICENSE_KEY | Your license key. Optional, a 30-day trial starts automatically without one. Add it after purchase and restart. |
Activating a purchased key
You don't need to touch .env or restart anything to apply a new key, activate it from Settings → Billing → License in the dashboard as an admin. This immediately upgrades your organization's plan (self-hosted has no tier below Enterprise once a real key validates), and reports your organization's current name back to KubeWatch's license server so it shows up correctly if you ever contact support.
To also persist the key across container restarts (so a docker compose down && up doesn't fall back to trial mode), add it to .env afterward:
# ~/kubewatch-erp/.env
KUBEWATCH_LICENSE_KEY=kwl_ent_...
cd ~/kubewatch-erp && docker compose restart
Deactivating a license
An admin can also deactivate an active license from the same Settings → Billing → License page. This immediately reverts your organization to the Free plan, disables Enterprise features, and clears the key from KubeWatch's local cache, so it won't silently reactivate on the next restart. Remove KUBEWATCH_LICENSE_KEY from .env too if you set it there. Use this to correct a key entered by mistake, or before activating a different one.
Email (optional)
A self-hosted install ships with email disabled by default. Configure either Bird's Email API or your own SMTP relay to turn on outbound email, which powers:
- Password-reset links (the "Forgot password?" flow)
- Alert notifications delivered by email
- License expiry reminders
Option 1: Bird's Email API
Add your API key to ~/kubewatch-erp/.env and apply with docker compose up -d:
# ~/kubewatch-erp/.env
BIRD_API_KEY=bk_xxxxxxxxxxxxxxxxxxxxxxxx
[email protected]
| Variable | Description |
|---|---|
BIRD_API_KEY | Your Bird API key, which starts with bk_. The sending region is auto-detected from the key's own prefix (bk_us1_..., bk_eu1_...), so there is nothing else to configure. When set, this takes priority over any SMTP_* settings below. |
SMTP_FROM | The "from" address on outgoing email, e.g. [email protected]. Must be a verified sender identity on your Bird account. |
Option 2: Your own SMTP relay
Used only when BIRD_API_KEY is unset:
# ~/kubewatch-erp/.env
SMTP_HOST=smtp.your-provider.com
SMTP_PORT=587
SMTP_USER=your-smtp-username
SMTP_PASS=your-smtp-password
[email protected]
| Variable | Description |
|---|---|
SMTP_HOST | Your mail provider's SMTP host. Leave unset (and BIRD_API_KEY unset) to disable all outbound email. |
SMTP_PORT | SMTP port as provided by your email host (default 587). |
SMTP_USER | SMTP username. |
SMTP_PASS | SMTP password. |
SMTP_FROM | The "from" address on outgoing email, e.g. [email protected]. |
Advanced (optional)
Sensible defaults are applied, change only if you have a specific need.
| Variable | Description |
|---|---|
JWT_EXPIRY | How long a login session stays valid (default 24h). |
AI log diagnosis (embedded LLM)
Every self-hosted install ships with AI-powered log root-cause diagnosis ("Log Intelligence") working out of the box, at no extra cost: a small model (Phi-4-mini-instruct) runs locally in its own embedded-llm container via llama.cpp, with no API key and no per-token billing. It's on by default and downloads its model file (~2.5 GB) from Hugging Face the first time it starts.
| Variable | Description |
|---|---|
EMBEDDED_LLM_ENABLED | Set to false to turn off the embedded model entirely, for example on a low-memory install that only ever wants a paid bring-your-own-key provider. Default true. |
HF_TOKEN | Optional Hugging Face access token. Leave unset unless the model download fails with a 401, in which case a free read-only token from huggingface.co/settings/tokens fixes it. |
DEVOPS_AGENT_MAX_DIAGNOSES_PER_HOUR | Rate limit on AI diagnoses per hour, org-wide. Default 20. |
Changing configuration
- Edit
~/kubewatch-erp/.env - Restart the stack to apply the changes:
cd ~/kubewatch-erp
docker compose down && docker compose up -d