Skip to content

Offline runtime bundle

Last updated: 2026-11-21T21:32:53-03:00 (UTC-3)

To install the gateway in an environment without internet access, the offline bundle carries the approved gateway image, the PostgreSQL image every deployment mode pins, and everything needed to run them (chart, manifests, Compose, configuration and contract), with a verifier that checks integrity before loading and a quick test with the network blocked. The format is offline-runtime-bundle/v2.

PostgreSQL is mandatory, so the bundle runs it by default: the Compose db service and the chart’s StatefulSet use the bundled image. To use your own database instead, point GATEWAY_DATABASE_URL at it (and set database.bundled.enabled: false in the chart). The bundle does not download images or publish anything. On its own, it does not certify a complete air-gapped environment or the security of the images.

The preparer requires --image repository:tag and --expected-id sha256:... obtained from an external approval, plus --database-image naming the exact pinned PostgreSQL (or an explicitly approved local alias) and its --database-expected-id; the database must be the pinned digest and the same platform as the gateway. --expected-id is the ID docker image inspect shows. The bundle names each image by its config digest instead, which is the same under the classic and the containerd image stores, and reports both as image_id and database_image_id. It records a single Linux arm64/amd64 platform and any existing RepoDigests. A local image config ID is never invented as a registry digest. Only the platform present in the daemon can be exported. There is no implicit pull/build/push and no export of every image in the daemon. Docker save lets you select the tag and platform; Docker load restores images and tags, which is why the verifier examines the manifests before loading.

A local tag can move even when its version text stays the same. Preparation still requires the exact pinned PostgreSQL source RepoDigest, matching platform/data-volume profile and the independently supplied local ID. If your version tag points elsewhere, do not overwrite that operator tag: name the already pinned image with a new tag you own and pass that alias. An alias changes the name, never the approved database content.

The directory contains a fixed allowlist: the two Docker-save images, the chart, offline values, a rendered Kubernetes manifest, Compose, the bootstrap YAML, the OpenAPI, a static helper with its source, and documentation/verifiers. It does not include .env, certificates, kubeconfig, Kubernetes Secrets, tokens, storage state or PostgreSQL data. The approved image remains the operator’s responsibility: this process does not detect secrets previously written into layers and does not perform vulnerability analysis.

The bootstrap configuration enables UI, Chat and the local provider directory (provider_catalog); the other flags are omitted/disabled. External feeds, automatic price resolution, external OIDC/JWT, MCP and OTLP are off. The loopback provider is a placeholder for the proof, and GATEWAY_OFFLINE_PROVIDER_KEY holds its credential (the bootstrap’s providers[].api_key_env): set it to the internal provider’s key when you replace the placeholder; copy and adjust the configuration outside the bundle before pointing it at an authorized internal service. allow_insecure_http:true is for local bootstrap only; use HTTPS and an appropriate policy when you deploy.

Secrets are external references: the gateway’s keys and, for the bundled database, GATEWAY_DATABASE_PASSWORD and the GATEWAY_DATABASE_URL that points at it. Backups, retention and the internal network stay with the operator; the bundle does not perform that rollout. The external Collector is disabled in the profile (Swagger ships with the gateway, at /docs/swagger/); its images are not exported without a separate profile and approval of their own.

The Docker daemon, Helm and the Go toolchain must be available. The only build is of the small static helper, using the stdlib and the local cache, never of the approved image. There is no helm dependency update, chart download or repository access. Helm package packages the local chart; the values guarantee imagePullPolicy: Never, an explicit image and identical configuration in all three modes.

Terminal window
: "${APPROVED_IMAGE:?provide the approved tag}"
: "${APPROVED_IMAGE_ID:?provide the local image ID approved through another channel}"
: "${APPROVED_DATABASE_IMAGE:?provide the approved local PostgreSQL tag or owned alias}"
: "${APPROVED_DATABASE_ID:?provide its independently approved local image ID}"
python3 scripts/prepare-offline-bundle.py \
--image "$APPROVED_IMAGE" --expected-id "$APPROVED_IMAGE_ID" \
--database-image "$APPROVED_DATABASE_IMAGE" --database-expected-id "$APPROVED_DATABASE_ID" \
--output /private/tmp/gateway-offline-bundle

The result reports manifest_sha256, image_id and database_image_id; keep those values through a trusted channel separate from the directory. Preparation uses staging and publishes a new directory only after verifying every artifact. It does not overwrite existing output. The optional --release-inputs parameter points to an explicitly selected public snapshot with chart/ and openapi.yaml; by default it uses the current versioned sources. The proof compares the packaged OpenAPI with the contract actually embedded in the image. Mixing a new source with an old image must fail.

Without execution flags, the verifier uses only the Python stdlib, local files and no extraction. It does not require Docker, Helm or the network:

Terminal window
python3 scripts/verify-offline-bundle.py /private/tmp/gateway-offline-bundle

Use a copy of the verifier obtained through a trusted channel; running a tampered script received along with the files does not establish trust. This check demonstrates checksum consistency, not authenticity. If an attacker swaps the manifest and the files together, you need a trusted external hash to detect the substitution. Signatures, publisher identity, SBOM and admission policy are outside the profile. Helm provenance describes signatures as distinct from simple hashes; this bundle does not create a fictitious signature.

Loading and running are explicit opt-ins and require the trusted manifest hash and both image IDs reported by the preparer:

Terminal window
: "${APPROVED_MANIFEST_SHA256:?hash received through the trusted channel}"
python3 scripts/verify-offline-bundle.py /private/tmp/gateway-offline-bundle \
--expected-manifest-sha256 "$APPROVED_MANIFEST_SHA256" \
--expected-id "$BUNDLE_IMAGE_ID" --expected-database-id "$BUNDLE_DATABASE_ID" --load --smoke

Before loading, it creates a private copy and verifies the hashes again. It refuses to overwrite an existing tag that points to a different image: for the bundle platform, docker image inspect --platform must resolve the tag to the archive’s config or image manifest digest, with the same layers. The proof then runs that verified ID with --platform, never the tag. The tools need a Docker that supports image inspect --platform. It uses the Docker environment the operator already chose, without switching contexts, printing certificates or persisting credentials. Do not remove or re-add production tags to test the inverse case: use a temporary tag of your own.

The proof starts only its own resources, with random names: the bundled PostgreSQL with --network=none and its own data volume, a volume and a stopped staging container to copy the configuration/helper, and a --pull=never --read-only gateway runtime that joins the database’s network namespace (loopback only), with no published ports and with memory/pids/CPU limits. It works with a remote daemon through the volume, without depending on bind mounts of client paths. Docker network none leaves only loopback in the container.

/gateway healthcheck tests readiness. The helper runs inside the same namespace, serves a fake provider exclusively on 127.0.0.1, checks GET of the UI/assets/CSP and the OpenAPI, denies an invalid key without sending anything, and performs exactly one authorized synthetic inference with correlation and credential substitution. The helper’s deadline is 15s; processes, commands and cleanup also have deadlines. Synthetic keys exist only in the environment or in a temporary 0600 file and are discarded. The summary does not print tokens or payloads.

  • Manifest at most 1 MiB; a fixed allowlist of files/directories, with no links, absolute names, .., backslashes, Windows drives, duplicates or special types.
  • Image file up to 2 GiB, at most 4,096 physical headers and 128 layers; expanded chart up to 32 MiB/256 headers. PAX/GNU extended TAR headers, sparse files and links are refused before the parser. It is not a universal importer for every Docker/Helm file format.
  • Docker/OCI manifests must point to a single approved image/tag/platform, the correct config ID and consistent blobs. One build attestation (in-toto SBOM/provenance) bound to that image manifest is accepted and its blobs verified; it is never loaded as an image. Legacy v1Compatibility metadata from the export may form only a limited chain with no additional tags; an unknown format fails closed.
  • Helm, Compose and Kubernetes values must keep the bundle’s image/config; the chart and the bundle must share the same OpenAPI. The bundle references an external Secret and does not create a Secret.
  • The smoke test covers the platform of the image actually approved. It does not prove every cluster, engine, architecture, external database, internal provider or multi-region operation. Each node must receive the approved image; importing into the test daemon does not distribute the image to the Kubernetes nodes.

To deploy, load/verify both images in each node’s runtime or use an approved internal registry; provide the Secrets externally. Helm must use deploy/values.offline.json and the local chart (it runs the bundled database through database.bundled; the chart refuses the postgresql block that releases up to 0.0.1-rc.2 used, so do not carry an older values file over); Compose uses deploy/compose.json with the operator’s environment: both services run with a read-only root filesystem, no Linux capability and no-new-privileges, PostgreSQL as its image’s user 70, and the gateway publishes 8080 on loopback only (the bootstrap allows plain HTTP for local use; put your TLS proxy in front to reach it from elsewhere); Kubernetes uses deploy/kubernetes.yaml. Do not apply the profile without replacing the provider placeholder and reviewing flags and access. Changing operational copies does not modify the approved bundle and requires a new review. Rollback requires a compatible image/config/schema and backups of your own.

Cancellation, cleanup and certification scope

Section titled “Cancellation, cleanup and certification scope”

Ordinary SIGTERM and Ctrl-C enter the tools’ cleanup paths and exit nonzero with a finite cancellation message. Cleanup revalidates run labels and deletes containers by the inspected immutable ID, so replacement names do not authorize deletion. Docker volumes use their exact run-owned names/labels. Cleanup failure is an error. SIGKILL, daemon loss and host failure cannot guarantee automatic cleanup: preserve the selected Docker context and daemon identity, then inspect the exact gateway-offline-*/gateway-edition-* run labels, names and mounts in that daemon before scoped recovery. The tools do not emit a startup receipt; record those identities beforehand when interruption recovery is required. Never prune the daemon or delete resources based on image/age alone.

The exercised profile is one Linux/ARM64 bundle with the pinned PostgreSQL, UI/core API and a synthetic loopback provider under Docker network-none. The gateway and database share only that isolated loopback namespace; no host port or public provider is used. Installed images, ordinary lifecycle and a tampered payload are checked separately from manifest checksum consistency. Other architectures, full disconnected Kubernetes clusters, every optional integration, provider accounts, publisher signatures/SBOM/security qualification and a complete air-gap environment are not inferred. The optional Python client wheel/NPX package and a documentation-site build are separate artifacts; the runtime bundle does not require them.

m7gtw[email protected]