Skip to main content
The detection engine is the same binary in every Deployment mode. There are three: Cloud (we run everything), Hybrid (the engine runs on your servers and reports to our dashboard) and Air-gapped (engine and dashboard both run on your servers). “Self-hosted” below means Hybrid or Air-gapped; where the two differ, the row names the mode. Self-hosting does not give you a cut-down firewall, the /guard engine, policy enforcement, audit trail, and RBAC run on your servers. What differs is the managed surface around it: metering, hosted inference, the control plane, and a small amount of proprietary tooling that is stripped from customer images. This page is the honest line-by-line.
Prefer to watch? What changes when you self-host as a silent, step-by-step video:

Capability matrix

Legend: ✅ available · ⚙️ available but you operate/supply it · ⚠️ works, with the caveat stated · ❌ not available ·, not applicable

Why the cloud-only items are cloud-only

The offensive red-team engine is proprietary attack tooling that is stripped from non-cloud images at build time (DEPLOYMENT_MODE ≠ cloud). It is internal IP we do not ship inside customer environments. The defensive detectors it exercises are fully present in self-host; only the built-in “attack yourself” harness is cloud-only. You can still run your own adversarial spot-checks against your live config by POSTing known-attack payloads to /guard in CI.
On Cloud we operate the classifier and LLM-judge inference for you. Self-hosted, ML_INFERENCE_MODE=local runs the prompt-injection and toxicity classifiers and the multi-turn embeddings inside the engine, from model weights you download yourself, with your own Hugging Face token and under each model’s licence, which you accept on your own account (Third-Party Models); PromptGuard does not ship or redistribute them. It never calls hosted inference. The LLM judges need a judge server inside your network: the Helm chart’s optional judge service (vLLM serving gpt-oss-safeguard-20b, which needs a GPU and weights you download; bring your own GPU model server, not validated by PromptGuard), or your own OpenAI-compatible server at LLM_GUARD_BASE_URL. Every detector that cannot run is listed on the scan result as unavailable, so reduced coverage is never read as a pass. ML_INFERENCE_MODE=off runs the (substantial) rule engine alone.
Cloud enforces per-plan monthly request quotas through Stripe-backed subscriptions. A self-hosted instance has no reason to phone a billing provider, so it runs on a signed, time-limited license (365 days by default; a hybrid install renews it automatically through its daily check-in, an air-gapped one by installing the renewed licence we send) and is metered-but-uncapped: the counter increments for your own visibility, but requests are never hard-capped. With no license installed, billable requests get 503 until one is (health and maintenance keep running); an expired license keeps serving for 7 days, after which a lapsed/invalid license fails closed on billable requests (503 LICENSE_INACTIVE) while /health and /docs stay up.Per-endpoint contracts are billed from a report you send monthly. Shadow fleets are priced per Billable Endpoint, and with no billing provider to report to, the install exports the count instead: run python -m shared.billing.services.endpoint_export_service --month YYYY-MM in the API container once a UTC month has closed, and send the JSON it prints to PromptGuard. It lists each Organization’s endpoints, grouped under the Organization invoiced for them, and names each machine by a hash only, never a hostname or user. The same month always exports the same file, so it can be audited against your inventory and re-run to check.
Staged rollout, kill-switch, and auto-update for the Shadow AI desktop agents are control-plane features: they need the hosted release/telemetry backend to target cohorts and halt a bad release. An air-gapped fleet distributes agent updates through your own MDM instead.

Two things that behave differently self-hosted

Tenant isolation is enforced by Postgres as well as by the app. deploy/apply-migrations.sh gives a self-hosted Postgres the same schema and the same row-level security policies as Cloud (apart from the pgvector-backed attack_corpus table where pgvector is not installed). The API serves each request as promptguard_app, a database role those policies restrict to the request’s Organization, so one missing filter in the application cannot read another Organization’s rows. Org/project RBAC and IP allowlists are enforced by the application on top. Migrations and scheduled jobs keep a privileged role, so do not expose the database directly to untrusted clients. Run the script on install and on every upgrade; it stops with a non-zero exit at the first migration error, and the API must not be started until it has finished cleanly.
Pin a stable node identity. A license can carry a node fingerprint, which the instance compares with its own. Containerized deployments must set a stable PROMPTGUARD_NODE_ID (e.g. uuidgen once, then reuse), the default hardware fingerprint changes on each container redeploy and would fail that comparison. PROMPTGUARD_NODE_ID is yours to set, so the fingerprint is a guard against accidental reuse, not a lock: the signature and the expiry date are what enforce the license.

Monitoring a self-hosted instance

The API serves Prometheus metrics at GET /metrics, on the same origin as everything else, and only to a scraper that presents METRICS_TOKEN as Authorization: Bearer <token>. With no METRICS_TOKEN set, /metrics answers 404, and the API’s startup log says so. It is never open, because in both shipped topologies the API’s origin is reachable from outside: the Helm chart’s default ingress serves every path, and on Docker Compose port 8080 is the origin browsers call.
  • Helm: the chart generates METRICS_TOKEN into the API’s Secret on first install and keeps it across upgrades. To choose it yourself, set api.secrets.metricsToken. Set monitoring.serviceMonitor.enabled=true and the Prometheus Operator scrapes every API pod, presenting the token from that Secret. Scrape pods, not the Service: the counters are per pod, so they are summed across pods. Set monitoring.prometheusRule.enabled=true to install the alert rules we run on Cloud, written against these series. For a Prometheus outside the cluster, read the token with kubectl get secret <release>-api-secrets -o jsonpath='{.data.METRICS_TOKEN}' | base64 -d.
  • Docker Compose: set METRICS_TOKEN in your .env (generate one with openssl rand -hex 32) and restart the API. Scrape http://<host>:8080/metrics.
A Prometheus outside Kubernetes reads the token from a file:
The series are aggregate only: no user, tenant or content labels. They cover security events by decision, detection failures and scans that stopped early, request rate and duration, PromptGuard’s own overhead, and how long each detector takes (Latency Budgets). Two cover conversation memory: promptguard_conversation_memory_failures_total counts turns scanned without their earlier turns because the store failed or was slow, and promptguard_kv_entries_rows estimates the rows in the kv_entries table that holds them (absent when the store is Redis).

Choosing a model

Hybrid and Air-gapped deployments are an Enterprise-tier capability. See the Compliance page for the air-gap egress audit, or contact sales to scope a deployment.

Next steps

Enterprise Setup

Organizations, SSO, RBAC, and audit logs

Compliance

Air-gap egress audit, build provenance, and certification status

Shadow AI Deployment Modes

Personal, fleet, and air-gapped agent deployment

Reliability

Fail-open vs fail-closed behavior
Last modified on November 10, 2026