MagicAF is designed for air-gapped environments from the ground up. Every service runs locally, and all dependencies can be vendored for offline use. For more information about MagicAF’s security architecture and compliance features, see the About page.

Overview

An air-gapped deployment requires four preparation steps on an internet-connected machine, followed by transfer and build on the isolated host.

Step 1 — Vendor Rust Dependencies

On an internet-connected machine:

# From the MagicAF workspace root
cargo vendor > .cargo/config.toml

This downloads all crate dependencies into a vendor/ directory and generates a .cargo/config.toml that redirects Cargo to use local sources.

Copy the entire workspace (including vendor/) to the air-gapped host.

Step 2 — Pre-pull Container Images

Save Docker images as tarballs:

docker save qdrant/qdrant:v1.9.4 > qdrant.tar
docker save vllm/vllm-openai:latest > vllm.tar
docker save ghcr.io/huggingface/text-embeddings-inference:1.2 > tei.tar

Transfer tarballs to the air-gapped host and load:

docker load < qdrant.tar
docker load < vllm.tar
docker load < tei.tar

Step 3 — Pre-download Models

Download model weights on the internet-connected machine:

# Embedding model
huggingface-cli download BAAI/bge-large-en-v1.5 --local-dir ./models/embedding/

# LLM model
huggingface-cli download mistralai/Mistral-7B-Instruct-v0.2 --local-dir ./models/llm/

Copy the ./models/ directory to the air-gapped host.

Step 4 — Build on Air-Gapped Host

# Cargo will use vendored dependencies — no network needed
cargo build --release

Complete Transfer Checklist

ArtifactSize (approx.)Purpose
MagicAF source + vendor/~200 MBApplication code + dependencies
qdrant.tar~100 MBVector database
vllm.tar or tei.tar~2–5 GBInference servers
./models/embedding/~1–2 GBEmbedding model weights
./models/llm/~4–14 GBLLM weights (varies by model)

Verification

After setup, verify all services are running:

# Qdrant
curl http://localhost:6333/healthz

# Embedding server
curl http://localhost:8080/health

# LLM server
curl http://localhost:8000/v1/models

Then run the health check in code:

embedder.health_check().await?;
llm.health_check().await?;

Using InMemoryVectorStore Without Docker

For environments where Docker is unavailable, use the in-memory vector store:

use magicaf_core::vector_store::InMemoryVectorStore;

// No Qdrant needed
let store = InMemoryVectorStore::new();

// Or load from a pre-built snapshot
let store = InMemoryVectorStore::load(Path::new("store.json"))?;

This eliminates the Qdrant dependency entirely. See Edge & Mobile for details.