Self-hosting NemoGuard safety models as NIM containers

How to run the content safety, topic control, jailbreak detection and GLiNER-PII NIMs on your own GPUs and point NeMo Guardrails at them, with the checks to make before you commit hardware.

On this page

Why teams self-host NemoGuard NIMs for NeMo Guardrails

Teams that need safety checks on prompts and model outputs often do not want that text sent to a third-party moderation service. Self-hosting the NemoGuard NIM containers lets NeMo Guardrails run content safety, topic control, jailbreak detection and GLiNER-PII detection on GPUs you operate, so user text is classified inside your own network and under your own logging and retention rules. The decision is usually driven by data classification, contractual limits on sending personal data to outside processors, or networks where outbound calls are restricted. Before committing, confirm with your compliance team which of these checks will see regulated data, because that determines which NIMs must stay inside your boundary.

Each NIM exposes a model endpoint, and the rails in your NeMo Guardrails configuration call that endpoint as they would any other model. The config.yml file defines which models the rails use and where they are reached, while the Colang flows and rail settings decide when a check runs and what happens when it flags content. This separation means the policy stays in your configuration under version control, and the NIM handles only classification. Plan for the endpoint to be a dependency of every request that passes through the affected rails, so its availability, latency and failure behavior become part of your guardrail design.

Self-hosting fits best when you already run GPU capacity, need the checks to stay in an air-gapped or tightly segmented environment, or want the same safety layer across several applications without per-request fees to an outside provider. It is a weaker fit when you have no GPU operations capability and only a few low-volume use cases. Confirm NGC access terms, the NIM licensing that applies to your use, and which NIM versions work with your NeMo Guardrails release with NVIDIA's current documentation, because the NeMo Guardrails library is Apache 2.0 licensed while NIM terms are set separately. The NGC microservice container was sunset on October 1, 2026, so do not plan around it as a substitute for the NIMs.

Which NemoGuard models to self-host and when each fits

This table compares the four NemoGuard models by the rail each one feeds, the text it reads, and whether a self-hosted NIM endpoint or the library-bundled path fits your policy. Use each row as an input to a design review, not as a sizing decision. Confirm hardware, license terms and NIM availability in your release against the current NVIDIA documentation before you commit, because these details change between releases.

ModelRail it feeds and data it seesSelf-hosted endpoint or library pathConfirm before you build
Content safetyInput and output rails. Reads user prompts and model responses for harmful content.Self-hosted endpoint when policy keeps prompt and response text inside your network.GPU hardware, license terms and whether your release offers it as a NIM.
Topic controlInput and dialog rails. Reads user messages to keep the assistant on approved subjects.Self-hosted endpoint when topic rules and their logs must stay in your environment.Supported topic definitions, GPU needs and NIM availability for your release.
Jailbreak detectionInput rails. Reads user prompts for jailbreak and injection patterns before the model call.Self-hosted endpoint where prompt text cannot leave your boundary.Detection coverage, false-positive behavior, GPU needs and NIM availability.
GLiNER-PIIInput, output and retrieval checks. Reads prompts, responses and retrieved text for personal data.Self-hosted endpoint when personal data must not reach an outside service.Entity types it detects, hardware needs and license terms for your use case.
Deciding factorWhether the text a rail reads may leave your network, and who owns a detector outage.If text may not leave your network, plan a self-hosted endpoint for that rail.Who receives alerts when a detector is down and how blocked traffic fails.

Confirm the platform path before you pull any NIM image

Before you pull a NemoGuard NIM image, confirm that the platform you are building on is still supported. NVIDIA has sunset the NeMo Guardrails microservice as of October 1, 2026, and its NGC catalog page says there will be no new releases and the artifact is no longer supported. The archived NeMo Microservices documentation says all new development has moved to NeMo Platform and asks existing users to contact their NVIDIA account team to discuss next steps. The NeMo Platform repository linked from that notice now resolves to NVIDIA-NeMo/nemo-helix, an Apache-2.0 control plane whose documentation runs NeMo Guardrails as an inference gateway plugin that applies guardrail configurations to model endpoints. Those are different deployment shapes, so the choice of platform changes what you run and what you operate.

Treat this as a decision to make in writing, not a detail to settle during setup. Ask NVIDIA, through your account team, which NIM images for the content safety, topic control, jailbreak detection and GLiNER-PII models remain supported for your use case, which versions carry that support, and what license terms apply to each image and to your deployment mode. Ask whether the models are supported when called from the open-source NeMo Guardrails library, from a self-built guardrails server, or only through NeMo Helix. Record the answers with dates and the named contact. If the answer is unclear, do not build the rest of the deployment on an assumption.

For the next read, start with the NeMo Helix documentation on guardrail models, which describes how the gateway plugin applies models to endpoints. Compare its requirements with your planned pattern before you pull anything. Confirm the GPU, storage and network requirements from NVIDIA's own documentation for the exact image versions you plan to use, because these depend on the image and the hardware. Once the platform path and license position are confirmed, the image pull, NGC access and endpoint configuration steps below can proceed against a known target.

How rails reach NemoGuard endpoints inside your network

A request starts in the client application and reaches the NeMo Guardrails server or library, where input rails call the safety models before the model runs and output rails check the response. The safety models run as NIM containers on GPU nodes inside a trust boundary you define, and rail decisions are written to logs you control. Check that every rail call stays inside that boundary, that the GPU network is not reachable from outside, and that a failed or unavailable endpoint blocks or flags traffic instead of passing it silently.

Rail calls to NemoGuard NIMs stay inside the GPU network boundary, with decisions written to logs.

NemoGuard NIM setup sequence with checks at each stage

This sequence takes a team from an installed NeMo Guardrails release to a self-hosted NemoGuard safety model answering guardrail checks on GPUs they control, with a verification check after each stage so problems surface where they start.

  1. Confirm the NeMo Guardrails version and Python runtime

    The platform engineer records the NeMo Guardrails release in use and confirms the interpreter is Python 3.11, 3.12 or 3.13, since the current 0.25.0 release requires one of these. Check the installed version with the package manager and the interpreter with a version command on the host or build image. Done means the version and runtime are written into the change record and match the library's published requirements. Confirm the exact release and Python support against the current NVIDIA documentation before you pin anything.

  2. Obtain NGC access and confirm each model license

    The security or procurement owner, with the platform lead, signs in to the NVIDIA NGC catalog with an account your organization controls and confirms access to each NemoGuard NIM you plan to run, including the content safety, topic control, jailbreak detection and GLiNER-PII models. Read the license terms on each model page and record who accepted them and under what entitlement. Done means every required model has a recorded license decision and a working pull credential stored in your secrets system. Ask NVIDIA or your account team which terms apply to production use in your environment.

  3. Prepare GPU nodes and the container runtime

    The infrastructure engineer prepares GPU hosts or Kubernetes GPU nodes in your infrastructure, installs the GPU driver and a container runtime with NVIDIA GPU support, and confirms the accelerators are visible inside a container. Check driver and runtime compatibility against the current NIM support matrix in NVIDIA's documentation, and confirm the GPU memory each model needs for the hardware you have. Done means a test container lists the GPUs and the host has enough free memory for the planned models. Keep the node labeled so later scheduling and capacity planning can find it.

  4. Start each NIM container with pinned tags

    The platform engineer pulls each NemoGuard NIM image using the tag and run options from the current NVIDIA documentation, then starts it with the GPU assigned, the NGC credential supplied through your secrets handling and a local port bound to the internal network only. Record each image digest or tag in your change record. Done means each container reports a healthy state in its logs, and a local readiness request to each endpoint returns a successful response. Confirm the exact commands and model tags against NVIDIA's current instructions, since they change between releases.

  5. Point the rail configuration at local endpoints

    The engineer who owns the guardrail configuration edits the model and rail settings in config.yml so each rail calls the local NIM endpoint rather than a hosted service, and sets API keys to values that come from your secrets store. Review every rail that uses a safety model so none still points at an external address by default. Done means the configuration loads without errors and a dry run of the server shows each rail resolving to your internal endpoint. Keep the file in version control so the change can be reviewed and reverted.

  6. Verify with blocked and allowed test prompts

    The security engineer runs a fixed set of test prompts through the guardrails server, including prompts the policy should block (for example, a jailbreak attempt and a request for personal data) and prompts it should allow (ordinary in-scope questions). Each rail should produce the expected outcome, and the NIM logs should show the request reached your local endpoint. Done means every test prompt returns the expected result and the test set, its results and the image tags are saved as evidence. Expand the set over time with examples from your own use case, and rerun it after every model or configuration change.

  7. Record the setup for operations and review

    The platform lead writes the final configuration, image tags, GPU assignments, endpoint addresses and test results into the operations runbook, and assigns owners for updates, license renewals and endpoint health checks. Confirm that monitoring can see each NIM endpoint and that an outage would be visible to the team. Done means the runbook names an owner for each NIM and the health signal that tells the team a safety model is down. This record is what later audits, upgrades and incident reviews will rely on.

How the deployment changes in cloud, data center and air-gapped environments

In a cloud account, the simplest path is to pull the NemoGuard images directly from the NVIDIA NGC catalog onto GPU nodes in the same region as the guardrails server. The guardrails server is usually a CPU workload, so the safety model endpoints sit on a separate GPU node pool that the server reaches over private addressing. Keep the GPU pool in the same availability zone structure as the server where latency matters, and confirm that the instance family you choose is supported by the NIM release you plan to run.

  • Image path: Direct pull from NGC with a pull credential stored in your cluster secrets, or a copy in your cloud container registry that your nodes pull from.
  • GPU placement: A dedicated GPU node pool, reached from the guardrails server over a private subnet and not exposed to the internet.
  • Model downloads: Confirm whether the NIM fetches model weights at first start, from where, and whether a cache volume can be pre-populated.
  • Telemetry: Confirm which outbound endpoints each container contacts and whether telemetry can be disabled in your configuration.
  • Egress rules: Restrict outbound traffic from the GPU pool to the registry and model sources you have approved.

Before launch, check the NIM support matrix for your chosen GPU model and the egress rules with your cloud security team.

How NIM KV cache reuse affects latency and what to measure

KV cache reuse can lower guardrail latency, but only on traffic that repeats the same leading tokens, so decide on it with your own measurements rather than on the general claim. A transformer model stores intermediate attention values (the key-value cache) for the tokens it has already processed. When a new request begins with the same text as an earlier one, a serving engine that supports reuse can skip recomputing that shared prefix. Guardrail calls are a good candidate because every input rail, output rail and topic check typically sends a long, fixed instruction block before the short user text or model response being checked. The longer and more stable that shared prefix, the more work reuse can avoid.

Before enabling anything, confirm three things in NVIDIA's documentation for each NIM you run: which NemoGuard models and NIM releases support KV cache reuse, how the feature is switched on (the setting name, environment variable or deployment option), and what it does to GPU memory. Reuse keeps cached prefixes resident, so it generally trades memory for speed. Note how much memory your GPUs have left after the model weights load, since that headroom sets how many concurrent requests the cache can serve. Ask your NVIDIA contact or support channel whether the behavior differs for the content safety, topic control and jailbreak detection NIMs, because the prompt length and shared prefix differ between them.

Measure rather than assume. Capture a representative sample of production-like traffic, replay it against the same NIM with reuse off and on, and record time to first token and total latency per rail, along with GPU memory use and throughput under concurrent load. Keep prompts, rail order and hardware identical between runs. Separate cache-friendly traffic (fixed rail prompts, similar conversations) from unique traffic, because the gain on the second group is usually small. Run the test at your expected peak concurrency, not one request at a time, since the memory trade-off only appears under load. Use the results to decide whether reuse is worth the memory on each NIM, and repeat the test after any NIM or model upgrade.

Security controls for NGC credentials, model endpoints and logs

Self-hosted NIMs hold credentials, serve safety decisions and see the prompts they inspect, so each of these surfaces needs a deliberate control. The cards below cover the decisions your security team should make before the first container starts, and the checks to repeat after each change.

NGC API key handling and rotation

Pulling NIM images and model artifacts from NGC depends on an API key, and that key is a standing credential for your build and runtime systems. Decide which pipeline or service account holds it, store it in your secrets manager rather than in image layers or shell history, and set a rotation schedule. Confirm with NVIDIA how keys are scoped and revoked for your organization before you depend on them for production pulls.

NGC catalog page

Network restriction to the guardrails tier

Safety NIM endpoints should accept traffic only from the guardrails server or its gateway, not from application subnets or user-facing networks. Enforce this with network policies, security groups or firewall rules, and test it from a workload outside the guardrails tier. A reachable endpoint lets any caller probe your safety models or bypass the rails entirely.

TLS and authentication on endpoints

Decide whether traffic between the guardrails server and each NIM is encrypted with TLS, who issues the certificates, and how clients authenticate. Confirm which authentication options the NIM release you run supports, and whether an internal gateway must add them. Document certificate renewal ownership, because an expired certificate turns into a guardrail outage.

Logging decisions without raw prompts

Log each rail decision, including the rail name, the verdict, the policy version and a request identifier, so blocked and allowed outcomes can be audited. Keep raw prompts and model outputs out of these logs unless your policy explicitly permits storage, and set a retention period that your legal and privacy teams have approved. Verify that debug logging is off in production.

Image provenance by mirroring and scanning

Mirror the NIM and guardrails images into your own registry, record their digests, and scan them for known vulnerabilities before admission to a cluster. Pin deployments to digests rather than mutable tags so that an updated image cannot change safety behavior without a review. Ask NVIDIA which release notes and security advisories apply to each image you run.

What do buyers ask about self-hosting NemoGuard NIMs?

What drives the cost of self-hosting NemoGuard NIMs?

The main cost drivers are GPU capacity, the number of safety models you run, the number of rails each request passes through, and the environment you run them in. Each NIM you host needs accelerator capacity sized to its request volume, and every added rail can add model calls per request. Air-gapped, multi-region or high-availability designs add hardware and operating effort. Ask for a quote that lists each model, the GPU type and count it assumes, the environments covered, and which costs are one-time (build, configuration, testing) and which recur (hardware, NVIDIA AI Enterprise licensing where it applies, and ongoing operations). Confirm current NIM licensing terms directly with NVIDIA, since this page does not state them.

Can our own team self-host NemoGuard NIMs without a partner?

Yes, a capable platform team can do it, but the work spans several disciplines: GPU node setup, container registry and NGC access, Kubernetes or Docker operations, Python configuration of NeMo Guardrails (version 0.25.0 requires Python 3.11, 3.12 or 3.13), endpoint wiring, and load testing. Decide early whether your team has GPU operations experience and time to build the test suite. A partner is useful when you need the work fixed to a written scope with deliverables, or when the security review needs a second set of hands. Either way, the deciding factors are internal skills and calendar time, not the open-source license.

What do we need to provide for a NIM self-hosting engagement?

Plan to provide GPU access in the infrastructure where the models will run, an NGC account owner who can accept NVIDIA's terms and pull the containers, and a named contact for security sign-off on the architecture, data flows and access controls. You also need representative test traffic: sample prompts, expected blocked and allowed cases, and the languages and topics your assistant handles. Access to your identity provider, secrets store and logging platform is needed for the integration work. Agree on who approves changes to rail configurations, because that approval often takes longer than the technical build.

How long does self-hosting NemoGuard NIMs take?

Duration depends on scope: how many NIMs you host (content safety, topic control, jailbreak detection, GLiNER-PII), whether you run them on one cluster or several, how many environments need to match, and how much test traffic and security review the rollout requires. No duration is set in this page's sources, so ask for a timeline in the written scope, with milestones for GPU readiness, container deployment, endpoint wiring, testing and sign-off. Timelines usually slip at GPU procurement and at security review, so confirm both early.

Is NeMo Guardrails still open source under Apache 2.0?

Yes. NeMo Guardrails is an open-source library licensed under Apache 2.0, developed in the NVIDIA-NeMo/Guardrails repository, and NVIDIA still publishes new releases. The current release is 0.25.0, published on 19 November 2026 to PyPI with the license expression Apache-2.0. The Apache 2.0 license covers the library code. It does not by itself cover the NVIDIA NIM container images, which are distributed through NGC under NVIDIA's own terms, so check those terms before you build your deployment on them.

What changes after the NeMo Guardrails microservice sunset?

NVIDIA has sunset the NeMo Guardrails microservice container: its NGC catalog page says NeMo microservices has been sunset as of October 1, 2026, with no new releases and no ongoing support for that artifact. NVIDIA's archived documentation says new development has moved to NeMo Platform and asks existing users to contact their NVIDIA account team. The open-source library and the self-hosted NIM approach described on this page are separate from the microservice, but confirm the support status of each NIM image and its licensing with NVIDIA before you commit. Plan for the change by pinning versions, keeping a mirrored copy of the images you rely on, and reviewing the NeMo Guardrails upgrade path.

Limits to confirm in your environment before you commit GPUs

NemoGuard safety models run as NIM containers on GPUs you operate, so the hardware decision depends on facts that change with the NVIDIA product lifecycle. The cards below list what to confirm with NVIDIA or in a test environment before you commit budget, and they focus on the gaps that the NeMo Guardrails microservice sunset has opened.

Which NIM images and licenses apply

The NeMo Guardrails microservice container on NGC is no longer supported after its sunset, so do not assume the NIM images you plan to pull carry the same terms or support. Ask NVIDIA which NIM images are supported for your use, under which license, and whether your existing NVIDIA AI Enterprise or NGC entitlement covers them. Record the answer in writing before you pull images into a production registry.

Microservice sunset
Oct 1, 2026
NGC guardrails container

GPU model and memory per NIM

Each safety model has its own accelerator and memory requirements, and those numbers come from NVIDIA's current NIM documentation for the image version you choose. Confirm the supported GPU models, the minimum memory per model, and whether several models can share one GPU. Run each candidate image on the GPU type you plan to buy and measure memory use under your expected concurrency.

Deployment mode support

Confirm that each NIM runs in the mode you intend to use, whether that is Docker on a single host, Kubernetes with the GPU operator, or a disconnected network. Some deployment patterns may not be documented for every model. Ask NVIDIA for the supported modes per image and test the one you pick with the same node pools and storage class you will use in production.

Supported NeMo Guardrails and Python versions

NeMo Guardrails 0.25.0 requires Python 3.11, 3.12 or 3.13, and the 0.25.0 release deprecates the LLMRails class in favor of Guardrails. Confirm which library release works with the NIM endpoint API you deploy, and pin both the library and the Python runtime in your build. A mismatch between the guardrails client and the NIM version can break rails at startup rather than at request time.

Guardrails releases

KV cache reuse for your models

KV cache reuse can reduce latency for repeated prompt prefixes, but whether it applies depends on the specific model, NIM version and serving configuration. Ask NVIDIA which of your chosen models support KV cache reuse and which settings enable it. Then measure latency with and without it on your own prompts, because the gain depends on how much of each request is a shared system prompt.

Protection during detector outages

When a safety model endpoint is down, the rails that call it may fail open or fail closed depending on your configuration and the library version. Test this in a staging environment by stopping each NIM and sending representative traffic. Document which requests are blocked, which pass unchecked, and what the operator sees. Treat unchecked traffic as a control gap that needs an alert and a decision.

Where to read next for the rest of the deployment

Once the safety models answer on endpoints you control, the next decisions sit in the deployment topics that surround them. Start with Building and running the NeMo Guardrails Docker image and Running NeMo Guardrails on Kubernetes, which cover how the guardrails server reaches the NIM endpoints you have just set up, how configurations are mounted, and where GPU nodes belong in the cluster. If your safety models must run without outbound access, read Running NeMo Guardrails in an air-gapped network before you fix endpoint addresses, because it covers mirrored container images and the default outbound calls you need to remove. Also check Embedding NeMo Guardrails in Python vs running the guardrails server to confirm that a central HTTP service is the right shape for your teams before you commit to a topology.

Capacity and resilience come next. Sizing NeMo Guardrails: CPU for the library, GPUs for safety models explains how each added rail adds model calls per request, which affects how much GPU capacity the NIMs need. High availability for a self-managed NeMo Guardrails server covers redundant safety model endpoints and health endpoints, which the open-source server does not provide out of the box. Read Deploying the jailbreak heuristics and AlignScore servers as well, since a detector outage can quietly change what your assistant blocks. For rail syntax, config keys and the Colang versions your release supports, use the NeMo Guardrails documentation and confirm each setting against the release you deploy.

How DeployOpen scopes and delivers NemoGuard NIM deployments

DeployOpen plans, builds, tests, documents and supports self-hosted NemoGuard NIM containers inside your own infrastructure, including your cloud accounts, data centers or air-gapped networks. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.

How we scope

  • Confirm which NemoGuard models (content safety, topic control, jailbreak detection, GLiNER-PII) your rails actually call and where each runs.
  • Record GPU hardware, driver and NGC access arrangements, and the network paths between the guardrails server and each NIM endpoint.
  • Agree in writing whether KV cache reuse, air-gapped image mirroring and redundant model endpoints are in or out of the fixed scope.

How we build

  • Set up NGC access and pull the NIM container images into your registry, then verify each image against your approved tag list.
  • Point the NeMo Guardrails configuration at your local NIM endpoints and test each rail with representative inputs and outputs.
  • Configure KV cache reuse settings and measure latency and GPU memory use before and after the change.

How we hand over

  • Deliver a written runbook covering container versions, endpoint configuration, secrets handling and the rollback steps for each model.
  • Provide test results for each rail, including the inputs used, expected outcomes and the observed behavior after fixes.
  • Walk your platform and security teams through operation, logging and the checks needed before every container upgrade.

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer, scoped separately from the build.
  • Retainers can cover tracking new NIM releases, retesting rails after each model or NeMo Guardrails upgrade, and incident support.
  • Ask any provider how they will handle changes in NVIDIA's NGC catalog availability and support status for these containers.

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.