LLM Guard on Docker vs Kubernetes vs VMs

LLM Guard was archived on 9 July 2026 and receives no security fixes, so the hosting choice now decides how well you can patch, monitor and exit it. This page compares Docker, Kubernetes and VMs on sizing, availability, upgrades, backup and operating effort, and shows which team fits each.

On this page

Which LLM Guard deployment model fits a team that already runs it

For an existing LLM Guard deployment, choose the hosting model your team can patch, monitor and rebuild on a fixed schedule, and start a migration plan now. The protectai/llm-guard repository was archived on July 9, 2026, its README states that the project and its models are no longer under active development or maintained, and the project receives no security fixes. Docker, Kubernetes and virtual machines all host the same Python package. LLM Guard documents installation with pip and deployment as an API server, so the container image or VM image is a build your team owns, including the interpreter, the pinned LLM Guard version and the model files it loads. No new LLM Guard rollouts are recommended, and the migration path is covered at the end of this section.

Docker fits a team with one or a few hosts, an image pipeline that already scans builds, and an on-call rota that can run a rebuild quickly when a dependency changes. Its risk is that the rebuild becomes manual and the running image drifts from what was tested. Kubernetes fits a platform team that already runs rolling updates, health probes and secrets handling for other services, because the same machinery can replace pods after each rebuild. It adds cluster upgrades to the patch cycle, so count that work before choosing it. Virtual machines fit a team whose patching is OS-centric and who have no container pipeline. Their risk is snapshot drift from the build record. Whichever you pick, confirm the base image provides Python 3.10 to 3.12, since the last PyPI release, 0.3.16 (uploaded 19 May 2025), requires Python 3.10 or newer but below 3.13.

Before the next scheduled rebuild, run three checks: record the installed LLM Guard version and the model files it loads, confirm who owns the rebuild job and the alerts for failed scans or unhealthy API responses, and confirm the base image or VM template is rebuilt on a schedule you can name in writing. Then start the migration plan. NeMo Guardrails is Apache-2.0 licensed and has recent releases, with v0.24.1 published on September 16, 2026. It supports input, dialog, output, retrieval and execution rails configured in Colang and includes a server with a /v1/chat/completions endpoint. Its design differs from a scanner library, so map each LLM Guard scanner your application calls to a rail or a replacement before you change the hosting layer.

How Docker and Kubernetes differ for an LLM Guard deployment

This table compares how Docker on one or a few hosts and Kubernetes handle the operating work an LLM Guard service creates. Read each row as the work your team takes on with each option, then check it against your own change process and staffing. The main takeaway: Docker keeps the moving parts few but leaves recovery and scaling to your team, while Kubernetes adds cluster work in exchange for built-in rollout and scaling controls.

DimensionDocker on one or a few hostsKubernetes
SizingSize each host for scanner memory and CPU at peak, then add headroom by hand as traffic grows.Set resource requests and limits per pod. Low memory limits can restart pods while models load.
High availabilityRun two or more hosts behind a load balancer you manage. Failover is scripted or manual.Replicas spread across nodes, with health probes that restart failed pods. Confirm node count with your platform team.
Rollout and rollbackReplace container images host by host. Rollback means redeploying the previous tag, so keep old images in your registry.Rolling updates and revision history are built in. Rollback is one command, if readiness probes are set correctly.
Secrets handlingInject secrets from an environment file or a secrets backend at deploy time. Host files need strict permissions.Use Secret objects or an external secrets operator. Confirm encryption at rest for the cluster datastore with your provider.
AutoscalingNo native scaling across hosts. Adding capacity means provisioning hosts and updating the load balancer.Horizontal pod autoscaling works on CPU or custom metrics. Scale-out stops at node capacity unless a cluster autoscaler is available.
Model artifact handlingBake models into the image or mount a host volume. Baked images grow large and need a rebuild to change a model.Mount shared model storage or fetch artifacts in an init step. Confirm whether each replica downloads its own copy.
Python runtime pinPin a Python version from 3.10 up to but not including 3.13 in the base image or host build. The last PyPI release, 0.3.16, is archived upstream, so your image needs its own patch process.Pin the same Python range in the container image. The archived upstream release applies here too, so rebuild and scan images on your own schedule.
Skills neededLinux administration, container builds, and load balancer or reverse proxy setup. Suits a small team with few hosts.Cluster operations, RBAC, network policy, and manifest or Helm management. Plan for a platform engineer to own the cluster.

What runs in each layer of an LLM Guard deployment

Five layers sit between your application and the LLM provider in an LLM Guard deployment, and the same five appear on Docker, Kubernetes and VMs. Each card names the decision you must make and the check to run before you choose a platform. Read them in order, because the Python and model pins affect every image or host you build.

Scanner runtime and API server

LLM Guard runs as a Python library installed with pip inside your application, or as an API server that your application calls over HTTP. The documentation describes both, and any container image is built by your team unless you confirm an official image in the repository. On Docker, that image runs as a single container. On Kubernetes, it runs as a Deployment, and on VMs a service manager such as systemd keeps the process up. The repository is archived, so your team owns every dependency patch, and each platform changes how a fix reaches production.

LLM Guard documentation

Python interpreter pin

The last PyPI release of LLM Guard, 0.3.16, requires Python 3.10 or newer but below 3.13. Set that range in your base image, your VM provisioning script and your CI job, so a newer default interpreter on a host cannot change the scanner's runtime. On Kubernetes, pin the image tag to a specific interpreter version and never use latest. Test the upgrade path before moving to Python 3.13 or later, because the package's stated requirement excludes that range.

PyPI release page

Hugging Face model artifacts

Several scanners depend on models hosted on Hugging Face, and the project's models are no longer maintained alongside the archived repository. Pin, hash and mirror each model: fix it to a specific revision, record its file hashes, and copy the files into storage you control, so a new container or VM loads the same files as the last one. On Docker and Kubernetes, bake the mirrored files into the image or mount them from a read-only volume. On VMs, point the cache path at the mirror during provisioning. Ask your team to confirm the model list before writing the mirror job.

Load balancer and TLS termination

Once the API server runs on more than one replica or host, a load balancer distributes requests, and a proxy performs TLS termination in front of it. On Kubernetes that is usually an Ingress or Gateway controller, on Docker a reverse proxy container, and on VMs a managed proxy or appliance outside the hosts. Scanning adds time to each request, so set timeouts and health checks to match the API server's own endpoints. Confirm the request body size limit at the proxy and test it with your longest expected prompt.

Secrets, logs and provider egress

This layer holds the keys that let your application reach the LLM provider, the logs that record prompts and outputs, and the network route from the scanner to the provider. Inject keys from your secrets manager at runtime, so they stay out of image layers and committed files. Decide which fields the scanner logs and where those logs are stored, because prompt text can contain personal data. Map the egress path on each platform: Kubernetes network policies, Docker networks and VM firewall rules each need an allow-list for the provider's endpoint, and your network team should confirm it.

Scanning runs on both sides of the model call inside the team's boundary

The flow starts when the client application sends a prompt to a load balancer or ingress, which routes it to LLM Guard API instances on a Docker host, in Kubernetes pods or on a VM service. Input scanners run inside the team's network before anything reaches the LLM provider endpoint, which sits outside the trust boundary. The model's response then passes through the output scanners, and only the scanned response returns to the client. Check that the scanner hosts and the model artifact store stay inside the boundary, that scanner model downloads are permitted, and that the provider's data terms cover prompts that pass the input scanners. LLM Guard is archived, so this flow applies to existing deployments only.

Scanners run before and after the model call, inside the trust boundary.

Upgrades, backups and monitoring for each hosting option

This table compares how Docker, Kubernetes and virtual machines handle upgrades, backups, monitoring and skills for a self-hosted LLM Guard deployment. Read each row as a question your team must answer for the option it is weighing. LLM Guard was archived on 9 July 2026 and its last PyPI release is 0.3.16, so every option carries the same upstream gap, and the platform mainly changes who carries the work and where it runs.

AreaDockerKubernetesVirtual machines
UpgradesRebuild the image from your fork or pinned 0.3.16 package. Your team owns base image and Python patching.Build a new image from your fork, then roll it out through a controlled Deployment update.Patch the OS and Python packages in place, or rebuild the VM from a known image. In-place changes drift over time.
Python runtimePin a base image with Python 3.10 to 3.12, the range the last release supports.Build the cluster image with Python 3.10 to 3.12, the range the last release supports.Host Python must fall in the 3.10 to 3.12 range. Check it after OS upgrades change the default interpreter.
Backup of configurationVersion scanner config and compose files in git. Back up any volume that holds logs or cached state.Store manifests, ConfigMaps and Secrets in git or a secrets manager. Back up any persistent volumes.Back up the disk or VM snapshot and the config directory. Schedule restore tests so backups are proven.
Scanner settings and pinned model artifactsBake the scanner version and model files into the image. Mirror Hugging Face model files you load, since upstream models are unmaintained.Keep settings in ConfigMaps and pin model files in a volume or internal registry. Record image digests for rollbacks.Keep settings under configuration management and store checksummed model files on the VM disk. Snapshots capture both.
Monitoring and log collectionShip container output to your log pipeline. Watch restarts, memory use and scanner latency per container.Collect logs cluster-wide and scrape pod metrics. Alert on restarts, OOM kills and failed probes.Install a log agent and host metrics on each VM. Alert on service status, disk use and memory.
Skills each option needsLinux, Docker, Python packaging, a reverse proxy and basic container image security.Kubernetes operations, Helm or manifests, network policy, secret handling and Python service knowledge.Linux administration, patching, Python service management and backup restore procedures.
Rebuild and retest cadenceSet by your team's own risk process. Retest after each image rebuild or model file change.Set by your team's own risk process. Retest after each image digest change and cluster upgrade.Set by your team's own risk process. Retest after each OS patch cycle and model file change.

What the archive means for hosting decisions

The LLM Guard repository was archived by its owner on 9 July 2026, and its README states that the project and its associated models on Hugging Face are no longer under active development or maintained. The last release on PyPI is 0.3.16, uploaded on 19 May 2025. Treat 0.3.16 as the last version the project will publish, and plan for it to receive no security fixes. Choosing Docker, Kubernetes or virtual machines changes who restarts containers and who patches the host, but it does not add a fix for a scanner bug or a model weakness. Nothing in this comparison removes the archive risk, so the hosting plan has to manage it directly.

Start the hosting plan with a version freeze. Pin the package to llm-guard==0.3.16 in your lockfile, build the container image from a pinned base image digest, and reject any rebuild that changes the scanner version without a recorded security review. Then list which scanners actually run in production. The documentation lists 15 input scanners and 20 output scanners, including Prompt Injection, Secrets, Token Limit, Sensitive and Malicious URLs. Mark each enabled scanner as rule-based or model-based, because model-based scanners depend on Hugging Face weights that will not receive updates. Disable any scanner that no one can justify, since every scanner you keep is a component you must defend without vendor patches.

Model artifacts need their own control. Scanners that load Hugging Face models depend on files that the README also says are no longer maintained. Mirror every model file into your internal artifact store, record a SHA-256 hash for each one, and refuse to start when a hash does not match. Confirm with your platform team that the chosen hosting target reads from that mirror at runtime and does not reach the public hub. Finally, set an exit date in the change record, approved by the security owner and the product owner, and begin evaluating a maintained replacement such as NeMo Guardrails now. Tie the date to when the replacement passes your own tests against the scanners you actually run, so the date reflects your readiness.

How to move an LLM Guard deployment to a maintained guardrail

This sequence moves an existing LLM Guard deployment, whether it runs on Docker, Kubernetes or virtual machines, to a maintained guardrail one service at a time. It produces a scanner-by-scanner mapping, staging evidence from replayed traffic and a retired LLM Guard estate with its artifacts accounted for.

  1. Inventory every scanner in production

    Start by listing each input and output scanner that is live today, using the documented set of 15 input scanners and 20 output scanners as the checklist. For each scanner, record its configuration, thresholds, the service and host it runs on (container, Kubernetes workload or VM) and the traffic it sees. The platform team owns this, with application owners confirming which scanners actually gate their requests. The step is done when every live scanner has a row in one register and each row names an owner.

  2. Map each scanner to a candidate

    Match every live scanner to a rail or component in the candidate guardrail. In NeMo Guardrails, the candidate is Apache-2.0 licensed, configures input, dialog, output, retrieval and execution rails in Colang, and includes a server that exposes a /v1/chat/completions endpoint, so input scanners are usually matched to input rails and output scanners to output rails. Mark each scanner as direct, partial or none. Any scanner without a direct equivalent must be confirmed with the vendor or the candidate's documentation and then tested before anyone relies on it. The step is done when security and application owners sign off on the mapping.

  3. Run the candidate in staging on replayed traffic

    Deploy the candidate on the same hosting model you use today, pinned to a named release such as v0.24.1, published 16 September 2026, in a staging environment that matches production controls. Replay recorded production prompts and responses, with sensitive values removed under your data handling rules, and compare each block or allow decision with what LLM Guard produced. Review every disagreement and record whether the rule or the scanner needs to change. The step is done when each disagreement is classified and the replay report is filed.

  4. Cut over one service at a time

    Move one application's traffic to the candidate endpoint, keeping the LLM Guard service running as the rollback path. The application team changes its endpoint, and the platform team watches blocked and allowed counts, latency and errors over an agreed observation window before the next service moves. Test the rollback once in staging before the first cut so the team knows the switch works in both directions. The step is done when the service has run on the new path, its logs have been reviewed and no replay disagreements remain open.

  5. Retire the old deployment and its artifacts

    After the last service moves, stop the LLM Guard containers, Kubernetes workloads or VM services, then remove the pinned Python packages, model caches, secrets and configuration that only they used. The last LLM Guard release on PyPI is 0.3.16, uploaded 19 May 2025, so record the exact version you ran for audit purposes. Keep configuration files, replay reports and logs under your retention policy, and confirm with your compliance team which records they need. The step is done when the inventory from the first step shows no live LLM Guard scanners and the retirement record is filed with the security owner.

Which team fits which LLM Guard deployment model

This team already runs clusters, promotes changes through GitOps and watches workloads with cluster-level monitoring. Kubernetes suits LLM Guard's API server here because scaling, rollouts and health checks already have owners. The cost is that the platform carries most of the operating load, and the scanner inherits its patch cadence from the image pipeline.

  • Skills already in place: Helm or Kustomize authoring, Git-based promotion between environments, and alerting on pod restarts, latency and memory pressure.
  • Work kept in-house: Building images from a pinned base, network policy around the scanner service, secret injection for any API keys, and the GitOps repository that records each version change.
  • Confirm before you start: Whether your Python runtime falls within the range the last PyPI release supports (Python 3.10 or newer but below 3.13), which models each enabled scanner downloads, and whether your egress rules let pods reach them.
  • Main risk: Autoscaling multiplies model memory across replicas, and an archived project receives no security fixes, so your image rebuild schedule becomes a security decision your team owns.

Check memory use at your real prompt sizes before you set resource limits, and record a target date for moving off LLM Guard.

What does it cost and take to run LLM Guard on your own systems?

What drives the cost of running LLM Guard on Docker, Kubernetes or VMs?

Cost follows the number of hosts, the traffic each scanner handles and the labor to keep them running. LLM Guard is MIT licensed, so the software itself carries no license fee. The recurring infrastructure line covers compute for the scanner containers or VMs, storage for logs, load balancing and monitoring. Kubernetes adds cluster operations on top of that, while Docker and VMs leave more host patching and OS hardening with your team. Often the larger line is labor. Your engineers are paid for the build, hardening, upgrades and on-call time. An implementation partner is paid under a written scope for one-time work such as design, deployment and documentation, and may offer a retainer for recurring support. Ask any quote to separate one-time and recurring costs, name the target platform, state the expected request volume and say who patches the images or hosts.

How much effort does self-hosting LLM Guard take, and what sets it?

Effort depends on the target platform, how many environments you run, how much integration the scanners need and whether your team already operates that platform. A single Docker host running one API server is the smallest footprint. Kubernetes adds cluster setup, manifests, ingress, secrets handling and scaling choices. VMs sit between the two, with OS hardening and patching assigned to your team. Integration usually takes longer than deployment: wiring the scanners into your LLM request path, choosing which of the 15 input and 20 output scanners to enable, and tuning them against your own traffic. Ask any quote for the environment list, the scanner set, the integration points and the handover deliverables, since these inputs move the estimate more than the platform name does.

Can our team run LLM Guard in-house without outside help?

Yes, if your team already runs containers or VMs, can read Python and accepts long-term ownership of the scanner. LLM Guard installs with pip as a Python library or runs as an API server, so the deployment skills are familiar to most platform teams. The harder part is maintaining an archived project. LLM Guard was archived on July 9, 2026, so upstream security fixes will not arrive, and your team must track vulnerabilities in its dependencies, rebuild images and test every change. The last PyPI release is 0.3.16, uploaded on May 19, 2025, and it requires Python 3.10 or newer but below 3.13, so check your base images against that range. Decide before you start who owns that work, and have your security team confirm how they will review the models on Hugging Face, which the project states are no longer maintained.

What does an implementation partner do, and what must we provide?

An implementation partner plans, deploys, hardens, integrates, documents and supports the platform inside your own infrastructure. For LLM Guard, that typically covers the target design, the container or VM build, access control and SSO for any service that exposes the scanner, logging, backup, upgrades and handover documents. DeployOpen is one such partner. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. DeployOpen does not publish a price list, and quotes follow a written scope. You provide cloud or data center access, network paths, the LLM endpoints to protect, sample traffic for tuning, named approvers and a decision on which scanners are in scope. Ask partners to split one-time work from retainers for ongoing support, upgrades and testing, and to explain how they will handle the archived upstream.

Is high availability worth building for an archived LLM Guard deployment?

High availability is worth building when the scanner sits in a live request path that customers or staff depend on, because a failed guard can block the application or push teams toward an unchecked bypass. For an archived scanner, HA protects uptime only. It does not restore upstream fixes or patch status. Redundant containers or VMs behind a load balancer add compute, monitoring and a second failure domain to test. If the scanner serves a non-critical internal tool, a single instance with a tested rebuild procedure may be enough. Ask any quote to describe the failover design, the health checks that trigger replacement, how state is handled, how often restore tests run, and whether the design fails open or fails closed when the scanner is unavailable.

What happens if we keep running the current LLM Guard version?

If you keep the current version running, it may keep working, but it stops receiving upstream security fixes, and every new dependency vulnerability becomes your team's job to assess and patch. LLM Guard was archived on July 9, 2026, and the project states it is no longer under active development or maintained. The recurring cost is internal: dependency scanning, image rebuilds, patch testing and a documented risk acceptance for your compliance records. DeployOpen does not recommend new LLM Guard rollouts, so treat the current deployment as a temporary state and plan a move to a maintained guardrail toolkit such as NeMo Guardrails. Ask for a quote that covers a migration assessment, a phased plan and parallel-run testing against your current scanners.

How DeployOpen scopes and supports an LLM Guard hosting plan

DeployOpen plans, implements, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For LLM Guard, the choice between Docker, Kubernetes and VMs is only one part of the scope, because the project is archived and receives no security fixes. We start by confirming whether a deployment is new or already running, then scope the runtime and the migration options in writing.

How we scope

  • The written scope names the runtime (Docker, Kubernetes or VMs), the LLM Guard version and the scanners in use.
  • Engagements are fixed-scope, so scope, deliverables and timelines are agreed in writing before work starts.
  • Where LLM Guard already runs, the scope can include a migration plan to a maintained guardrail such as NeMo Guardrails.

How we build

  • Sizing and high availability are designed per runtime: Docker hosts, a Kubernetes cluster or VM pools.
  • Deployment files, API server configuration, secrets handling and access controls are built and tested in your environment.
  • Backup, restore and upgrade runbooks are written for the chosen runtime and the pinned Python version.

How we hand over

  • Handover covers architecture diagrams, configuration files, runbooks and the compliance evidence your team asks for.
  • Documentation covers upgrades, rollback steps and scanner tuning for the runtime you picked.
  • The handover can include an inventory of the scanners in use, so any later move starts from a clear baseline.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers, quoted from the written scope.
  • Because LLM Guard is archived and receives no security fixes, support plans should name who tracks advisories and approves changes.
  • Ask whether the retainer covers a move to a maintained guardrail, since no new LLM Guard rollouts are recommended.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.