SLAP documentation

Deployment Guide

How to get SLAP from nothing to a working, fully offline AI platform on a machine that has never touched the internet.

There are two paths. Read the summary, pick one, then follow only that section.

Path Use when Internet needed on the target
A - Connected install Development, evaluation, a server that has internet during setup Yes, once
B - Air-gapped install The real deliverable. Protected environments where the machine never connects to anything No, never

Path B is the one the sponsor called a super-stretch goal. It has two stages: build a bundle on a connected machine, then carry it across on removable media.


Before you start: what the target machine needs#

Both paths require the target machine to already have:

The bundle cannot install Docker for you. Docker itself has to get onto the air-gapped machine some other way: preinstalled in the system image, from the distribution offline package repository, or from .deb/.rpm files carried over separately. This is a genuine gap in the current design and is recorded in docs/SCOPE.md NB-02.

Check what you have:

docker --version
docker compose version
docker info          # should not error

Path A - Connected install#

For a development machine or a server with internet during setup.

1. Get the repository#

git clone <repository-url>
cd CapstoneLocalAI

2. Start, and download models#

./start_mvp.sh --online

--online is what temporarily allows Ollama to reach the internet. Without it the platform starts sealed and cannot download anything.

The script will:

On Windows, use .\start_mvp.ps1 --online from PowerShell, or run the .sh from Git Bash.

3. Create the administrator account#

Open http://localhost:8080. The first account created becomes the admin.

4. Check registration is closed#

Signup is closed by default (ENABLE_SIGNUP=false, D-20), so add people in Admin Panel > Users. If your .env predates D-20 and still says ENABLE_SIGNUP=true, set it to false, then:

./start_mvp.sh

start_mvp.sh warns on every run while signup is open.

5. Confirm it is sealed#

./scripts/verify_offline.sh

This does not read the config and trust it. It attempts real outbound connections from inside each network and reports what happened.


Path B - Air-gapped install#

Two machines. The build machine has internet. The target machine never will.

Status: the team reports that a USB install with no internet has been run (confirmed by the team, Dec 1, 2026). The date, the machines and the results are not yet written down. Updating an install from a second bundle has not been tested.

  BUILD MACHINE                 FLASH DRIVE              TARGET MACHINE
  (has internet)                                         (air-gapped)

  git clone                     bundle/                  docker load
  build_bundle.sh   ---->       ~10 GB       ---->       install_offline.sh
    pulls images                 images/                   restores models
    pulls models                 models/                   starts sealed
    saves everything             repo/                     verifies no egress
                                 SHA256SUMS

Stage 1 - On the build machine#

1.1 Get the repository#

git clone <repository-url>
cd CapstoneLocalAI

1.2 Choose your models#

Edit .env (copy it from .env.example first if it does not exist):

CHAT_MODEL=llama3.2:3b
EMBED_MODEL=nomic-embed-text
EXTRA_MODELS=gemma3:4b

Think about the target hardware here, not the build machine. If the target has no GPU and 8 GB of RAM, an 8B model will be painful; the 3B default is the safe choice. See models/README.md for a size guide.

Extra models as .gguf files (optional). Put them in this project's models/ folder now. The bundle copies them into its own models/ folder, and its checksums cover them. You can also add them to the drive after the build; see Stage 2.

Image versions are already pinned in docker-compose.yml (D-18), so a bundle built today and one built next month contain the same software.

1.3 Build the bundle#

./scripts/build_bundle.sh

Or write it straight to the flash drive:

./scripts/build_bundle.sh /media/usb/slap

The bundle copies the repository from its last commit (git archive HEAD), so commit any change you want on the target first. Uncommitted edits are left out.

On Windows, Git Bash rewrites paths that look like Unix paths before Docker sees them. A probe on 2026-12-01 showed this would break the step that packs the models, and the installer's step that unpacks them. Both scripts now switch the rewrite off for that one command (MSYS_NO_PATHCONV=1). Neither has been run end to end from Git Bash since the fix.

This takes a while and produces 10 GB or more:

bundle/
  install.sh                      the one script to run on the target
  images/slap-images.tar          all five container images
  models/ollama_models.tar.gz     the downloaded models
  models/*.gguf                   your own model files, if any
  repo/                           compose files, nginx config, scripts, docs
  MANIFEST.txt                    exact image digests and model list
  SHA256SUMS                      integrity check
  INSTALL.txt                     short instructions for the other end

MANIFEST.txt records the exact image digests that were shipped. Keep it. It is the evidence of what was actually installed, which is the kind of thing an auditor asks for and nobody can reconstruct afterwards.

1.4 Copy to removable media#

cp -r bundle /media/usb/slap
sync

Then verify the copy before you walk away, because a bad copy discovered on the far side of an air gap costs you a round trip:

cd /media/usb/slap && sha256sum -c SHA256SUMS

Media policy warning. In many nuclear, defence and healthcare environments a USB drive is itself a controlled item with its own handling procedure, and plugging one into a protected system may require prior authorisation. Confirm the site policy before you show up with a flash drive. This is an open question in docs/SCOPE.md NB-02.

Stage 2 - On the air-gapped target machine#

2.1 Copy the bundle to local disk#

cp -r /media/usb/slap ~/slap-bundle
cd ~/slap-bundle
sha256sum -c SHA256SUMS      # verify it survived the trip

2.2 Install#

Optional: put extra .gguf model files in the bundle's models/ folder first. Then, from the bundle folder:

bash install.sh

The installer:

  1. verifies checksums and refuses to continue quietly if they do not match
  2. loads the five container images with docker load
  3. restores the models into the Ollama volume
  4. on a fresh install, writes .env with ALLOW_ONLINE=false, so the platform cannot be opened to the internet, even by mistake (D-21)
  5. starts the stack sealed, with --no-pull
  6. imports every .gguf file in the bundle's models/ folder. Files added after the bundle was built are not covered by SHA256SUMS; the installer names each one and records its SHA-256 in repo/model-imports.log
  7. runs verify_offline.sh to prove there is no route out

2.3 Create the administrator account#

Open http://localhost:8080 on the target machine. First account becomes admin.

2.4 Check registration is closed#

Signup is closed by default (D-20); add people in Admin Panel > Users. If start_mvp.sh warns that signup is open, set ENABLE_SIGNUP=false in .env and re-run it.

2.5 Serve other people on the site network#

Only after step 2.4. In .env:

HTTP_BIND=0.0.0.0
HTTP_PORT=80
WEBUI_URL=http://ai.internal

Then ./start_mvp.sh.

Note that traffic is unencrypted HTTP. Anyone who can capture packets on that network can read what users asked and what documents came back. TLS is deliberately not built yet: docs/SCOPE.md NB-03.


After installation#

Adding documents#

Users upload their own files in the browser; those stay private to them. To publish a shared library everyone can query, use Workspace > Knowledge in the admin account.

Adding a model later, still offline#

Download a .gguf file on a connected machine and carry it over. Then either:

Adding a model later, with temporary internet#

Only where the site allows the machine to connect, and only with ALLOW_ONLINE=true in .env:

./start_mvp.sh --window        # 30 minutes; --window=45 for 45

While it is open, an admin uses Admin Panel > Settings > Models > Manage > Pull a model from Ollama.com. The platform re-seals itself when the time is up or on Ctrl+C. During the window verify_offline.sh reports NOT SEALED. Not yet tested end to end (D-21).

See models/README.md for the comparison of all three ways.

Routine operation#

./start_mvp.sh                 start, or apply a config change (safe to re-run)
./stop_mvp.sh                  stop, all data preserved
./scripts/verify_offline.sh    prove the platform is still sealed
./scripts/import_models.sh DIR add .gguf models from a folder, no internet
./start_mvp.sh --window        30-minute download window (if ALLOW_ONLINE=true)
docker compose ps              health
docker compose logs -f         what the services are doing

Backups#

Everything that matters lives in four Docker volumes, plus .env:

What Contents Back it up?
slap_open_webui_data user accounts, chat history, uploaded documents Yes. Irreplaceable
slap_qdrant_storage document embeddings Yes. Rebuilding it means re-uploading every document
slap_nginx_logs access logs Yes, it is small
slap_ollama_models downloaded models No. Rebuild from a bundle or with import_models.sh
.env the generated keys (WEBUI_SECRET_KEY, QDRANT_API_KEY) and site settings Yes, but separately, because it holds secrets

Without the old .env, a restore gets new keys and everyone has to sign in again. Anything Open WebUI encrypted with the old key may be unreadable (not tested).

The backup files hold every account's password hash, every chat and every uploaded document. Store them the way you store the documents themselves.

Back up#

Stop SLAP first. Open WebUI's database and Qdrant both write all the time, and a copy taken while they write may not open.

export MSYS_NO_PATHCONV=1      # Git Bash on Windows only; harmless elsewhere
./stop_mvp.sh

BK=/secure/backup/slap-$(date +%Y%m%d)    # on Windows, e.g. BK=D:/slap-backup/20261201
mkdir -p "$BK"
for v in open_webui_data qdrant_storage nginx_logs; do
  docker run --rm -v slap_$v:/data:ro -v "$BK":/out nginx:1.27.5-alpine \
    tar czf /out/slap_$v.tar.gz -C /data .
done
(cd "$BK" && sha256sum slap_*.tar.gz >SHA256SUMS)

./start_mvp.sh

Use the nginx tag the stack runs (docker-compose.yml): an air-gapped machine has no other. Without MSYS_NO_PATHCONV=1, Git Bash rewrites /data and /out into Windows paths and tar fails.

Restore#

Restore with the same Open WebUI version that made the backup. Open WebUI upgrades its database one way on first start, so a newer version changes the restored copy for good, and an older one may refuse it.

On a new machine, install SLAP first and copy in the old .env. Then:

export MSYS_NO_PATHCONV=1
BK=/secure/backup/slap-20261201
(cd "$BK" && sha256sum -c SHA256SUMS)    # every line must say OK
./stop_mvp.sh
for v in open_webui_data qdrant_storage nginx_logs; do
  docker volume rm slap_$v                 # deletes what is in that volume now
  docker volume create slap_$v
  docker run --rm -v slap_$v:/data -v "$BK":/backup:ro nginx:1.27.5-alpine \
    tar xzf /backup/slap_$v.tar.gz -C /data
done
./start_mvp.sh

To keep the current data, skip docker volume rm and restore into volumes with other names first.

What has been tested#

Tested 2026-12-01 on the Windows test laptop (Docker Desktop 29.6.2, Git Bash), which runs Open WebUI 0.11.3 rather than the pinned v0.12.3:

Not tested: signing in to a restored copy; the restore above run over the live volumes; a restore on a second machine; backing up while SLAP runs; an upgrade followed by a roll-back from backup. No backup is scheduled. This is a manual procedure, and setting up a nightly job is up to the site.


Troubleshooting#

Port 8080 already in use - change HTTP_PORT in .env and re-run.

Chat says no models available - nothing was installed. Run ./start_mvp.sh --online on a connected machine, or import a .gguf.

Responses are extremely slow - you are on CPU. Confirm with docker compose logs ollama. On macOS this is unavoidable under Docker; on Linux or Windows check that the NVIDIA container toolkit is installed.

verify_offline.sh reports NOT SEALED - most often the provisioning network was left attached, for example by a download window whose terminal was closed. Re-run ./start_mvp.sh without --online or --window.

--online or --window says internet access is switched off - ALLOW_ONLINE=false in .env, which an offline install sets on purpose. Add models from removable media instead, or change it to true if the site allows the machine to connect.

Uploading a document does nothing - check docker compose logs open-webui for Qdrant connection errors, and confirm the embedding model is installed with docker compose exec ollama ollama list.

Checksum mismatch on the target - do not continue. Recopy from the build machine. A mismatch means the bundle changed between the two machines, and on an air gap that deserves an explanation rather than a retry.

Source: docs/DEPLOYMENT.md in the CapstoneLocalAI repository (local working copy). Built Dec 3, 2026.