Documentation
Everything you need to install, configure, and use Pabawi to manage your infrastructure.
Quick Start
The fastest way to get Pabawi running is with the interactive setup script. It handles prerequisite checks, config file generation, dependency installation, and first launch.
$ git clone https://github.com/example42/pabawi $ cd pabawi $ ./scripts/setup.sh
The setup script checks prerequisites, generates backend/.env, installs dependencies and starts the app. Once running, open http://localhost:3000 in your browser.
Before exposing a fresh install: the first administrator is claimed with a bootstrap token (PABAWI_BOOTSTRAP_TOKEN). See Initial Setup.
Tip: All integrations are optional. You don't need Puppet, Bolt, or Ansible to get started: enable only SSH and Pabawi works as a standalone web UI for your servers.
Prerequisites
Hard requirements (always needed):
- Node.js 24 LTS and npm 11, or a container engine (Docker) if you use the container image
Soft requirements (only needed for the integrations you enable):
- Bolt CLI for the Bolt integration (bundled in the
batteriesimage) - Ansible CLI (
ansibleandansible-playbook) for the Ansible integration - Puppet/OpenVox agent for Puppet runs and as a source of SSL certs for PuppetDB and Puppetserver
- Control repo for Hiera (local path to your Puppet control repository)
- SSH access with keys and a managed host fingerprint file for the SSH integration
Manual Setup
If you prefer to configure things by hand:
$ git clone https://github.com/example42/pabawi && cd pabawi $ npm run install:all # installs deps, rebuilds native modules $ cp backend/.env.example backend/.env # Edit backend/.env with your settings $ npm run dev:fullstack # build + serve everything on port 3000
Upgrading
$ git fetch --tags && git checkout v<VERSION> && npm run install:all && npm run build
For Docker use docker pull; for Kubernetes use helm upgrade. Migrations run automatically on startup: back up your database first and check the CHANGELOG.
Initial Setup
Authentication is mandatory and has no environment switch. Before starting a fresh install, set two secrets in the environment:
JWT_SECRET: at least 32 characters of random entropy, not a placeholder. The server refuses to start otherwise.PABAWI_BOOTSTRAP_TOKEN: an independently generated secret of 32 to 512 characters, used to claim the initial administrator account. When unset, enrollment is disabled.
$ openssl rand -base64 32 # JWT_SECRET $ openssl rand -hex 32 # PABAWI_BOOTSTRAP_TOKEN
Keep access to the instance private until the administrator is claimed, then remove PABAWI_BOOTSTRAP_TOKEN and restart.
Docker Deployment
Two image profiles are published from the same source and version, for amd64 and arm64:
| Tag | Contents | Use when |
|---|---|---|
| example42/pabawi:latest | Pabawi application and Node dependencies | Integrations use HTTP APIs, cloud SDKs, or the embedded SSH client |
| example42/pabawi:batteries | Core plus Bolt, Ansible, Puppet/OpenVox, OpenSSH, Git, rsync and sshpass | Integrations need local infrastructure commands |
# Batteries image, because this example mounts a Bolt project $ docker run -d \ --name pabawi \ --user "$(id -u):1001" \ -p 127.0.0.1:3000:3000 \ -v "$(pwd)/bolt-project:/opt/pabawi/bolt-project:ro" \ -v "$(pwd)/data:/opt/pabawi/data" \ --env-file .env \ example42/pabawi:batteries
Set HOST=0.0.0.0 and PORT=3000 inside the container. The user passed with --user must be able to read all mounted files; the container runs as UID 1001.
Volume mounts
All paths in .env must be container paths (under /opt/pabawi/), not host paths.
| Data | Host → Container | Env setting |
|---|---|---|
| SQLite DB | ./data → /opt/pabawi/data | DATABASE_PATH=/opt/pabawi/data/pabawi.db |
| Bolt project | ./bolt-project → /opt/pabawi/bolt-project | BOLT_PROJECT_PATH=/opt/pabawi/bolt-project |
| Control repo | ./control-repo → /opt/pabawi/control-repo | HIERA_CONTROL_REPO_PATH=/opt/pabawi/control-repo |
| Ansible | ./ansible → /opt/pabawi/ansible | ANSIBLE_PROJECT_PATH=/opt/pabawi/ansible |
| SSL certs | ./certs → /opt/pabawi/certs | PUPPETDB_SSL_CA=/opt/pabawi/certs/ca.pem |
| SSH keys | ~/.ssh → /opt/pabawi/ssh | SSH_DEFAULT_KEY=/opt/pabawi/ssh/id_rsa |
$ chown -R 1001:1001 ./data $ chmod 755 ./bolt-project ./control-repo $ chmod 600 ./certs/*.pem ./certs/*.key
Docker Compose
services: pabawi: image: example42/pabawi:batteries restart: unless-stopped ports: - "127.0.0.1:3000:3000" user: "${UID:-1000}:1001" env_file: .env volumes: - ./bolt-project:/opt/pabawi/bolt-project:ro - ./control-repo:/opt/pabawi/control-repo:ro - ./ansible:/opt/pabawi/ansible:ro - ./certs:/opt/pabawi/certs:ro - ~/.ssh:/opt/pabawi/ssh:ro - ./data:/opt/pabawi/data
Port binding: the repository's docker-compose.yml publishes the application and PostgreSQL ports on all host interfaces by default. For a private first start, edit the mappings to 127.0.0.1:3000:3000 and 127.0.0.1:5432:5432.
PostgreSQL backend
The repository's compose file includes a profile-gated postgres service, off by default:
$ docker compose --profile postgres up # .env DB_TYPE=postgres DATABASE_URL=postgres://pabawi:pabawi@postgres:5432/pabawi
Service credentials default to pabawi and can be overridden with POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DB and POSTGRES_PORT.
Building the image
$ docker build --target core -t pabawi:core . $ docker build --target batteries -t pabawi:batteries . $ docker buildx build --platform linux/amd64,linux/arm64 --target core -t pabawi:core .
SSL certificates for Puppet
$ mkdir -p ./certs $ scp puppet.example.com:/etc/puppetlabs/puppet/ssl/certs/ca.pem ./certs/ $ scp puppet.example.com:/etc/puppetlabs/puppet/ssl/certs/pabawi.pem ./certs/client.crt $ scp puppet.example.com:/etc/puppetlabs/puppet/ssl/private_keys/pabawi.pem ./certs/client.key $ chmod 644 ./certs/ca.pem ./certs/client.crt; chmod 600 ./certs/client.key
Docker troubleshooting
| Problem | Fix |
|---|---|
| Permission denied on volume | Check ownership (chown -R 1001:1001 ./data) and mode |
| "Bolt project not found" | Check BOLT_PROJECT_PATH is /opt/pabawi/bolt-project (container path) |
| SSL errors | Verify cert permissions (600) and that the CA matches the server cert |
| Container exits immediately | Check docker logs pabawi for config validation errors |
Kubernetes Deployment
The repository includes a Helm chart at charts/pabawi. Pabawi's execution queue, SSE tickets, MCP transports and console sessions are process-local, so keep replicas: 1, with SQLite or PostgreSQL. SQLite chart rollouts always use the Recreate strategy.
Helm
For a fresh installation, put an independently generated bootstrap token in a restricted values file (mode 0600):
# bootstrap-values.yaml secretEnv: PABAWI_BOOTSTRAP_TOKEN: "<independent-random-token>" # SQLite, single replica $ helm dependency build ./charts/pabawi $ helm install pabawi ./charts/pabawi -f bootstrap-values.yaml \ --set secrets.jwtSecret="$(openssl rand -base64 48)" # PostgreSQL via an existing Secret containing DATABASE_URL $ helm install pabawi ./charts/pabawi -f bootstrap-values.yaml \ --set database.type=postgres \ --set database.postgres.existingSecret=pabawi-db \ --set replicaCount=1 \ --set secrets.jwtSecret="$(openssl rand -base64 48)"
The chart can also install a bundled Bitnami PostgreSQL (--set postgresql.enabled=true), suitable for demos and isolated single-replica environments. For production use managed or operator-managed PostgreSQL.
Raw manifests
- ConfigMap for non-sensitive settings (
PORT,HOST,DB_TYPE,BOLT_PROJECT_PATH, whitelist mode, cache TTLs,ALLOW_DESTRUCTIVE_PROVISIONING) - Secret
pabawi-secretsforJWT_SECRET,PABAWI_BOOTSTRAP_TOKEN,DATABASE_URL(PostgreSQL) and credentials; separate Secrets for SSL certs and SSH keys, mounted read-only - PersistentVolumeClaim (ReadWriteOnce) mounted at
/opt/pabawi/data. Required for SQLite, not for the application database whenDB_TYPE=postgres - Deployment with
replicas: 1,strategy: Recreate,runAsUser: 1001,fsGroup: 1001, and liveness/readiness probes onGET /api/healthport 3000 - Service exposing port 3000 (use LoadBalancer or Ingress for external access)
spec: replicas: 1 strategy: type: Recreate template: spec: securityContext: runAsUser: 1001 fsGroup: 1001 containers: - name: pabawi image: example42/pabawi:latest envFrom: - configMapRef: { name: pabawi-config } - secretRef: { name: pabawi-secrets } livenessProbe: httpGet: { path: /api/health, port: 3000 } initialDelaySeconds: 30
Config changes need a restart. For manually applied manifests and external Secrets, updating a resource does not update environment variables in a running process. Run kubectl rollout restart deployment/pabawi after applying changes. Chart-managed configuration changes trigger a rollout automatically.
Full manifests: upstream Kubernetes guide.
Configuration
Configuration is read from the process environment at startup. Source development loads backend/.env; containers receive variables from their deployment. ConfigService validates with Zod, and SSH has its own parser. Invalid values make the server exit immediately with Configuration validation failed: <field>: <reason>.
Run scripts/setup.sh for interactive setup, or use backend/.env.example as a template. Never commit .env to version control. Credential values belong in restricted environment files or Secrets. Durations state their units: most settings are milliseconds, SSH and LDAP timeouts are seconds.
Enable integrations with <PREFIX>_ENABLED=true. Disabled integrations are skipped at startup: no connection attempts, no health check failures.
Core Server
| Variable | Default | Description |
|---|---|---|
| NODE_ENV | unset | test disables dotenv loading; deployment tooling commonly sets production |
| PORT | 3000 | HTTP port |
| HOST | localhost | Bind address (0.0.0.0 for all interfaces) |
| LOG_LEVEL | info | error / warn / info / debug |
| PABAWI_CRASH_DUMP_DIR | <cwd>/crash-dumps | Where JSON crash dumps and Node diagnostic reports are written (created with mode 0700) |
| CORS_ALLOWED_ORIGINS | (none) | Comma-separated list of allowed origins |
| UI_SHOW_HOME_PAGE_RUN_CHART | true | Show the aggregated Puppet run history chart on the home page (requires PuppetDB) |
Database
Pabawi runs on SQLite by default and supports PostgreSQL as an alternative backend. The same schema and code path serve both, and migrations run automatically on startup.
| Variable | Default | Description |
|---|---|---|
| DB_TYPE | sqlite | sqlite or postgres |
| DATABASE_PATH | ./data/pabawi.db | SQLite file path (directory must exist and be writable) |
| DATABASE_URL | (none) | Required when DB_TYPE=postgres, e.g. postgres://user:pass@host:5432/pabawi (secret) |
DB_TYPE=postgres without a DATABASE_URL fails fast at startup.
Authentication & Secrets
| Variable | Default | Description |
|---|---|---|
| PABAWI_BOOTSTRAP_TOKEN | (empty) | Initial enrollment secret, 32 to 512 characters. Empty disables enrollment. Remove after setup. (secret) |
| JWT_SECRET | required | JWT signing secret: at least 32 chars of random entropy, not a placeholder. Generate with openssl rand -base64 32. Tokens use iss=pabawi / aud=pabawi. (secret) |
| PABAWI_LIFECYCLE_TOKEN | (empty) | Optional machine credential for the generic lifecycle endpoints. (secret) |
Security: The server refuses to start with a weak or placeholder JWT_SECRET. Never reuse it across environments.
Lifecycle machine credential
PABAWI_LIFECYCLE_TOKEN is for unattended clients (scripts, cron jobs, webhooks) that drive POST /api/inventory/:id/action, DELETE /api/inventory/:id and GET /api/inventory/:id/lifecycle-actions without a user session. Send it as Authorization: Bearer <token> instead of a user JWT.
- When set, the server provisions a built-in
lifecycle-serviceaccount with a "Lifecycle Service" role holdingread,lifecycleanddestroyonproxmox,awsandazure, subject toALLOW_DESTRUCTIVE_PROVISIONING - The token is accepted on
/api/inventoryonly - To change its scope, edit the role's permissions (the role is not rewritten on restart; do not delete it)
- To revoke: deactivate the
lifecycle-serviceaccount (immediate) or unset the variable and restart
Entra ID SSO & LDAP
Azure Entra ID SSO
Optional federated login via OpenID Connect. When enabled, the login page shows "Sign in with Microsoft" alongside local login. New federated users are provisioned automatically with the default viewer role.
| Variable | Default | Description |
|---|---|---|
| ENTRA_ID_ENABLED | false | Set to "true" to enable; other ENTRA_ID_* vars are ignored otherwise |
| ENTRA_ID_TENANT_ID | required | Azure tenant (directory) ID |
| ENTRA_ID_CLIENT_ID | required | Application (client) ID |
| ENTRA_ID_CLIENT_SECRET | required | Client secret value (secret) |
| ENTRA_ID_REDIRECT_URI | required | https://your-host/api/auth/entra-id/callback, must match the app registration |
| ENTRA_ID_SCOPES | openid,profile,email | Comma-separated OAuth scopes |
| ENTRA_ID_GROUP_MAPPING | (none) | JSON object mapping Azure group IDs to Pabawi role names, e.g. {"uuid-1":"administrator"} |
| ENTRA_ID_POST_LOGOUT_REDIRECT_URI | (app base URL) | Where Microsoft redirects after SSO logout |
| ENTRA_ID_JWKS_CACHE_TTL_MS | 86400000 | JWKS signing key cache (24 h) |
With ENTRA_ID_ENABLED=true, the four required variables must all be set or the server refuses to start. When ENTRA_ID_GROUP_MAPPING is set, roles are synchronized from Azure group memberships at each SSO login; manual grants are preserved.
LDAP directory service
Optional LDAP / Active Directory login with read-only directory operations and group-to-role mapping. LDAP is disabled by default; when enabled, an invalid configuration fails startup, while an unreachable directory does not prevent startup or local access. No role is granted automatically: configure group mappings or grant a role manually after the first login. Changes require a restart.
| Variable | Default | Description |
|---|---|---|
| LDAP_ENABLED | false | Strict boolean |
| LDAP_DIRECTORY_ID | required | Stable identifier (letters, digits, _, -) |
| LDAP_DIRECTORY_TYPE | required | ad or openldap |
| LDAP_HOSTNAME | required | FQDN, no protocol, path or credentials |
| LDAP_PORT | 636 / 389 | 636 for LDAPS, 389 for StartTLS |
| LDAP_FAILOVER_ENDPOINTS | [] | JSON array of extra {"hostname","port"} objects (max four) |
| LDAP_TLS_MODE | ldaps | ldaps or starttls; TLS 1.2+ and hostname validation always required |
| LDAP_CA_FILE | (system trust) | PEM CA bundle added to system trust |
| LDAP_LOOKUP_USER / LDAP_LOOKUP_PASSWORD | required | Lookup DN and password (secret), unless LDAP_ANONYMOUS_LOOKUP=true |
| LDAP_BASE_DN | required | Base DN |
| LDAP_USER_ELIGIBILITY_FILTER | (empty) | Required for OpenLDAP, e.g. (employeeType=active); AD uses a built-in policy |
| LDAP_SEARCH_NESTED_GROUPS | false | Include nested group membership |
| LDAP_REVALIDATION_INTERVAL_SECONDS | 300 | Maximum age of a successful eligibility check (max 300) |
| LDAP_CONNECT_TIMEOUT_SECONDS / LDAP_OPERATION_TIMEOUT_SECONDS / LDAP_REQUEST_TIMEOUT_SECONDS | 10 / 10 / 30 | Timeouts (max 30 / 30 / 60) |
| LDAP_MAX_CONCURRENT_OPERATIONS | 10 | Max 100; excess requests are rejected temporarily |
The user and group attribute mappings (LDAP_USER_*, LDAP_GROUP_*) default to sensible values per directory type, and nested-group and search limits are tunable. See the upstream configuration guide for the full list. LDAP administration endpoints require rbac:admin.
Command Whitelist
| Variable | Default | Description |
|---|---|---|
| COMMAND_WHITELIST_ALLOW_ALL | false | true skips the whitelist check (dev only) |
| COMMAND_WHITELIST | [] | JSON array of allowed commands |
| COMMAND_WHITELIST_MATCH_MODE | exact | exact (full match) or prefix (starts-with) |
# Exact match COMMAND_WHITELIST='["uptime","df -h","free -m","systemctl status nginx"]' COMMAND_WHITELIST_MATCH_MODE=exact # Prefix match (allows "systemctl status *") COMMAND_WHITELIST='["systemctl status","journalctl -u"]' COMMAND_WHITELIST_MATCH_MODE=prefix
The whitelist is enforced on every command-execution path: single-node, multi-node batch, and re-execution. Shell metacharacters (; | & ` $() {} * ? [] ~ < >, backslash and newlines) and commands beginning with - are always rejected, even with COMMAND_WHITELIST_ALLOW_ALL=true.
Never set COMMAND_WHITELIST_ALLOW_ALL=true in production, and never whitelist destructive commands (rm, dd, mkfs).
Streaming, Console, Cache & Queue
Execution queue
| Variable | Default | Description |
|---|---|---|
| CONCURRENT_EXECUTION_LIMIT | 5 | Shared per-process concurrency for commands, tasks, playbooks, packages, Puppet runs, re-execution and batches |
| MAX_QUEUE_SIZE | 50 | Max queued executions before rejecting |
Caching
| Variable | Default | Description |
|---|---|---|
| CACHE_INVENTORY_TTL | 30000 | Inventory cache TTL in ms (must be positive) |
| CACHE_FACTS_TTL | 300000 | Node facts cache TTL in ms (must be positive) |
Streaming
| Variable | Default | Description |
|---|---|---|
| STREAMING_BUFFER_MS | 100 | Output batch interval in ms (also the worst-case delay) |
| STREAMING_MAX_OUTPUT_SIZE | 10485760 | Max output per execution in bytes (10 MB) |
| STREAMING_MAX_LINE_LENGTH | 10000 | Max characters per line before truncation |
Console (VNC / Terminal)
| Variable | Default | Description |
|---|---|---|
| CONSOLE_SESSION_TIMEOUT_MS | 300000 | Idle session timeout (5 min) |
| CONSOLE_MAX_SESSION_DURATION | 28800000 | Absolute session lifetime (8 h) |
| CONSOLE_MAX_CONCURRENT_SESSIONS | 3 | Max sessions per user per process |
| CONSOLE_HEARTBEAT_INTERVAL_MS | 30000 | Heartbeat interval (must be below the idle timeout) |
| CONSOLE_VERIFY_UPSTREAM_TLS | true | Verify the upstream console host certificate. Set false only on trusted networks with self-signed certs |
Provisioning Safety
| Variable | Default | Description |
|---|---|---|
| ALLOW_DESTRUCTIVE_PROVISIONING | false | Allow destroy/terminate/deallocate across all provisioning plugins. Returns 403 DESTRUCTIVE_ACTION_DISABLED when false |
Keep it false in production to prevent accidental VM/instance deletion.
Integrations Overview
Pabawi uses a plugin architecture. Each integration is independent: a failed initialization is logged and the others keep working. IntegrationManager merges inventory and facts from all enabled plugins, and higher source priorities win during merging.
| Plugin | Priority | Type | Provides |
|---|---|---|---|
| SSH | 50 (highest) | Information + execution | Inventory, commands |
| PuppetDB | 10 | Information | Inventory, facts, reports, catalogs, events |
| Puppetserver | 8 | Information | Inventory, facts, catalogs, environments, metrics |
| Checkmk | 8 | Information | Host inventory, live service status, state-change events |
| Proxmox | 7 | Information + execution | Inventory, lifecycle, provisioning (VMs & LXC) |
| AWS | 7 | Information + execution | Inventory, lifecycle, provisioning (EC2) |
| Azure | 7 | Information + execution | Inventory, lifecycle, provisioning (VMs) |
| Hiera | 6 | Information | Hierarchy browsing, lookups, code analysis |
| Bolt | 5 | Information + execution | Inventory, commands, tasks, Puppet runs, packages |
| Ansible | 5 | Information + execution | Inventory, commands, playbooks, packages |
SSH and Proxmox also accept priority settings (SSH_PRIORITY, PROXMOX_PRIORITY). Each integration has an in-app setup guide that generates a ready-to-paste .env snippet.
Bolt Integration
Bolt is Pabawi's primary execution tool: command execution, task execution, Puppet runs, and package installation. Pabawi spawns the Bolt CLI directly and uses your existing Bolt project and inventory as-is. The Bolt CLI must be installed on the host (it is bundled in the batteries image).
| Variable | Default | Description |
|---|---|---|
| BOLT_PROJECT_PATH | cwd | Bolt project directory containing inventory.yaml and bolt-project.yaml |
| BOLT_EXECUTION_TIMEOUT | 300000 | Max execution time per command in ms (5 min) |
| BOLT_PACKAGE_TASKS | built-in package | JSON array of package task definitions backing the Install Package UI |
# bolt-project.yaml: color: false is critical, ANSI codes break JSON parsing name: my-project modulepath: - modules color: false # Package tasks: parameterMapping maps UI fields to task parameter names BOLT_PACKAGE_TASKS='[{"name":"tp::install","label":"Tiny Puppet","parameterMapping":{"packageName":"app","ensure":"ensure","settings":"settings"}}]'
Note: Commands are validated against the command whitelist before execution. Bolt tasks are discovered from the project's installed modules (bolt module install).
Ansible Integration
Ad-hoc command execution, package installation, and playbook execution on managed hosts. Requires ansible and ansible-playbook in PATH and a reachable inventory (INI or YAML).
| Variable | Default | Description |
|---|---|---|
| ANSIBLE_ENABLED | false | Set to true to enable |
| ANSIBLE_PROJECT_PATH | cwd | Ansible project directory (working directory for commands) |
| ANSIBLE_INVENTORY_PATH | inventory/hosts | Inventory file path relative to the project, or absolute |
| ANSIBLE_EXECUTION_TIMEOUT | 300000 | Max execution time in ms |
Place playbooks in the project (e.g. playbooks/); they appear in the Run Playbook section on node detail pages. Validate from the CLI first:
$ cd $ANSIBLE_PROJECT_PATH $ ansible all -i inventory/hosts -m ping $ ansible-playbook -i inventory/hosts playbooks/site.yml --check
SSH Integration
Direct SSH execution without Bolt or Ansible, using the embedded SSH client. Hosts are discovered from an OpenSSH-format config file. Ideal for homelabs or nodes outside Puppet/Ansible.
| Variable | Default | Description |
|---|---|---|
| SSH_ENABLED | false | Enable SSH |
| SSH_CONFIG_PATH | unset | OpenSSH inventory config path |
| SSH_DEFAULT_USER | required when enabled | Default remote username |
| SSH_DEFAULT_PORT | 22 | Remote port |
| SSH_DEFAULT_KEY | unset | Private-key file path |
| SSH_HOST_KEY_CHECK | true | Require a trusted server fingerprint |
| SSH_HOST_FINGERPRINTS_PATH | unset | Managed JSON trust file, required for verified connections |
| SSH_CONNECTION_TIMEOUT | 30 | Connection timeout in seconds (5-300) |
| SSH_COMMAND_TIMEOUT | 300 | Command timeout in seconds (10-3600) |
| SSH_MAX_CONNECTIONS | 50 | Pool size (1-1000) |
| SSH_MAX_CONNECTIONS_PER_HOST | 5 | Connections per host (1-100) |
| SSH_IDLE_TIMEOUT | 300 | Pool idle timeout in seconds (10-3600) |
| SSH_CONCURRENCY_LIMIT | 10 | Parallel SSH commands (1-100) |
| SSH_PRIORITY | 50 | Source priority |
| SSH_SUDO_ENABLED | false | Enable privilege escalation |
| SSH_SUDO_COMMAND | sudo | Escalation command |
| SSH_SUDO_PASSWORDLESS | true | Use passwordless escalation |
| SSH_SUDO_PASSWORD | unset | Escalation password when passwordless is false (secret) |
| SSH_SUDO_USER | root | Escalation target user |
SSH config file
Supported keywords: Host, HostName, User, Port, IdentityFile. A comment # Groups: group1,group2 before a Host block assigns inventory groups.
# Groups: webservers,production
Host web01
HostName 192.168.1.10
User deploy
Port 22
IdentityFile ~/.ssh/deploy_key
Host trust
With SSH_HOST_KEY_CHECK=true (the default), Pabawi uses an operator-managed JSON map of destination to accepted OpenSSH SHA-256 fingerprints. It does not read known_hosts, implement trust on first use, or accept host certificates. Unknown or changed keys and missing or malformed trust files fail closed before authentication.
{
"[192.168.1.10]:22": ["SHA256:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"],
"[db.example.com]:2222": ["SHA256:BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB"]
}
- Use lowercase names, brackets and an explicit port (including 22); IPv6 uses
[::1]:2222 - Get fingerprints from a trusted console:
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub -E sha256.ssh-keyscanalone is not proof of identity - Mount the file read-only. Restart the SSH integration after trust changes: updating pins does not revoke already-authenticated pooled sessions
- Multiple fingerprints per endpoint allow planned key rotation.
SSH_HOST_KEY_CHECK=falsedisables protection and logs a warning
PuppetDB Integration
Node inventory, facts, Puppet run reports, catalogs, and events. Requires PuppetDB 6.0+, reachable on port 8081 (HTTPS) or 8080 (HTTP, localhost), with client certificates signed by the Puppetserver CA or a PE auth token.
| Variable | Default | Description |
|---|---|---|
| PUPPETDB_ENABLED | false | Set to true to enable |
| PUPPETDB_SERVER_URL | required | PuppetDB URL (e.g. https://puppetdb:8081) |
| PUPPETDB_PORT | from URL | Override port |
| PUPPETDB_TOKEN | unset | Authentication token (secret) |
| PUPPETDB_TIMEOUT | 30000 | Request timeout in ms |
| PUPPETDB_RETRY_ATTEMPTS / PUPPETDB_RETRY_DELAY | 3 / 1000 | Retries on failure, delay in ms |
| PUPPETDB_CACHE_TTL | 300000 | Response cache TTL in ms |
| PUPPETDB_SSL_ENABLED | true | Enable SSL verification |
| PUPPETDB_SSL_CA / _CERT / _KEY | unset | Paths to CA, client certificate and client key |
| PUPPETDB_SSL_REJECT_UNAUTHORIZED | true | Reject invalid certs; false for self-signed |
| PUPPETDB_CIRCUIT_BREAKER_THRESHOLD | 5 | Failures before opening the circuit |
| PUPPETDB_CIRCUIT_BREAKER_TIMEOUT / _RESET_TIMEOUT | 60000 / 30000 | Open time and half-open delay in ms |
# Remote HTTPS with SSL client certs PUPPETDB_ENABLED=true PUPPETDB_SERVER_URL=https://puppetdb.example.com PUPPETDB_PORT=8081 PUPPETDB_SSL_CA=/opt/pabawi/certs/ca.pem PUPPETDB_SSL_CERT=/opt/pabawi/certs/client.crt PUPPETDB_SSL_KEY=/opt/pabawi/certs/client.key
If Pabawi runs on a different host than the Puppetserver, generate a certificate there (puppetserver ca generate --certname pabawi.example.com) and copy the cert, key and CA. For Puppet Enterprise, set PUPPETDB_TOKEN instead.
Puppetserver Integration
Node inventory (from the CA), node status, facts, catalog compilation and cross-environment comparison, environment management, and service metrics. Requires Puppetserver 6.x or 7.x on port 8140, with an SSL client certificate or PE RBAC token.
| Variable | Default | Description |
|---|---|---|
| PUPPETSERVER_ENABLED | false | Set to true to enable |
| PUPPETSERVER_SERVER_URL | required | Puppetserver URL (e.g. https://puppet:8140) |
| PUPPETSERVER_PORT | from URL | Override port |
| PUPPETSERVER_TOKEN | unset | Authentication token (secret) |
| PUPPETSERVER_TIMEOUT | 30000 | Request timeout in ms |
| PUPPETSERVER_RETRY_ATTEMPTS / _RETRY_DELAY | 3 / 1000 | Retries on failure, delay in ms |
| PUPPETSERVER_INACTIVITY_THRESHOLD | 3600 | Seconds without check-in before a node is considered inactive |
| PUPPETSERVER_CACHE_TTL | 300000 | Response cache TTL in ms |
| PUPPETSERVER_SSL_ENABLED | true | Enable SSL verification |
| PUPPETSERVER_SSL_CA / _CERT / _KEY | unset | Paths to CA, client certificate and client key |
| PUPPETSERVER_SSL_REJECT_UNAUTHORIZED | true | Reject invalid certs |
| PUPPETSERVER_CIRCUIT_BREAKER_THRESHOLD / _TIMEOUT / _RESET_TIMEOUT | 5 / 60000 / 30000 | Circuit breaker settings |
cli_auth extension: for Pabawi on a separate host, the client certificate needs the cli_auth extension (OID 1.3.6.1.4.1.34380.1.3.39) for CA management endpoints; without it, certificate lists fall back to PuppetDB data. Use ./scripts/generate-pabawi-cert.sh from the Pabawi repository on the Puppetserver, then puppetserver ca sign --certname pabawi. Puppetserver only lists nodes with signed certificates.
Hiera Integration
Browse and resolve Hiera data from your Puppet control repository: hierarchy browser, node lookups, key search, cross-node view, code analysis, and optional catalog compilation. Requires read access to a control repo containing hiera.yaml.
| Variable | Default | Description |
|---|---|---|
| HIERA_ENABLED | false | Set to true to enable |
| HIERA_CONTROL_REPO_PATH | required | Path to the Puppet control repo |
| HIERA_CONFIG_PATH | hiera.yaml | Hiera config file relative to the control repo |
| HIERA_ENVIRONMENTS | ["production"] | JSON array of environments |
| HIERA_FACT_SOURCE_PREFER_PUPPETDB | true | Use PuppetDB for fact interpolation when available |
| HIERA_FACT_SOURCE_LOCAL_PATH | unset | Local per-node JSON facts directory (fallback) |
| HIERA_CATALOG_COMPILATION_ENABLED | false | Enable catalog compilation (requires the Puppet CLI) |
| HIERA_CATALOG_COMPILATION_TIMEOUT / _CACHE_TTL | 60000 / 300000 | Timeout and cache TTL in ms |
| HIERA_CACHE_ENABLED | true | Enable the Hiera data cache |
| HIERA_CACHE_TTL | 300000 | Cache TTL in ms |
| HIERA_CACHE_MAX_ENTRIES | 10000 | Max cache entries |
| HIERA_CODE_ANALYSIS_ENABLED | true | Enable Puppet code analysis |
| HIERA_CODE_ANALYSIS_LINT_ENABLED | true | Run puppet-lint |
| HIERA_CODE_ANALYSIS_MODULE_UPDATE_CHECK | true | Check for module updates |
| HIERA_CODE_ANALYSIS_INTERVAL | 3600000 | Analysis interval in ms (1 hour) |
| HIERA_CODE_ANALYSIS_EXCLUSION_PATTERNS | [] | JSON array of glob patterns to exclude, e.g. ["vendor/","spec/"] |
Checkmk Integration
Host inventory (priority 8), live service monitoring status, and state-change events. Inventory and monitoring data are fetched live; health probes are cached. Incomplete credentials skip plugin registration with a warning.
| Variable | Default | Description |
|---|---|---|
| CHECKMK_ENABLED | false | Set to true to enable |
| CHECKMK_SERVER_URL | required | Checkmk server URL (e.g. https://checkmk.example.com) |
| CHECKMK_SITE | unset | Site name, needed unless the URL already includes the site or full API path |
| CHECKMK_USERNAME | required | Automation user name |
| CHECKMK_PASSWORD | required | Automation user secret (secret) |
| CHECKMK_SSL_VERIFY | true | Certificate verification for REST and TLS Livestatus |
| CHECKMK_HEALTHCHECK_INTERVAL_MS | 300000 | Health probe cache interval in ms |
| CHECKMK_LIVESTATUS_HOST | unset | Enables Livestatus history when set |
| CHECKMK_LIVESTATUS_PORT | 6557 | TCP/TLS listener port |
| CHECKMK_LIVESTATUS_TLS | false | Set to exactly true for a TLS listener |
| CHECKMK_LIVESTATUS_TIMEOUT_MS | 5000 | Livestatus query timeout in ms |
Requires the checkmk:read permission. Without Livestatus, event history is derived from the REST API at reduced fidelity.
Proxmox Integration
Discover VMs and LXC containers, manage their lifecycle, and provision new guests. Requires a Proxmox VE cluster with API access on port 8006.
| Variable | Default | Description |
|---|---|---|
| PROXMOX_ENABLED | false | Set to true to enable |
| PROXMOX_HOST | required | Proxmox VE host, without scheme (e.g. pve.example.com) |
| PROXMOX_PORT | 8006 | API port |
| PROXMOX_TOKEN | unset | API token USER@REALM!TOKENID=UUID (recommended, secret) |
| PROXMOX_USERNAME | unset | Username (e.g. root@pam) for password auth |
| PROXMOX_PASSWORD | unset | Password (use token auth in production, secret) |
| PROXMOX_REALM | unset | Auth realm override (pam or pve) |
| PROXMOX_TIMEOUT | 30000 | Request timeout in ms |
| PROXMOX_PRIORITY | 7 | Data source priority |
| PROXMOX_SSL_REJECT_UNAUTHORIZED | true | Reject invalid certs; false for self-signed |
| PROXMOX_SSL_CA / _CERT / _KEY | unset | Paths to CA, client certificate and client key |
Authentication
Create a token in the Proxmox UI under Datacenter → Permissions → API Tokens. The token user needs VM.Allocate, VM.Config.*, VM.PowerMgmt, VM.Audit and Datastore.Allocate. Password auth obtains a ticket that is refreshed automatically every 2 hours.
Capabilities
- Inventory of all VMs and LXC containers, grouped by Proxmox node, status or type (qemu/lxc)
- Facts: VM config, status, resource usage
- Lifecycle: start, stop, shutdown, reboot
- Provisioning: create a VM from a template, create an LXC container
- Destroy: blocked unless
ALLOW_DESTRUCTIVE_PROVISIONING=true
Guest IDs follow the format proxmox:<node>:<vmid> (e.g. proxmox:pve01:100).
AWS EC2 Integration
Discover EC2 instances across regions, manage their lifecycle, and launch new instances. Requires an AWS account with EC2 access and IAM credentials (access key, instance profile, or assumed role).
| Variable | Default | Description |
|---|---|---|
| AWS_ENABLED | false | Set to true to enable |
| AWS_ACCESS_KEY_ID | unset | Access key (or use an instance role) |
| AWS_SECRET_ACCESS_KEY | unset | Secret key (secret) |
| AWS_DEFAULT_REGION | us-east-1 | Default region |
| AWS_REGIONS | unset | JSON array or comma-separated list of regions to query |
| AWS_SESSION_TOKEN | unset | Session token for temporary credentials (secret) |
| AWS_PROFILE | unset | AWS CLI profile name |
| AWS_ENDPOINT | unset | Override endpoint URL (for LocalStack etc.) |
Omit the credentials to use the AWS SDK default chain (environment, ~/.aws/credentials, instance profile).
Required IAM Permissions
ec2:DescribeInstances, DescribeRegions, DescribeInstanceTypes ec2:DescribeImages, DescribeVpcs, DescribeSubnets ec2:DescribeSecurityGroups, DescribeKeyPairs ec2:RunInstances, StartInstances, StopInstances ec2:RebootInstances, TerminateInstances sts:GetCallerIdentity
Remove ec2:TerminateInstances to also enforce ALLOW_DESTRUCTIVE_PROVISIONING=false at the IAM level.
Capabilities
- Inventory across all configured regions, grouped by region, VPC or tag
- Facts: instance type, AMI, state, IP, tags, launch time
- Lifecycle: start, stop, reboot
- Launch with AMI, instance type, subnet, security group and key pair
- Terminate: blocked unless
ALLOW_DESTRUCTIVE_PROVISIONING=true
A failure in one region does not block discovery in the others.
Azure Integration
Discover Virtual Machines across resource groups, manage their lifecycle, and provision new instances. This is independent of the ENTRA_ID_* login settings.
| Variable | Default | Description |
|---|---|---|
| AZURE_ENABLED | false | Set to exactly true to enable |
| AZURE_SUBSCRIPTION_ID | required when enabled | Subscription to manage |
| AZURE_TENANT_ID | unset | Tenant ID for service-principal authentication |
| AZURE_CLIENT_ID | unset | Service-principal client ID |
| AZURE_CLIENT_SECRET | unset | Service-principal secret (secret) |
| AZURE_RESOURCE_GROUPS | unset | JSON array or comma-separated list; unset queries all resource groups |
Authentication
Service Principal (recommended for production), Managed Identity (Azure-hosted Pabawi), or Azure CLI login (az login, development), all through DefaultAzureCredential. When tenant, client ID and secret are all set, ClientSecretCredential is used directly.
Required Permissions
Assign the built-in Virtual Machine Contributor role, scoped to the subscription or target resource groups, plus Microsoft.Subscription/subscriptions/read for health checks. A custom role can use the minimum set of Microsoft.Compute/virtualMachines/* (read, write, delete, start, powerOff, restart, deallocate, instanceView), network interface and public IP read, and resource group and location read actions. Remove the deallocate/action permission to also enforce ALLOW_DESTRUCTIVE_PROVISIONING=false at the Azure RBAC level.
Capabilities
- Inventory across configured resource groups (or the entire subscription), grouped by location, resource group or tag (Environment, Project, Team, Application)
- Facts: VM size, OS, power state, IPs, tags, disks, provisioning state
- Lifecycle: start, stop, restart
- Provisioning: create VMs with image, size, networking and auth configuration
- Deallocate: blocked unless
ALLOW_DESTRUCTIVE_PROVISIONING=true - Resource discovery: browse locations, VM sizes, marketplace images and resource groups
Inventory
The Inventory page aggregates nodes from every enabled information source (Bolt, PuppetDB, Puppetserver, Ansible, SSH, Proxmox, AWS, Azure, Checkmk). Nodes that appear in multiple sources are linked and shown as one entry with a sources badge.
- Search by node name; narrow further with the transport or source dropdown
- View modes: toggle between grid and list view
- Virtual scrolling handles inventories of 1000+ nodes without lag
- Color coding: each integration has its own color on badges and tabs (Bolt orange, PuppetDB purple, Puppetserver dark blue, Hiera dark red, Ansible green, SSH teal, Proxmox blue, AWS cyan, Azure azure blue)
- Inventory is cached for 30 s by default (
CACHE_INVENTORY_TTL); the API also accepts a PuppetDB PQL filter
Node Detail & Facts
Click any node to open its detail page. Sections are collapsible and depend on which integrations are enabled:
| Section | Requires |
|---|---|
| Node info | Any source |
| Facts | Bolt, PuppetDB, or Puppetserver |
| Hiera data | Hiera |
| PuppetDB reports | PuppetDB |
| Run Puppet / Run task / Install package | Bolt |
| Execute command | Bolt, Ansible or SSH |
| Execution history | Always |
To gather facts, open the Facts section and click Gather Facts. Facts from multiple sources appear in separate tabs labeled with their source color. They are cached per node (default 5 minutes); click again to force a refresh.
Command Execution
Open the Execute Command section on a node, type a command (e.g. uptime), select the execution tool if several are available, and click Execute. Output streams live via Server-Sent Events; results show stdout, stderr, exit code and duration.
- Whitelist: commands are validated against the whitelist. Rejected commands show
Command not in whitelist - SSH: runs directly on the target without Bolt, using the
SSH_*configuration - Ansible: runs ad-hoc module calls (the
shellmodule by default) against the configured inventory; playbooks run from the Run Playbook section - Queue: executions are limited to
CONCURRENT_EXECUTION_LIMITparallel operations, up toMAX_QUEUE_SIZEqueued - Streaming: auto-scroll follows new output; click the output window to pause it. If streaming drops, completed output is preserved
Batch execution across multiple nodes or groups, re-execution, and cancellation are available from the Executions page and the API. Cancelling after dispatch records the request but does not guarantee the provider terminates the work.
Bolt Tasks & Puppet Runs
Running tasks
Open Run Task, browse or search tasks grouped by module, fill in parameters (required fields are marked *; types: string, integer, boolean, array and hash as JSON) and click Execute Task. Useful tasks include package, service, psick::puppet_agent, tp::install and tp::test.
Running Puppet
The Run Puppet section runs puppet agent on the node via Bolt:
| Option | Effect |
|---|---|
| Tags | Comma-separated Puppet tags to apply. Empty = all tags |
| Environment | Override the Puppet environment. Empty = node default |
| Noop | Dry run: shows what would change, applies nothing |
| No-noop | Force changes even if the node is in noop mode |
| Debug | Verbose Puppet output |
Results show a changed/failed/skipped/total summary and the full agent output. Always test in noop mode first.
Puppet reports (PuppetDB)
The Reports tab shows run history, filterable by time period (24h / 7d / 30d / all), status (changed / unchanged / failed) and environment. Click a report for resource changes, timeline and dependency graph.
Installing packages
The Install Package section is a shortcut for the configured package task (package or tp::install): package name, optional version, ensure (present / absent / latest), and optional JSON settings. It supports Bolt and Ansible.
Provisioning & Lifecycle
The Manage tab appears when at least one provisioning integration (Proxmox, AWS or Azure) is enabled.
| Provider | Actions |
|---|---|
| Proxmox | Start, Stop (ACPI shutdown), Shutdown (force stop), Reboot, Create VM, Create LXC, Destroy |
| AWS | Start, Stop, Reboot, Launch, Terminate |
| Azure | Start, Stop (OS-level shutdown, billing continues), Restart, Create VM, Deallocate |
- Destroy, Terminate and Deallocate are blocked unless
ALLOW_DESTRUCTIVE_PROVISIONING=trueand return403 DESTRUCTIVE_ACTION_DISABLEDotherwise - Each action requires the matching RBAC permission (e.g.
proxmox/lifecycle,aws/destroy) plus the provider's read permission - Provider-agnostic lifecycle endpoints under
/api/inventory/:idresolve the provider from the node ID prefix (proxmox:,aws:,azure:) and also acceptPABAWI_LIFECYCLE_TOKEN
Execution History
The Executions page shows all operations performed through Pabawi. Filter by date range (today / 7d / 30d / custom), status, target node, or free text on the action.
- Success: completed without error; Failed: returned an error; Running: currently executing; Partial: some nodes succeeded, some failed
- Click any row for full output and parameters (in Expert Mode also the raw CLI command and request ID)
- Re-run any historical execution, or cancel a running one, subject to the stored tool's execute permission
- Execution output is shared with all holders of
executions/read, whoever started the run
Journal
The Journal page shows a cross-node event timeline aggregated from all enabled sources: PuppetDB reports, Proxmox tasks, AWS and Azure state changes, Checkmk state changes and execution history. Each node also has its own journal, and manual notes can be added.
- Nodes / Groups: pick specific nodes or inventory groups
- Event type, Source, and Date range filters
- Consecutive similar entries (same node and event type) are grouped; click +N more to expand
- Node IDs are clickable and open the node detail page
RBAC & Permissions
Pabawi uses role-based access control on authenticated API routes. Users are assigned roles, roles contain permissions, and permissions gate specific actions. Role, group and permission changes take effect on the next authorization check without requiring logout.
Authentication methods
- Local: username/password, always available
- Azure Entra ID SSO: optional, with group-to-role mapping
- LDAP: optional, with group-to-role mapping and no default role
All methods issue Pabawi JWTs; permissions depend on the user's roles regardless of origin. Password changes, deactivation and session revocation invalidate all previously issued tokens.
Permission format
Permissions are database records with a resource and an action, written <resource>/<action> (e.g. proxmox/provision, proxmox/lifecycle, proxmox/destroy). Wildcard strings are not supported. Assign permission IDs to roles through the API.
Built-in roles
| Role | Access level |
|---|---|
| Administrator | Explicit assignment of all permissions; active is_admin users also pass all checks |
| Operator | Viewer permissions plus ansible/execute, bolt/execute, ssh/execute and proxmox|aws|azure/lifecycle. Cannot destroy or configure |
| Viewer | Read-only: ansible|bolt|puppetdb|puppetserver|hiera|ssh|proxmox|aws|azure/read, journal/read, executions/read, provisioning/read, integration_config/read |
Permission reference
| Permission | Grants |
|---|---|
<provider>/read | Read provider inventory and discovery data (also required for provider mutations) |
<provider>/provision | Create provider resources |
<provider>/lifecycle | Start, stop, reboot and other non-destructive operations |
<provider>/destroy | Destruction, AWS termination, Azure deallocation (also needs ALLOW_DESTRUCTIVE_PROVISIONING) |
<tool>/execute | Run commands, Puppet runs and batches with that tool (bolt, ansible, ssh) |
executions/read | List executions, read detail, stored output and the SSE stream |
puppetserver/write, puppetserver/admin | Deploy an environment; flush the environment cache (Administrator only by default) |
hiera/admin | Reload the Hiera control repository |
checkmk/read, checkmk/write | Monitoring views; acknowledge and downtime |
console/access, console/admin | Use the console; manage other users' sessions |
rbac/admin | Entitlement administration: roles, role permissions, group and user role assignments, admin status, LDAP mappings |
Aggregated inventory and facts include only the sources for which the caller holds <source>/read.
rbac/admin is full delegation authority. Holders can grant permissions they do not hold, including Administrator and rbac/admin itself. Treat it as an explicit approval of full privilege delegation.
UI visibility
The frontend loads the caller's grants from GET /api/auth/permissions after login and hides or disables controls the user lacks permission for (Provision navigation, lifecycle actions, re-execute and cancel, and so on). The backend enforces permissions independently of UI visibility.
Managing users and roles
$ curl -X POST http://localhost:3000/api/roles \ -H "Authorization: Bearer $ADMIN_TOKEN" -H "Content-Type: application/json" \ -d '{"name": "vm-operator", "description": "Create and manage VMs"}' $ curl -X POST "http://localhost:3000/api/roles/<role-id>/permissions/<permission-id>" \ -H "Authorization: Bearer $ADMIN_TOKEN" $ curl -X POST "http://localhost:3000/api/users/<user-id>/roles/<role-id>" \ -H "Authorization: Bearer $ADMIN_TOKEN"
A Proxmox VM operator needs proxmox/read, proxmox/provision and proxmox/lifecycle, plus provisioning/read for the provisioning page. Add proxmox/destroy to allow destruction.
MCP service user
When MCP_ENABLED=true, Pabawi provisions an mcp-service user with an MCP Service role holding all read permissions. Adjust that role in Role Management to change what static-token MCP clients can see.
Integration Status
The Home page shows the health of every configured integration. The same data is available from GET /api/integrations/status (append ?refresh=true to bypass the cache) and via the integrations_list MCP tool.
IntegrationManagerruns health checks every five minutes, retries failed integrations after one minute, and caches health for ten minutes- Failed initialization of one integration is logged and does not affect the others
- Configuration is read from the environment at startup, so restart after editing
.envand check the status page to confirm every integration connected
Expert Mode
Expert Mode adds technical detail everywhere. Toggle it in the navigation bar. When enabled, every execution result includes:
- The exact CLI command executed (Bolt, Ansible, etc.)
- Full error stack traces and a request ID for log correlation
- Raw API output from integrations
- Performance metrics (memory, CPU, cache stats) and the frontend/backend log timeline
$ journalctl -u pabawi | grep "req-abc123-def456"
State persists in browser localStorage and is per-browser, not per-user. API clients can send X-Expert-Mode: true.
Security: Expert Mode exposes internal paths and stack traces. Only enable it for trusted users in production.
API Reference
Base URL: http://<host>:<port> (default http://localhost:3000). Most endpoints return JSON; streaming endpoints return SSE. Infrastructure endpoints require Authorization: Bearer <token> and the relevant RBAC permissions. A full OpenAPI contract covers the REST subset.
Public endpoints: GET /api/health, GET /api/setup/status, GET /api/auth/providers, and the login, registration and refresh exchanges. Initial setup requires the X-Pabawi-Bootstrap-Token header.
Authentication
# Login: returns token, refreshToken and user POST /api/auth/login Body: { "username": "admin", "password": "..." } # Use the token in subsequent requests GET /api/inventory Header: Authorization: Bearer <token>
Key Endpoints
| Method + Path | Description |
|---|---|
| POST /api/auth/login, /refresh, /logout | Local login, token rotation, logout (also /api/auth/ldap/login and /api/auth/entra-id/*) |
| GET /api/auth/permissions | The caller's effective grants |
| GET /api/health | Health check |
| GET /api/integrations/status | Health status of all plugins (?refresh=true bypasses cache) |
| GET /api/inventory | All nodes from all enabled sources, linked (sources, pql, sortBy, sortOrder) |
| GET /api/inventory/:id | Node details |
| GET /api/inventory/:id/lifecycle-actions | Lifecycle actions the node's provider advertises |
| POST /api/inventory/:id/action | Execute a lifecycle action |
| DELETE /api/inventory/:id | Destroy the node |
| POST /api/nodes/:id/facts | Gather facts from all enabled sources |
| POST /api/nodes/:id/command | Execute a shell command on a node |
| GET /api/tasks, /api/tasks/by-module | List available Bolt tasks |
| POST /api/nodes/:id/task | Execute a Bolt task on a node |
| POST /api/nodes/:id/puppet-run, /api/puppet-run | Run puppet agent on one or several nodes |
| GET /api/puppet/nodes/:id/history, /api/puppet/history | Puppet run history (days 1-365, default 7) |
| GET /api/packages/package-tasks, POST /api/packages/:id/install-package | Package tasks and installation |
| GET /api/playbooks, POST /api/nodes/:id/playbook | List and run Ansible playbooks |
| GET /api/executions, /api/executions/:id, /:id/output | Execution history, details, full output |
| POST /api/executions/:id/stream-ticket, GET /:id/stream | Single-use ticket, then SSE stream of live output |
| POST /api/executions/:id/re-execute, /cancel | Re-run or cancel an execution |
| POST /api/executions/batch, GET /batch/:batchId, POST /batch/:batchId/cancel | Batch execution across nodes or groups |
| GET /api/executions/queue/status | Execution queue status |
| GET /api/integrations/hiera/keys/search, /nodes/:nodeId/keys/:key | Search Hiera keys; resolve a key for a node (plus analysis and reload endpoints) |
| GET /api/integrations/puppetdb/nodes, /reports, /nodes/:certname/catalog | PuppetDB nodes, reports, catalogs, resources, events |
| GET /api/integrations/puppetserver/nodes, /environments, /metrics | Puppetserver nodes, catalogs (compile and compare), environments (deploy, flush cache), status and metrics |
| /api/integrations/proxmox/*, /aws/*, /azure/* | Provisioning, lifecycle and discovery per provider |
| GET /api/nodes/:nodeId/services, /monitoring-events | Checkmk live service status and state-change events |
| POST /api/console/sessions | Open a VNC or terminal console session (WebSocket relay at /ws/console/vnc and /ws/console/terminal) |
| GET /api/journal/:nodeId, /api/journal/search, POST /api/journal/:nodeId/notes | Journal entries, search and manual notes (plus SSE streams) |
| /api/users, /api/roles, /api/permissions, /api/groups | RBAC management |
| GET /api/auth/ldap/groups, /mappings, POST /api/auth/ldap/test | LDAP administration (requires rbac:admin) |
| POST /mcp | MCP Streamable HTTP endpoint |
Errors and common parameters
{ "error": { "code": "ERROR_CODE", "message": "Human-readable message", "details": "..." } }
Common codes: COMMAND_NOT_WHITELISTED, INTEGRATION_NOT_AVAILABLE, NODE_NOT_FOUND, VALIDATION_ERROR, DESTRUCTIVE_ACTION_DISABLED, UNAUTHORIZED. List endpoints accept limit, offset, page, pageSize and status.
MCP Server
Pabawi includes an embedded Model Context Protocol (MCP) server that exposes read-only (by default) infrastructure tools over Streamable HTTP. This lets AI assistants (Claude Desktop, Claude Code, Kiro, Cursor, Gemini CLI, OpenAI Codex CLI) query your infrastructure data directly.
Enabling
MCP_ENABLED=true MCP_AUTH_TOKEN=your-secure-random-token # openssl rand -hex 32
The endpoint is POST http://<host>:<port>/mcp, on the same port as the rest of the API. All requests need bearer authentication: either the static MCP_AUTH_TOKEN (does not expire, scoped to /mcp only, acts as the mcp-service user) or an access JWT from POST /api/auth/login (acts with the caller's own permissions; refresh JWTs are rejected).
Client Configuration
{
"mcpServers": {
"pabawi": {
"url": "http://localhost:3000/mcp",
"headers": {
"Authorization": "Bearer <MCP_AUTH_TOKEN>"
}
}
}
}
This format works for Claude Desktop, Kiro (.kiro/settings/mcp.json) and Cursor. Other clients:
# Claude Code $ claude mcp add --transport http pabawi http://localhost:3000/mcp \ --header "Authorization: Bearer <MCP_AUTH_TOKEN>" # Gemini CLI (~/.gemini/settings.json): use "httpUrl" instead of "url" # OpenAI Codex CLI (~/.codex/config.toml) [mcp_servers.pabawi] url = "http://localhost:3000/mcp" [mcp_servers.pabawi.headers] Authorization = "Bearer <MCP_AUTH_TOKEN>"
Available Tools
| Tool | Description |
|---|---|
| inventory_list | List nodes from all active integrations (optional search filter) |
| facts_get | Get system facts for a node (certname) |
| facts_bulk | Get specific facts across all nodes in one query (fact_names) |
| reports_query | Query Puppet run reports (certname, status, limit) |
| catalogs_get | Get the compiled Puppet catalog for a node |
| hiera_lookup | Resolve a Hiera key (key, optional node and environment, default production) |
| executions_list | List execution history (filter by status, tool, limit) |
| integrations_list | List integrations and their health status |
| journal_query | Search journal entries (nodeId, eventType, limit) |
| monitoring_services_get | Live Checkmk service status for a node |
| monitoring_events_get | Checkmk state-change events for a node (limit 1-1000, default 200) |
All tools are read-only. Every tool checks RBAC permissions against the authenticated caller before provider access and before returning results.
Sessions and limits
Initialize a session with POST /mcp, then send its mcp-session-id header on subsequent POST, GET and DELETE requests. Sessions belong to one user and authentication method. Each account may hold at most 10 sessions, the process 100, and a session lives at most 24 hours (429 when the account limit is hit, 503 at process capacity). Sessions revalidate their opening credential every second while idle, so recreate the session after the JWT expires or is revoked.
Reverse proxies: GET /mcp uses long-lived SSE connections. Disable response buffering for /mcp, raise idle/read timeouts to at least 300 s (nginx defaults to 60 s), allow large POST bodies, and pass the mcp-session-id header through unmodified.
Tip: Once connected, ask your AI assistant things like "List all nodes", "Show me failed Puppet reports", "What OS is web-01 running?", or "Look up the ntp::servers Hiera key in production".
Example .env Files
Every variable is documented in the Configuration and Integrations sections above; the full reference is the upstream configuration guide. Two starting points:
Development
PORT=3000 HOST=localhost LOG_LEVEL=debug BOLT_PROJECT_PATH=./bolt-project DATABASE_PATH=./data/pabawi.db BOLT_EXECUTION_TIMEOUT=600000 COMMAND_WHITELIST_ALLOW_ALL=true CACHE_INVENTORY_TTL=30000 CACHE_FACTS_TTL=300000 CONCURRENT_EXECUTION_LIMIT=2 ALLOW_DESTRUCTIVE_PROVISIONING=true
Production (Bolt + PuppetDB + Puppetserver)
PORT=3000 HOST=0.0.0.0 LOG_LEVEL=warn JWT_SECRET=<32+ chars of random entropy> BOLT_PROJECT_PATH=/opt/pabawi/bolt-project DATABASE_PATH=/opt/pabawi/data/pabawi.db BOLT_EXECUTION_TIMEOUT=300000 COMMAND_WHITELIST_ALLOW_ALL=false COMMAND_WHITELIST='["uptime","df -h","free -m","systemctl status"]' COMMAND_WHITELIST_MATCH_MODE=exact CACHE_INVENTORY_TTL=60000 CACHE_FACTS_TTL=300000 CONCURRENT_EXECUTION_LIMIT=10 MAX_QUEUE_SIZE=100 ALLOW_DESTRUCTIVE_PROVISIONING=false PUPPETDB_ENABLED=true PUPPETDB_SERVER_URL=https://puppetdb.example.com:8081 PUPPETDB_SSL_CA=/opt/pabawi/certs/ca.pem PUPPETDB_SSL_CERT=/opt/pabawi/certs/client.crt PUPPETDB_SSL_KEY=/opt/pabawi/certs/client.key PUPPETSERVER_ENABLED=true PUPPETSERVER_SERVER_URL=https://puppet.example.com:8140 PUPPETSERVER_TOKEN=your-token-here
Troubleshooting
Quick diagnostics
$ curl http://localhost:3000/api/health $ curl http://localhost:3000/api/integrations/status # needs a Bearer token $ sudo journalctl -u pabawi -f # systemd $ docker logs pabawi -f # Docker
Enable Expert Mode in the UI for raw API responses and detailed errors, and LOG_LEVEL=debug for server logs.
Bolt
| Problem | Fix |
|---|---|
| "Bolt configuration files not found" | Verify BOLT_PROJECT_PATH contains bolt-project.yaml and inventory.yaml and is readable |
| "Cannot parse Bolt output" | Set color: false in bolt-project.yaml |
| "Execution exceeded timeout" | Increase BOLT_EXECUTION_TIMEOUT (ms, default 300000) |
| "Task does not exist" | Run bolt task show --format json; install with bolt module install from the project |
| Whitelist blocks a command | Add the exact command (or prefix) to COMMAND_WHITELIST |
PuppetDB and Puppetserver
| Problem | Fix |
|---|---|
| No nodes from PuppetDB / Puppetserver | Check *_ENABLED and *_SERVER_URL; look at /api/integrations/status for errors |
| SSL errors / handshake failed | Verify *_SSL_CA, _CERT, _KEY paths and permissions, and that the cert is signed by the correct CA. Dev only: *_SSL_REJECT_UNAUTHORIZED=false |
| 403 on Puppetserver certificate API | Token lacks certificate_status, or the cert lacks the cli_auth extension |
| Reports not appearing | PuppetDB must receive reports (store_configs = true); the node needs a recent run |
| "Node not found" on Puppetserver | Only nodes with signed certs are listed: puppetserver ca sign --certname <name> |
Hiera, Ansible, SSH
| Problem | Fix |
|---|---|
| Hiera lookup returns nothing / "No hiera.yaml found" | Verify HIERA_CONTROL_REPO_PATH and HIERA_CONFIG_PATH |
| Hiera "missing facts" | Enable PuppetDB with HIERA_FACT_SOURCE_PREFER_PUPPETDB=true, or provide HIERA_FACT_SOURCE_LOCAL_PATH |
| Hiera analysis times out | Add HIERA_CODE_ANALYSIS_EXCLUSION_PATTERNS (e.g. ["vendor/","spec/"]) |
| "Ansible not found" / no inventory | Install Ansible; check ANSIBLE_PROJECT_PATH and ANSIBLE_INVENTORY_PATH; run ansible-inventory --list |
| No SSH nodes in inventory | Check SSH_CONFIG_PATH exists and contains valid Host entries |
| SSH "Host key verification failed" | Check the destination/port entry in the managed fingerprint file and investigate changed keys through a trusted channel before enrolling |
| SSH "Permission denied" | Check IdentityFile path and mode (chmod 600) and authorized_keys on the target |
Proxmox, AWS, Azure
| Problem | Fix |
|---|---|
| Proxmox 401 / 403 | Check token format user@realm!tokenid=uuid; ensure the token user has VM.Allocate, VM.Config.*, VM.PowerMgmt |
| Proxmox SSL error | Set PROXMOX_SSL_REJECT_UNAUTHORIZED=false for self-signed certs, or provide PROXMOX_SSL_CA |
| AWS "Failed to validate credentials" / AccessDenied | Verify keys or the attached instance profile; check the IAM policy |
| No AWS instances | Add the region to AWS_REGIONS |
| Azure "authentication failed" | Check AZURE_TENANT_ID, _CLIENT_ID, _CLIENT_SECRET, the managed identity assignment, or run az login |
| Azure "AZURE_SUBSCRIPTION_ID is required" | Mandatory when AZURE_ENABLED=true |
| Azure "AuthorizationFailed" | Assign Virtual Machine Contributor or the custom role |
Destroy/Terminate/Deallocate blocked (403 DESTRUCTIVE_ACTION_DISABLED) | Deliberate safety guard: set ALLOW_DESTRUCTIVE_PROVISIONING=true |
MCP
- Verify
MCP_ENABLED=trueand that the backend was restarted; logs should show "MCP server initialized, /mcp endpoint registered" - 401: the
Authorization: Bearerheader must matchMCP_AUTH_TOKENexactly - Permission errors: add the missing permission to the
MCP Servicerole. A default new-user role such as Viewer can independently grant a permission removed from it - Sessions dropping behind a proxy: see the reverse proxy note in the MCP section
Database
| Problem | Fix |
|---|---|
| "Database locked" | SQLite allows one writer process. Kill duplicate instances (in Kubernetes keep replicas: 1) or switch to PostgreSQL |
| "Migration failed" | Preserve the failed database and logs, stop writers, restore a verified backup to a separate location before retrying. Never clear migration history to bypass a failure |
| Database file not found on startup | Ensure the DATABASE_PATH directory exists and is writable; in Docker check the volume mount |
| "DATABASE_URL is required when DB_TYPE is 'postgres'" | Set DATABASE_URL or set DB_TYPE=sqlite |
Node, streaming, performance and auth
| Problem | Fix |
|---|---|
EADDRINUSE :::3000 | lsof -i :3000 and kill the process, or change PORT |
EACCES in Docker | chown -R 1001:1001 ./data |
Cannot find module 'express' | Run npm run install:all from the repo root (rebuilds native modules; the repo uses ignore-scripts=true) |
| Streaming output not appearing or cut off | Disable proxy buffering (nginx: proxy_buffering off) and raise proxy_read_timeout to 300s |
| Commands queue and don't run | CONCURRENT_EXECUTION_LIMIT reached: increase it or wait |
| Inventory / facts load slowly | Increase CACHE_INVENTORY_TTL / CACHE_FACTS_TTL, or reduce the number of enabled integrations |
| Login returns 401 | Check credentials and account status. Initial setup cannot reset an existing administrator: use account recovery |
| 403 on an API endpoint | The user's role lacks the required permission |
| "JWT malformed" | Token expired or tampered: log out and in again |
FAQ
Does Pabawi require Bolt? No. Bolt is one of several execution plugins alongside SSH and Ansible. With all of them disabled, execution features are unavailable but inventory from information-source integrations still works.
Can I run multiple Bolt projects? One project per instance. Run multiple Pabawi instances on different ports with different BOLT_PROJECT_PATH values.
Why is an execution stuck in "running"? At startup, undispatched batch children are cancelled and uncertain dispatched work is marked interrupted without replay. Check persisted history and provider state before resubmitting.
How do I enable auth? Authentication is mandatory and has no environment switch; configure a strong JWT_SECRET.
Still stuck? Enable Expert Mode and open a GitHub issue with your Pabawi version, sanitized config, reproduction steps, and the error from LOG_LEVEL=debug output.
Crash Dumps
On any unhandled exception or unhandled promise rejection, the backend writes a JSON crash dump and a Node diagnostic report to $PABAWI_CRASH_DUMP_DIR (default <cwd>/crash-dumps/) before exiting. The dump tells you why the next restart happened.
| Runtime | Default path | How to persist |
|---|---|---|
| Official Docker image | /app/crash-dumps/ | Mount a volume at that path |
| npm run dev:backend | <repo>/backend/crash-dumps/ | No action needed |
| systemd unit | <WorkingDirectory>/crash-dumps/ | Set PABAWI_CRASH_DUMP_DIR or make WorkingDirectory writable |
Each crash writes crash-<ISO8601>-<pid>.json (error, in-flight and recent requests, memory, event-loop delay) and report-<ISO8601>-<pid>.json (Node's diagnostic report). Treat the report as sensitive: its environment section can include secrets.
$ jq '.error, .inflightRequests' crash-dumps/<file> $ jq '.eventLoopDelayMs' crash-dumps/<file> # p99 > 500ms before a crash points at blocking work
Account Recovery
Reset a local user's password from the shell of the host that owns the database, with the same environment as the server (JWT_SECRET, DATABASE_PATH or DATABASE_URL):
# source checkout $ npm run reset-password --workspace=backend -- --username admin # built install or Docker image $ docker exec -it pabawi node dist/cli/reset-password.js --username admin
| Flag | Effect |
|---|---|
| --username <name> | Account to reset (default admin) |
| --generate | Generate a random password and print it once |
| --password-stdin | Read the password from stdin instead of the hidden prompt |
| --activate | Also reactivate a disabled account |
The password is never accepted as an argument. The command applies the normal password policy, clears lockouts, revokes every issued token for the account, and writes a cli_password_reset audit entry.