Engine reference — generated from the canonical engineering source. Do not edit this page by hand.
Air-Gap Install Walkthrough
Installing and running Zerg (WILDZERG) on a network that cannot reach the internet. This is the real walkthrough promised by the old one-paragraph deferrals in docs/getting-started.md and docs/cli-reference.md (replaced by this page).
What “air-gapped” means here
All inter-service communication stays inside the cluster network; no external DNS or API calls are required (docs/security.md §Air-Gapped Deployment). The only opt-in egress points, each individually gateable
| Egress point | Gate | Default | Set to 0/false for |
|---|---|---|---|
| LLM provider endpoints (by design) | provider config (per-provider key + base URL) | on | point providers at a local model server instead (see below) |
Luna osv_check.lua + mcp_osv.lua (via osv_gate.lua) | LUNA_ALLOW_OSV_CHECK | off | already covered |
Luna tool installs: auto_install.lua downloads, package-manager installs, install_via_pip (via egress_gate.lua) | LUNA_ALLOW_TOOL_INSTALL | off | already covered |
| zerg-cli update channel + SHA256 fetch | ZERG_ALLOW_EGRESS_UPDATE | on | strict air-gap |
Local model server (localhost:11434, ollama) | loopback only — not egress | — | — |
Sol has an explicit air-gap posture: SOL_AIRGAP_MODE=true (config key
airgap_mode). It relaxes ONLY the readiness off-host backup requirement;
the local scheduled Mnesia backup is still required (`mnesia_backup_interval
0
), and a prod node without the posture answers/api/v1/ready503offhost_target_required` when no remote backup target is configured.
The egress inventory is not “three gates”: Sol’s outbound sockets target deployment-configured endpoints only, but some of those endpoints have background refreshers:
| Sol background/egress surface | Controlled by | Default |
|---|---|---|
| Mango auth + audit-archive URLs | mango_url / mango_pub_url / archive config | configured |
| LLM provider endpoints | provider config (per-provider key + base URL) | configured |
| Channel webhook URLs | channel config | configured |
License/seat refresh (seats_url) | seats_enabled + seats_url; seats_refresh_ms (default 30000) | off when seats_url is empty; a configured seats_url is a 30s background HTTP(S) fetch (sol_license) |
| OAuth token refresh for declarative providers | provider oauth sub-map; zerg oauth login | off unless an OAuth provider is configured |
In an air-gap, point these at in-cluster services (or leave seats_url
empty) and keep the bind defaults (http_ip 127.0.0.1,
zmq_bind_addr 127.0.0.1). The Luna/CLI gates above are the complete
worker-side gate surface; the Sol-side endpoints are the table above.
1. Provision the host
Provisioning is the wild blueprint (runit + podman + OpenResty) — see the WILDZERG operator runbook §Install. On an air-gapped host, two things change:
- No source/build toolchain needed: Zerg is delivered as images +
release assets, never built on the target. The 8 images
(
sol mango luna limon-web toronja-web starfruit-web docs-web cli— the build-images step in.crow.yml) are pushed to the internal registry (registry.nonsense.ws, internal-only — see docs/development.md) and deployed from there; an air-gapped site either mirrors that registry or ships image archives. - Wild’s provisioning scripts (
wild/scripts/provision/) are the path; they are run from the wild repo clone (see runbook §1). Set the Sol posture explicitly withSOL_AIRGAP_MODE=true(see §3 below).
2. Get the artifacts onto the host
Three artifact sets must cross the air gap:
| Artifact | How to cross | Source |
|---|---|---|
| Container images (all 8) | podman save on the connected host → archive → podman load on the target (or a private registry mirror reachable inside the site) | build output / registry.nonsense.ws |
Release assets (zerg CLI, luna, sol-<ver>.tar.gz, SHA256SUMS, minisign sigs) | download on the connected host, carry over, install manually | the Forgejo release |
Engine artifacts: llama-<build>-<rev12>-<class>-linux-x86_64.tar.gz + .sha256 + .minisig, and engines-<class>.json | carry the tarball triple with the release; verify SHA256SUMS (and the minisig when a minisign binary is present), then install with scripts/engine-install.sh <tarball> --root /opt/llama (the receipt records manifest_hash from engines-<class>.json) | same Forgejo release (published by wild/scripts/release/publish-release.sh --engines-dir) |
| Tree-sitter grammars / model files | grammar archives are baked at build time; model weights are carried as files to the local model server | build pipeline / model registry |
Forgejo itself is air-gap capable: FORGEJO_OFFLINE_MODE=true disables
telemetry and update checks, and its images export/import the same way
(docs/forgejo-admin.md §10 Air-Gapped Deployment).
3. Configure the egress gates
On every Luna worker host and the CLI host:
# Luna: no MCP package-vuln lookups, no tool installs (both default off —
# set explicitly for a documented posture)
export LUNA_ALLOW_OSV_CHECK=0
export LUNA_ALLOW_TOOL_INSTALL=0
# zerg-cli: no update-channel contact (check/download/apply all refuse)
export ZERG_ALLOW_EGRESS_UPDATE=0
The CLI behavior with the update gate off is explicit, not silent:
$ zerg update check
update check skipped: ZERG_ALLOW_EGRESS_UPDATE=0 (air-gap posture)
(Zerg-cli code: egress_allowed in zerg-cli/cli/update.lua; the
check/download/apply commands all route through it.) Sol-side, gate the
deployment-configured endpoints in the inventory above: leave seats_url
empty, disable unused OAuth providers, and point Mango/provider/webhook URLs
at in-cluster services.
Declare the air-gap posture explicitly so prod readiness does not demand an off-host backup target:
# container entrypoint (Sol)
export SOL_AIRGAP_MODE=true
# bare-metal sys.config
# {sol, [{airgap_mode, true},...]}
With airgap_mode=true, keep sol_mnesia_backup_remote_path unset (the
default) so the Mnesia backup’s offsite rsync leg stays off and backups
never leave the host. The LOCAL scheduled Mnesia backup is still required:
mnesia_backup_interval must be > 0 (an air-gapped prod node with the
interval at 0 reports readiness local_backup_required, not green).
Without the posture a prod node without an off-host target reports
offhost_target_required (sol_mnesia_backup.erl, sol_health:check_backup/0).
There are no third-party CDN/analytics references in the frontend or
Luna trees to purge — ci/egress_assert_lint.py asserts that
permanently (docs/security.md §Egress inventory).
4. Local model serving
With egress off, inference comes from a local server. Luna ships an
ollama-compat path (localhost:11434) and can call any provider whose
base URL is a loopback/LAN address (provider config, per-provider base
URL — docs/security.md §Egress inventory). Set providers accordingly in
~/.luna/ config; Sol routes to whatever provider endpoints are
configured for it — point those at the local model server.
5. Install the CLI without the update channel
Two options:
# (a) offline manual install from the carried release assets:
sudo install -m 0755 zerg /usr/local/bin/zerg
sudo mkdir -p /opt/zerg && sudo cp VERSION /opt/zerg/VERSION
# (b) if a mirror of the Forgejo release is reachable INSIDE the site,
# point the channel at it instead of disabling it:
# ZERG_UPDATE_CHANNEL + update_repo config key (see
# docs/cli-reference.md §Updates) — or just carry new releases manually.
The TOFU pin (~/.config/zerg/trusted-key) and minisign verification
apply to any channel — signature verification is channel-independent
.
6. Verify the posture
zerg status # Sol liveness
curl -sf http://127.0.0.1:21434/api/v1/ready # readiness (19 subsystem checks; sol_health:check_all/0)
zerg update check # MUST print the air-gap skip, not network
zerg list && zerg start <local-model> # local inference round-trip
And from the operator side: git grep for nonsense.ws in your configs
should only show the deliberately-internal hosts (registry/Forgejo
mirrors); no public-doc lint should fire (the docs lints gate this
permanently: ci/egress_assert_lint.py, ci/docs_surface_lint.py --check hosts).
Upgrades on an air-gapped site
The CD chain is tag-triggered and network-dependent; an air-gapped site upgrades by carrying artifacts across the gap (images via save/load or an internal registry mirror; release assets manually) and running the same deploy flow the runbook describes. The egress gates stay off; there is no silent background contact.
See also
docs/wild-zerg-runbook.md — deploy/upgrade/rollback flow
docs/security.md (§Air-Gapped Deployment) — posture + egress inventory
docs/backup-and-dr.md — backups also stay in-site (Mnesia remote
copy unset)
docs/configuration-reference.md (§Air-Gapped Deployment) —
the egress gates + bind defaults; license_file for cold-start
licensing
docs/forgejo-admin.md (§Air-Gapped Deployment) — the git forge offline