PodWarden
Guides

Configuration

Configure authentication, Tailscale, Hub, MCP tokens, and system settings

Environment Variables

All configuration is via environment variables or database-backed settings. Copy .env.example to .env and adjust.

Core Settings

VariableDefaultDescription
PW_POSTGRES_PASSWORDDatabase password (required)
PW_POSTGRES_HOSTpw-dbDatabase host
PW_POSTGRES_PORT5432Database port
PW_POSTGRES_DBpodwardenDatabase name
PW_API_PORT8000API port
PW_UI_PORT3000UI port

Tailscale

VariableDescription
PW_TAILSCALE_API_KEYTailscale API key for device discovery
PW_TAILSCALE_TAILNETYour tailnet name
PW_HOST_TAG_FILTEROnly show hosts with this Tailscale tag

Configure via Settings → Tailscale in the dashboard or via environment variables. Discovery tags filter which devices appear in PodWarden.

Authentication

PodWarden supports three auth modes, configurable in order of priority:

OIDC (Recommended)

VariableDescription
PW_OIDC_ISSUER_URLOIDC provider URL (e.g. Keycloak realm)
PW_OIDC_CLIENT_IDOAuth client ID
PW_OIDC_CLIENT_SECRETOAuth client secret
PW_OIDC_REDIRECT_URICallback URL

The frontend initiates the PKCE flow with your configured provider. After login, the provider returns an authorization code that is exchanged for access and refresh tokens. The access token is sent as a Bearer token on API requests.

Any OpenID Connect provider works: Keycloak, Google, GitHub, Authentik, etc.

Temporary Admin

VariableDescription
PW_TEMP_ADMIN_USERNAMETemporary admin username
PW_TEMP_ADMIN_PASSWORDTemporary admin password

Useful for initial setup. Creates a temporary admin account that bypasses OIDC. Remove these variables after creating permanent OIDC or local user accounts.

Local Users

Managed via Settings → Users. Create accounts with email, password, and role. No external identity provider required.

Roles:

  • admin — Full access to all resources, settings, user management, secrets, token creation
  • operator — Manage hosts, clusters, workloads, deployments, storage
  • viewer — Read-only access to all resources

Registry

VariableDefaultDescription
PW_DEFAULT_REGISTRYDefault container registry URL
PW_DEFAULT_IMAGE_TAGlatestDefault image tag for deployments

Set fleet-wide defaults for container image registry and tag. Individual stacks can override these.

SSH / Provisioning

VariableDescription
PW_SSH_KEY_PATHPath to SSH private key for host provisioning
PW_SSH_USERSSH user for provisioning (default: root)

PodWarden uses SSH to provision hosts via Ansible — installing Docker, k3s-agent, and GPU drivers. Generate SSH key pairs from Settings → Secrets → Generate SSH Key Pair or provide your own.

PodWarden Hub

VariableDescription
PODWARDEN_HUB_URLHub URL (default: https://apps.podwarden.com)
PODWARDEN_HUB_API_KEYHub API key (starts with pwc_)

Connect your PodWarden instance to PodWarden Hub for catalog access. See Connecting to Hub.

Database-Backed Settings

Some settings are stored in the database and configurable via the Settings page. These override environment variables when set.

SMTP

Configure email notifications under Settings → System Config → SMTP:

FieldDescription
HostSMTP server hostname
PortSMTP server port (587 for TLS)
UsernameSMTP auth username
PasswordSMTP auth password
From AddressSender email address
TLSEnable STARTTLS

Click Test Email to send a test message and verify your configuration.

OIDC

Override OIDC environment variables from the UI under Settings → System Config → OIDC:

FieldDescription
Issuer URLOIDC provider URL
Client IDOAuth client ID
Client SecretOAuth client secret
Redirect URICallback URL

Click Test OIDC to verify the discovery endpoint responds correctly.

Hub Settings

Configure the PodWarden Hub connection under Settings → Hub:

FieldDescription
Hub URLhttps://apps.podwarden.com
API KeyYour organization's Hub API key (pwc_...)

Click Test Connection to verify the API key is valid and Hub is reachable. See Connecting to Hub for the full setup guide.

Tailscale Settings

Configure host discovery under Settings → Tailscale:

FieldDescription
API KeyTailscale API key
TailnetYour tailnet name
Discovery TagsFilter hosts by Tailscale tags

The API key and tailnet are stored as encrypted app secrets.

Registry Settings

Configure fleet-wide defaults under Settings → Registry:

FieldDescription
Default Registry URLDefault container registry for all workloads
Default Image TagDefault tag (e.g. latest, stable)

MCP Tokens

Machine-readable API tokens for automation and integrations. Create and manage tokens under Settings → MCP Tokens.

Creating a Token

  1. Go to Settings → MCP Tokens
  2. Click Create Token
  3. Set a Name (descriptive label, e.g. "CI/CD Pipeline")
  4. Choose a Role — determines API access level:
    • admin — Full access to all resources
    • operator — Manage hosts, clusters, workloads, deployments, storage
    • viewer — Read-only access
  5. Set Expiry — 1 to 365 days, or no expiry
  6. Copy the token immediately — it starts with pwm_ and is shown only once

Using a Token

Include the token as a Bearer token in API requests:

curl -H "Authorization: Bearer pwm_a1b2c3d4e5f6..." \
  https://podwarden.example.com/api/v1/hosts

Token Management

  • Revoke — Immediately invalidate a token
  • Reissue — Generate a new key while keeping the same name and role
  • Audit Log — Every API request made with the token is logged with method, path, and status code

View audit logs per token or across all tokens under Settings → MCP Tokens → Audit.

Use Cases

  • CI/CD pipelines — Record deployments via POST /api/v1/deployments
  • Monitoring — Read cluster status and workload health
  • Automation scripts — Create/manage workloads programmatically
  • MCP (Model Context Protocol) — Allow AI agents to interact with your fleet

Secrets

PodWarden provides encrypted secret storage. Manage secrets under Settings → Secrets.

Creating Secrets

  1. Go to Settings → Secrets
  2. Click Create Secret
  3. Enter a Key (unique identifier) and Value
  4. Save — the value is encrypted at rest

Secrets can be referenced by stacks via secret_refs and are injected as environment variables at deploy time.

SSH Key Pairs

PodWarden can generate ed25519 SSH key pairs for host provisioning:

  1. Go to Settings → Secrets
  2. Click Generate SSH Key Pair
  3. Enter a name for the key pair
  4. PodWarden generates the keys and stores both the private and public key as secrets

View which key pairs are in use by provisioned hosts under SSH Key Pairs in Use.