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.

bash
$ 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 batteries image)
  • Ansible CLI (ansible and ansible-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:

bash
$ 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:

TagContentsUse when
example42/pabawi:latestPabawi application and Node dependenciesIntegrations use HTTP APIs, cloud SDKs, or the embedded SSH client
example42/pabawi:batteriesCore plus Bolt, Ansible, Puppet/OpenVox, OpenSSH, Git, rsync and sshpassIntegrations need local infrastructure commands
bash
# 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.

DataHost → ContainerEnv setting
SQLite DB./data → /opt/pabawi/dataDATABASE_PATH=/opt/pabawi/data/pabawi.db
Bolt project./bolt-project → /opt/pabawi/bolt-projectBOLT_PROJECT_PATH=/opt/pabawi/bolt-project
Control repo./control-repo → /opt/pabawi/control-repoHIERA_CONTROL_REPO_PATH=/opt/pabawi/control-repo
Ansible./ansible → /opt/pabawi/ansibleANSIBLE_PROJECT_PATH=/opt/pabawi/ansible
SSL certs./certs → /opt/pabawi/certsPUPPETDB_SSL_CA=/opt/pabawi/certs/ca.pem
SSH keys~/.ssh → /opt/pabawi/sshSSH_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

yaml
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

ProblemFix
Permission denied on volumeCheck ownership (chown -R 1001:1001 ./data) and mode
"Bolt project not found"Check BOLT_PROJECT_PATH is /opt/pabawi/bolt-project (container path)
SSL errorsVerify cert permissions (600) and that the CA matches the server cert
Container exits immediatelyCheck 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):

bash
# 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-secrets for JWT_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 when DB_TYPE=postgres
  • Deployment with replicas: 1, strategy: Recreate, runAsUser: 1001, fsGroup: 1001, and liveness/readiness probes on GET /api/health port 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

VariableDefaultDescription
NODE_ENVunsettest disables dotenv loading; deployment tooling commonly sets production
PORT3000HTTP port
HOSTlocalhostBind address (0.0.0.0 for all interfaces)
LOG_LEVELinfoerror / warn / info / debug
PABAWI_CRASH_DUMP_DIR<cwd>/crash-dumpsWhere 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_CHARTtrueShow 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.

VariableDefaultDescription
DB_TYPEsqlitesqlite or postgres
DATABASE_PATH./data/pabawi.dbSQLite 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

VariableDefaultDescription
PABAWI_BOOTSTRAP_TOKEN(empty)Initial enrollment secret, 32 to 512 characters. Empty disables enrollment. Remove after setup. (secret)
JWT_SECRETrequiredJWT 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-service account with a "Lifecycle Service" role holding read, lifecycle and destroy on proxmox, aws and azure, subject to ALLOW_DESTRUCTIVE_PROVISIONING
  • The token is accepted on /api/inventory only
  • 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-service account (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.

VariableDefaultDescription
ENTRA_ID_ENABLEDfalseSet to "true" to enable; other ENTRA_ID_* vars are ignored otherwise
ENTRA_ID_TENANT_IDrequiredAzure tenant (directory) ID
ENTRA_ID_CLIENT_IDrequiredApplication (client) ID
ENTRA_ID_CLIENT_SECRETrequiredClient secret value (secret)
ENTRA_ID_REDIRECT_URIrequiredhttps://your-host/api/auth/entra-id/callback, must match the app registration
ENTRA_ID_SCOPESopenid,profile,emailComma-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_MS86400000JWKS 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.

VariableDefaultDescription
LDAP_ENABLEDfalseStrict boolean
LDAP_DIRECTORY_IDrequiredStable identifier (letters, digits, _, -)
LDAP_DIRECTORY_TYPErequiredad or openldap
LDAP_HOSTNAMErequiredFQDN, no protocol, path or credentials
LDAP_PORT636 / 389636 for LDAPS, 389 for StartTLS
LDAP_FAILOVER_ENDPOINTS[]JSON array of extra {"hostname","port"} objects (max four)
LDAP_TLS_MODEldapsldaps 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_PASSWORDrequiredLookup DN and password (secret), unless LDAP_ANONYMOUS_LOOKUP=true
LDAP_BASE_DNrequiredBase DN
LDAP_USER_ELIGIBILITY_FILTER(empty)Required for OpenLDAP, e.g. (employeeType=active); AD uses a built-in policy
LDAP_SEARCH_NESTED_GROUPSfalseInclude nested group membership
LDAP_REVALIDATION_INTERVAL_SECONDS300Maximum age of a successful eligibility check (max 300)
LDAP_CONNECT_TIMEOUT_SECONDS / LDAP_OPERATION_TIMEOUT_SECONDS / LDAP_REQUEST_TIMEOUT_SECONDS10 / 10 / 30Timeouts (max 30 / 30 / 60)
LDAP_MAX_CONCURRENT_OPERATIONS10Max 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

VariableDefaultDescription
COMMAND_WHITELIST_ALLOW_ALLfalsetrue skips the whitelist check (dev only)
COMMAND_WHITELIST[]JSON array of allowed commands
COMMAND_WHITELIST_MATCH_MODEexactexact (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

VariableDefaultDescription
CONCURRENT_EXECUTION_LIMIT5Shared per-process concurrency for commands, tasks, playbooks, packages, Puppet runs, re-execution and batches
MAX_QUEUE_SIZE50Max queued executions before rejecting

Caching

VariableDefaultDescription
CACHE_INVENTORY_TTL30000Inventory cache TTL in ms (must be positive)
CACHE_FACTS_TTL300000Node facts cache TTL in ms (must be positive)

Streaming

VariableDefaultDescription
STREAMING_BUFFER_MS100Output batch interval in ms (also the worst-case delay)
STREAMING_MAX_OUTPUT_SIZE10485760Max output per execution in bytes (10 MB)
STREAMING_MAX_LINE_LENGTH10000Max characters per line before truncation

Console (VNC / Terminal)

VariableDefaultDescription
CONSOLE_SESSION_TIMEOUT_MS300000Idle session timeout (5 min)
CONSOLE_MAX_SESSION_DURATION28800000Absolute session lifetime (8 h)
CONSOLE_MAX_CONCURRENT_SESSIONS3Max sessions per user per process
CONSOLE_HEARTBEAT_INTERVAL_MS30000Heartbeat interval (must be below the idle timeout)
CONSOLE_VERIFY_UPSTREAM_TLStrueVerify the upstream console host certificate. Set false only on trusted networks with self-signed certs

Provisioning Safety

VariableDefaultDescription
ALLOW_DESTRUCTIVE_PROVISIONINGfalseAllow 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.

PluginPriorityTypeProvides
SSH50 (highest)Information + executionInventory, commands
PuppetDB10InformationInventory, facts, reports, catalogs, events
Puppetserver8InformationInventory, facts, catalogs, environments, metrics
Checkmk8InformationHost inventory, live service status, state-change events
Proxmox7Information + executionInventory, lifecycle, provisioning (VMs & LXC)
AWS7Information + executionInventory, lifecycle, provisioning (EC2)
Azure7Information + executionInventory, lifecycle, provisioning (VMs)
Hiera6InformationHierarchy browsing, lookups, code analysis
Bolt5Information + executionInventory, commands, tasks, Puppet runs, packages
Ansible5Information + executionInventory, 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).

VariableDefaultDescription
BOLT_PROJECT_PATHcwdBolt project directory containing inventory.yaml and bolt-project.yaml
BOLT_EXECUTION_TIMEOUT300000Max execution time per command in ms (5 min)
BOLT_PACKAGE_TASKSbuilt-in packageJSON 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).

VariableDefaultDescription
ANSIBLE_ENABLEDfalseSet to true to enable
ANSIBLE_PROJECT_PATHcwdAnsible project directory (working directory for commands)
ANSIBLE_INVENTORY_PATHinventory/hostsInventory file path relative to the project, or absolute
ANSIBLE_EXECUTION_TIMEOUT300000Max 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.

VariableDefaultDescription
SSH_ENABLEDfalseEnable SSH
SSH_CONFIG_PATHunsetOpenSSH inventory config path
SSH_DEFAULT_USERrequired when enabledDefault remote username
SSH_DEFAULT_PORT22Remote port
SSH_DEFAULT_KEYunsetPrivate-key file path
SSH_HOST_KEY_CHECKtrueRequire a trusted server fingerprint
SSH_HOST_FINGERPRINTS_PATHunsetManaged JSON trust file, required for verified connections
SSH_CONNECTION_TIMEOUT30Connection timeout in seconds (5-300)
SSH_COMMAND_TIMEOUT300Command timeout in seconds (10-3600)
SSH_MAX_CONNECTIONS50Pool size (1-1000)
SSH_MAX_CONNECTIONS_PER_HOST5Connections per host (1-100)
SSH_IDLE_TIMEOUT300Pool idle timeout in seconds (10-3600)
SSH_CONCURRENCY_LIMIT10Parallel SSH commands (1-100)
SSH_PRIORITY50Source priority
SSH_SUDO_ENABLEDfalseEnable privilege escalation
SSH_SUDO_COMMANDsudoEscalation command
SSH_SUDO_PASSWORDLESStrueUse passwordless escalation
SSH_SUDO_PASSWORDunsetEscalation password when passwordless is false (secret)
SSH_SUDO_USERrootEscalation 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-keyscan alone 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=false disables 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.

VariableDefaultDescription
PUPPETDB_ENABLEDfalseSet to true to enable
PUPPETDB_SERVER_URLrequiredPuppetDB URL (e.g. https://puppetdb:8081)
PUPPETDB_PORTfrom URLOverride port
PUPPETDB_TOKENunsetAuthentication token (secret)
PUPPETDB_TIMEOUT30000Request timeout in ms
PUPPETDB_RETRY_ATTEMPTS / PUPPETDB_RETRY_DELAY3 / 1000Retries on failure, delay in ms
PUPPETDB_CACHE_TTL300000Response cache TTL in ms
PUPPETDB_SSL_ENABLEDtrueEnable SSL verification
PUPPETDB_SSL_CA / _CERT / _KEYunsetPaths to CA, client certificate and client key
PUPPETDB_SSL_REJECT_UNAUTHORIZEDtrueReject invalid certs; false for self-signed
PUPPETDB_CIRCUIT_BREAKER_THRESHOLD5Failures before opening the circuit
PUPPETDB_CIRCUIT_BREAKER_TIMEOUT / _RESET_TIMEOUT60000 / 30000Open 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.

VariableDefaultDescription
PUPPETSERVER_ENABLEDfalseSet to true to enable
PUPPETSERVER_SERVER_URLrequiredPuppetserver URL (e.g. https://puppet:8140)
PUPPETSERVER_PORTfrom URLOverride port
PUPPETSERVER_TOKENunsetAuthentication token (secret)
PUPPETSERVER_TIMEOUT30000Request timeout in ms
PUPPETSERVER_RETRY_ATTEMPTS / _RETRY_DELAY3 / 1000Retries on failure, delay in ms
PUPPETSERVER_INACTIVITY_THRESHOLD3600Seconds without check-in before a node is considered inactive
PUPPETSERVER_CACHE_TTL300000Response cache TTL in ms
PUPPETSERVER_SSL_ENABLEDtrueEnable SSL verification
PUPPETSERVER_SSL_CA / _CERT / _KEYunsetPaths to CA, client certificate and client key
PUPPETSERVER_SSL_REJECT_UNAUTHORIZEDtrueReject invalid certs
PUPPETSERVER_CIRCUIT_BREAKER_THRESHOLD / _TIMEOUT / _RESET_TIMEOUT5 / 60000 / 30000Circuit 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.

VariableDefaultDescription
HIERA_ENABLEDfalseSet to true to enable
HIERA_CONTROL_REPO_PATHrequiredPath to the Puppet control repo
HIERA_CONFIG_PATHhiera.yamlHiera config file relative to the control repo
HIERA_ENVIRONMENTS["production"]JSON array of environments
HIERA_FACT_SOURCE_PREFER_PUPPETDBtrueUse PuppetDB for fact interpolation when available
HIERA_FACT_SOURCE_LOCAL_PATHunsetLocal per-node JSON facts directory (fallback)
HIERA_CATALOG_COMPILATION_ENABLEDfalseEnable catalog compilation (requires the Puppet CLI)
HIERA_CATALOG_COMPILATION_TIMEOUT / _CACHE_TTL60000 / 300000Timeout and cache TTL in ms
HIERA_CACHE_ENABLEDtrueEnable the Hiera data cache
HIERA_CACHE_TTL300000Cache TTL in ms
HIERA_CACHE_MAX_ENTRIES10000Max cache entries
HIERA_CODE_ANALYSIS_ENABLEDtrueEnable Puppet code analysis
HIERA_CODE_ANALYSIS_LINT_ENABLEDtrueRun puppet-lint
HIERA_CODE_ANALYSIS_MODULE_UPDATE_CHECKtrueCheck for module updates
HIERA_CODE_ANALYSIS_INTERVAL3600000Analysis 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.

VariableDefaultDescription
CHECKMK_ENABLEDfalseSet to true to enable
CHECKMK_SERVER_URLrequiredCheckmk server URL (e.g. https://checkmk.example.com)
CHECKMK_SITEunsetSite name, needed unless the URL already includes the site or full API path
CHECKMK_USERNAMErequiredAutomation user name
CHECKMK_PASSWORDrequiredAutomation user secret (secret)
CHECKMK_SSL_VERIFYtrueCertificate verification for REST and TLS Livestatus
CHECKMK_HEALTHCHECK_INTERVAL_MS300000Health probe cache interval in ms
CHECKMK_LIVESTATUS_HOSTunsetEnables Livestatus history when set
CHECKMK_LIVESTATUS_PORT6557TCP/TLS listener port
CHECKMK_LIVESTATUS_TLSfalseSet to exactly true for a TLS listener
CHECKMK_LIVESTATUS_TIMEOUT_MS5000Livestatus 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.

VariableDefaultDescription
PROXMOX_ENABLEDfalseSet to true to enable
PROXMOX_HOSTrequiredProxmox VE host, without scheme (e.g. pve.example.com)
PROXMOX_PORT8006API port
PROXMOX_TOKENunsetAPI token USER@REALM!TOKENID=UUID (recommended, secret)
PROXMOX_USERNAMEunsetUsername (e.g. root@pam) for password auth
PROXMOX_PASSWORDunsetPassword (use token auth in production, secret)
PROXMOX_REALMunsetAuth realm override (pam or pve)
PROXMOX_TIMEOUT30000Request timeout in ms
PROXMOX_PRIORITY7Data source priority
PROXMOX_SSL_REJECT_UNAUTHORIZEDtrueReject invalid certs; false for self-signed
PROXMOX_SSL_CA / _CERT / _KEYunsetPaths 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).

VariableDefaultDescription
AWS_ENABLEDfalseSet to true to enable
AWS_ACCESS_KEY_IDunsetAccess key (or use an instance role)
AWS_SECRET_ACCESS_KEYunsetSecret key (secret)
AWS_DEFAULT_REGIONus-east-1Default region
AWS_REGIONSunsetJSON array or comma-separated list of regions to query
AWS_SESSION_TOKENunsetSession token for temporary credentials (secret)
AWS_PROFILEunsetAWS CLI profile name
AWS_ENDPOINTunsetOverride 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.

VariableDefaultDescription
AZURE_ENABLEDfalseSet to exactly true to enable
AZURE_SUBSCRIPTION_IDrequired when enabledSubscription to manage
AZURE_TENANT_IDunsetTenant ID for service-principal authentication
AZURE_CLIENT_IDunsetService-principal client ID
AZURE_CLIENT_SECRETunsetService-principal secret (secret)
AZURE_RESOURCE_GROUPSunsetJSON 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:

SectionRequires
Node infoAny source
FactsBolt, PuppetDB, or Puppetserver
Hiera dataHiera
PuppetDB reportsPuppetDB
Run Puppet / Run task / Install packageBolt
Execute commandBolt, Ansible or SSH
Execution historyAlways

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 shell module by default) against the configured inventory; playbooks run from the Run Playbook section
  • Queue: executions are limited to CONCURRENT_EXECUTION_LIMIT parallel operations, up to MAX_QUEUE_SIZE queued
  • 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:

OptionEffect
TagsComma-separated Puppet tags to apply. Empty = all tags
EnvironmentOverride the Puppet environment. Empty = node default
NoopDry run: shows what would change, applies nothing
No-noopForce changes even if the node is in noop mode
DebugVerbose 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.

ProviderActions
ProxmoxStart, Stop (ACPI shutdown), Shutdown (force stop), Reboot, Create VM, Create LXC, Destroy
AWSStart, Stop, Reboot, Launch, Terminate
AzureStart, Stop (OS-level shutdown, billing continues), Restart, Create VM, Deallocate
  • Destroy, Terminate and Deallocate are blocked unless ALLOW_DESTRUCTIVE_PROVISIONING=true and return 403 DESTRUCTIVE_ACTION_DISABLED otherwise
  • 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/:id resolve the provider from the node ID prefix (proxmox:, aws:, azure:) and also accept PABAWI_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

RoleAccess level
AdministratorExplicit assignment of all permissions; active is_admin users also pass all checks
OperatorViewer permissions plus ansible/execute, bolt/execute, ssh/execute and proxmox|aws|azure/lifecycle. Cannot destroy or configure
ViewerRead-only: ansible|bolt|puppetdb|puppetserver|hiera|ssh|proxmox|aws|azure/read, journal/read, executions/read, provisioning/read, integration_config/read

Permission reference

PermissionGrants
<provider>/readRead provider inventory and discovery data (also required for provider mutations)
<provider>/provisionCreate provider resources
<provider>/lifecycleStart, stop, reboot and other non-destructive operations
<provider>/destroyDestruction, AWS termination, Azure deallocation (also needs ALLOW_DESTRUCTIVE_PROVISIONING)
<tool>/executeRun commands, Puppet runs and batches with that tool (bolt, ansible, ssh)
executions/readList executions, read detail, stored output and the SSE stream
puppetserver/write, puppetserver/adminDeploy an environment; flush the environment cache (Administrator only by default)
hiera/adminReload the Hiera control repository
checkmk/read, checkmk/writeMonitoring views; acknowledge and downtime
console/access, console/adminUse the console; manage other users' sessions
rbac/adminEntitlement 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.

  • IntegrationManager runs 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 .env and 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 + PathDescription
POST /api/auth/login, /refresh, /logoutLocal login, token rotation, logout (also /api/auth/ldap/login and /api/auth/entra-id/*)
GET /api/auth/permissionsThe caller's effective grants
GET /api/healthHealth check
GET /api/integrations/statusHealth status of all plugins (?refresh=true bypasses cache)
GET /api/inventoryAll nodes from all enabled sources, linked (sources, pql, sortBy, sortOrder)
GET /api/inventory/:idNode details
GET /api/inventory/:id/lifecycle-actionsLifecycle actions the node's provider advertises
POST /api/inventory/:id/actionExecute a lifecycle action
DELETE /api/inventory/:idDestroy the node
POST /api/nodes/:id/factsGather facts from all enabled sources
POST /api/nodes/:id/commandExecute a shell command on a node
GET /api/tasks, /api/tasks/by-moduleList available Bolt tasks
POST /api/nodes/:id/taskExecute a Bolt task on a node
POST /api/nodes/:id/puppet-run, /api/puppet-runRun puppet agent on one or several nodes
GET /api/puppet/nodes/:id/history, /api/puppet/historyPuppet run history (days 1-365, default 7)
GET /api/packages/package-tasks, POST /api/packages/:id/install-packagePackage tasks and installation
GET /api/playbooks, POST /api/nodes/:id/playbookList and run Ansible playbooks
GET /api/executions, /api/executions/:id, /:id/outputExecution history, details, full output
POST /api/executions/:id/stream-ticket, GET /:id/streamSingle-use ticket, then SSE stream of live output
POST /api/executions/:id/re-execute, /cancelRe-run or cancel an execution
POST /api/executions/batch, GET /batch/:batchId, POST /batch/:batchId/cancelBatch execution across nodes or groups
GET /api/executions/queue/statusExecution queue status
GET /api/integrations/hiera/keys/search, /nodes/:nodeId/keys/:keySearch Hiera keys; resolve a key for a node (plus analysis and reload endpoints)
GET /api/integrations/puppetdb/nodes, /reports, /nodes/:certname/catalogPuppetDB nodes, reports, catalogs, resources, events
GET /api/integrations/puppetserver/nodes, /environments, /metricsPuppetserver 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-eventsCheckmk live service status and state-change events
POST /api/console/sessionsOpen 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/notesJournal entries, search and manual notes (plus SSE streams)
/api/users, /api/roles, /api/permissions, /api/groupsRBAC management
GET /api/auth/ldap/groups, /mappings, POST /api/auth/ldap/testLDAP administration (requires rbac:admin)
POST /mcpMCP 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

json
{
  "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

ToolDescription
inventory_listList nodes from all active integrations (optional search filter)
facts_getGet system facts for a node (certname)
facts_bulkGet specific facts across all nodes in one query (fact_names)
reports_queryQuery Puppet run reports (certname, status, limit)
catalogs_getGet the compiled Puppet catalog for a node
hiera_lookupResolve a Hiera key (key, optional node and environment, default production)
executions_listList execution history (filter by status, tool, limit)
integrations_listList integrations and their health status
journal_querySearch journal entries (nodeId, eventType, limit)
monitoring_services_getLive Checkmk service status for a node
monitoring_events_getCheckmk 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

ProblemFix
"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 commandAdd the exact command (or prefix) to COMMAND_WHITELIST

PuppetDB and Puppetserver

ProblemFix
No nodes from PuppetDB / PuppetserverCheck *_ENABLED and *_SERVER_URL; look at /api/integrations/status for errors
SSL errors / handshake failedVerify *_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 APIToken lacks certificate_status, or the cert lacks the cli_auth extension
Reports not appearingPuppetDB must receive reports (store_configs = true); the node needs a recent run
"Node not found" on PuppetserverOnly nodes with signed certs are listed: puppetserver ca sign --certname <name>

Hiera, Ansible, SSH

ProblemFix
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 outAdd HIERA_CODE_ANALYSIS_EXCLUSION_PATTERNS (e.g. ["vendor/","spec/"])
"Ansible not found" / no inventoryInstall Ansible; check ANSIBLE_PROJECT_PATH and ANSIBLE_INVENTORY_PATH; run ansible-inventory --list
No SSH nodes in inventoryCheck 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

ProblemFix
Proxmox 401 / 403Check token format user@realm!tokenid=uuid; ensure the token user has VM.Allocate, VM.Config.*, VM.PowerMgmt
Proxmox SSL errorSet PROXMOX_SSL_REJECT_UNAUTHORIZED=false for self-signed certs, or provide PROXMOX_SSL_CA
AWS "Failed to validate credentials" / AccessDeniedVerify keys or the attached instance profile; check the IAM policy
No AWS instancesAdd 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=true and that the backend was restarted; logs should show "MCP server initialized, /mcp endpoint registered"
  • 401: the Authorization: Bearer header must match MCP_AUTH_TOKEN exactly
  • Permission errors: add the missing permission to the MCP Service role. 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

ProblemFix
"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 startupEnsure 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

ProblemFix
EADDRINUSE :::3000lsof -i :3000 and kill the process, or change PORT
EACCES in Dockerchown -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 offDisable proxy buffering (nginx: proxy_buffering off) and raise proxy_read_timeout to 300s
Commands queue and don't runCONCURRENT_EXECUTION_LIMIT reached: increase it or wait
Inventory / facts load slowlyIncrease CACHE_INVENTORY_TTL / CACHE_FACTS_TTL, or reduce the number of enabled integrations
Login returns 401Check credentials and account status. Initial setup cannot reset an existing administrator: use account recovery
403 on an API endpointThe 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.

RuntimeDefault pathHow 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
FlagEffect
--username <name>Account to reset (default admin)
--generateGenerate a random password and print it once
--password-stdinRead the password from stdin instead of the hidden prompt
--activateAlso 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.