Decision Log
Every architectural choice, why it was made, and what it costs. Sponsor must-have M-5 requires another organization to be able to reproduce and maintain this deployment; that is impossible if the reasoning lives only in the heads of six students.
Format: decision, date, status, alternatives considered, consequences. Decisions are reversible. If one is overturned, mark it SUPERSEDED and add a new entry rather than editing history.
D-01 - Everything runs in Docker, including Ollama#
Date: 2026-09-01 | Status: ACCEPTED | Decided by: Team SLAP
The full stack, Ollama included, runs as containers. Target is dedicated server hardware on a site LAN; Windows and macOS machines are for development.
Alternatives considered:
- Host-native Ollama with containers reaching it via host.docker.internal. This is the standard advice on Apple Silicon because Docker cannot use the Apple GPU. Rejected: it makes the deployment different on every operating system, which directly undermines M-5 (reproducibility) and the sponsor goal of the simplest possible deployment for a non-expert implementer.
Consequences:
- One
docker compose upproduces an identical stack everywhere. Good. - On a MacBook the model runs CPU-only and is slow. Accepted cost: the Mac is a development machine, not the deployment target.
- Model storage lives in a named Docker volume, so
docker compose downdoes not discard a multi-gigabyte download.
D-02 - GPU support is an optional overlay, auto-detected#
Date: 2026-09-01 | Status: ACCEPTED
docker-compose.yml is CPU-only and runs anywhere. docker-compose.gpu.yml
adds NVIDIA device reservation. start_mvp.sh probes nvidia-smi and applies
the overlay automatically.
Consequences:
- The same repository serves a GPU server and a laptop with no edits.
- macOS cannot use GPU acceleration under Docker at all. This is an Apple hypervisor limitation, not a configuration problem, and it must be stated plainly in any hardware recommendation we publish.
- CPU-versus-GPU becomes a row in the benchmark matrix rather than a caveat.
D-03 - Private-by-default user workspaces, plus admin-published shared libraries#
Date: 2026-09-01 | Status: ACCEPTED
Each user has their own chats and their own uploaded documents, like any normal chatbot. No user can see the content of another user. An administrator can additionally publish shared Knowledge collections that all users may query.
Alternatives considered:
- Admin-curated corpus only, no user upload. Stronger need-to-know posture but a much weaker demonstration and more restrictive than the sponsor asked for.
- Fully open shared upload. Rejected: no need-to-know boundary, no revocation.
Consequences:
- Zero custom code; this is native Open WebUI behaviour.
- Gives a concrete answer for the role-based access deliverable without building an access-control system yet.
DEFAULT_USER_ROLE=pendingmeans an administrator approves every account.- Not yet true RBAC: we cannot grant a specific role access to a specific collection. Recorded as a partial against S-5.
D-04 - Model selection and origin policy#
Date: 2026-09-01 | Status: ACCEPTED | Amended 2026-09-03
MVP ships llama3.2:3b for chat and nomic-embed-text for embeddings. An
administrator can add other models from the Open WebUI interface without
touching a command line.
Correction, 2026-10-19: the sentence above was not true while sealed. The UI's "pull from Ollama.com" needs internet, which Ollama never has (D-11), and its GGUF upload was blocked by the nginx body limit. Browser upload is made to work by D-13, on Open WebUI v0.12.0 or later.
Amendment, 2026-09-03. The original default was llama3:8b. Changed after
testing on real hardware for two reasons found by actually running it:
llama3:8bdoes not support tool calling. Open WebUI surfaces this asregistry.ollama.ai/library/llama3:8b does not support tools, which is a confusing error for a non-technical user who did nothing wrong.- At 4.7 GB it is slow on a machine without a GPU, which is the exact profile of the resource-constrained organizations the sponsor described.
llama3.2:3b is 2 GB, supports tools, and remains US-origin. Both models are
kept installed so the pair becomes the first two rows of the benchmark matrix
(S-7): same platform, same documents, two model sizes, measurable difference.
This is the first decision in this project driven by measurement rather than reasoning, which is the mode the benchmarking phase should run in.
Rationale: the sponsors expressed hesitation toward models of PRC origin (DeepSeek, Qwen), with somewhat less concern where the deployment is a closed loop. Both defaults are permissively licensed and avoid that question entirely for the MVP. This is a default, not a restriction: the platform is model-agnostic, which is the point.
Consequences:
- Roughly 5 GB of download on first start.
- Model-origin risk becomes an evaluation criterion for the benchmark matrix, alongside performance and hardware cost.
- Domain-specific models such as Nuclearn SPARK-mini remain a stretch goal.
D-05 - Three-network segmentation with a sealed vector store#
Date: 2026-09-01 | Status: SUPERSEDED BY D-11
ai_dataisinternal: true. Qdrant, which holds every ingested document in embedded form, has no route off the host and cannot phone home.ai_inferhas egress solely so Ollama can download models.ai_edgecarries the published port and must remain non-internal.
Consequences:
- The most sensitive component is the most isolated one, and it is enforced by Docker rather than by policy.
- Full offline operation is a one-line change: set
internal: trueonai_inferonce the required models are pulled. That single flip is the cheapest possible demonstration of sponsor must-have M-2. - Adding a model later requires temporarily restoring egress. That procedure needs to be written down before anyone claims air-gap support.
D-06 - Bind to loopback by default, LAN only after signup is closed#
Date: 2026-09-01 | Status: ACCEPTED
Shipped default is HTTP_BIND=127.0.0.1. Serving the LAN requires an explicit
change to 0.0.0.0.
Rationale: first boot necessarily has open registration so that an admin
account can be created, and the first account created becomes administrator.
Shipping a default that exposes that window to an entire hospital or plant
network would be a genuine vulnerability introduced by our own deployment
procedure, which is exactly what M-6 warns against. start_mvp.sh prints a
warning if it detects LAN binding with signup still open.
Consequences:
- One extra deliberate step for the server operator, in the correct order.
- The ordering constraint is documented rather than assumed.
D-07 - Image tags are configurable, and must be pinned before production#
Date: 2026-09-01 | Status: SUPERSEDED BY D-18
Tags come from .env. Development defaults are latest and main.
Consequences:
- Convenient now, unacceptable for a real deployment:
latestmeans two installs a week apart are different systems, which breaks reproducibility. - Before any deployment the tags must be pinned to exact versions, ideally by digest. Tracked as an open item in SCOPE.md NB-04.
D-08 - Use Open WebUI native RAG; no custom ingestion service#
Date: 2026-09-01 | Status: ACCEPTED
Chunking, embedding and retrieval are handled by Open WebUI writing to Qdrant. No custom Python service.
Rationale: the sponsor was explicit that the deliverable is not the model and not novel machine learning, but the architecture, processes and controls that let an organization deploy and trust it. A custom ingestion service is more code to secure, document and maintain, for uncertain benefit.
Consequences:
- Chunking is generic. Engineering PDFs with tables and drawings may retrieve poorly. We do not yet know how poorly, because we have no evaluation method.
- Revisit only if measurement shows native chunking is the bottleneck. That measurement depends on S-4, which does not exist yet.
D-09 - HTTP for the MVP, TLS structured in but disabled#
Date: 2026-09-01 | Status: ACCEPTED
The TLS server block is written and commented in nginx/nginx.conf.
Rationale: on a loopback-bound development machine TLS adds nothing. On a LAN server it matters, but a site with no internet route cannot use public ACME certificate authorities, so it needs an internal CA plus distribution of that CA to client machines. That distribution procedure is real work and belongs with the security phase of the sponsor timeline, in November.
Consequences:
- Traffic on the LAN is currently readable by anyone who can capture it. Acceptable for a laptop demo, not for a pilot with real documents.
- Logged as a known gap (SCOPE.md NB-03), not an oversight.
D-10 - Decisions and non-goals are tracked in the repository#
Date: 2026-09-01 | Status: ACCEPTED
This file, SCOPE.md and REQUIREMENTS.md are treated as deliverables of
equal standing with the code, because M-5 and M-6 are documentation
requirements. AI_USAGE.md exists because the sponsor asked the team to
report how AI was used on the project. TEAM_DECISIONS.md records which
decisions a human made and what they overrode, which is the honest half of
that AI-usage answer.
D-11 - Sealed by default; network access is opt-in and temporary#
Date: 2026-09-01 | Status: ACCEPTED | Supersedes D-05 Decided by: project lead (see TEAM_DECISIONS.md T-07)
The platform now has no route to the internet by default. Opening one
requires explicitly running ./start_mvp.sh --online, which layers
docker-compose.provision.yml, downloads models, and then removes the network
again in the same run.
Topology:
| Network | Internal | Members | Why |
|---|---|---|---|
ai_public |
no | nginx only | carries the published port |
ai_ui |
yes | nginx, open-webui | |
ai_data |
yes | open-webui, qdrant | |
ai_infer |
yes | open-webui, ollama |
Ollama, Qdrant and Open WebUI therefore have no path to the internet at any time, including during normal operation.
This design was settled empirically rather than from documentation. We tested
whether a published port works on an internal: true network: it does not,
the port is unreachable from the host. We also confirmed that containers on an
internal network genuinely cannot reach an external IP address. That is why
nginx keeps one routable network and everything else is sealed behind it.
Alternatives considered:
- Sealing every network including nginx. Rejected: the published port stops working, so the platform cannot serve anyone.
- Leaving
ai_inferroutable and relying on operator discipline to keep the host offline. Rejected: it makes the security property a matter of policy rather than something Docker enforces.
Consequences:
- The strongest claim the project can make about M-2 is now enforced by the container runtime rather than asserted in documentation.
- nginx retains egress. It is a passive reverse proxy that never initiates outbound connections, but the capability exists. This is the one residual path and it is recorded here rather than glossed over. Removing it would require host-level firewall rules, which is a different control and belongs with NB-06.
- Adding a model on a connected machine now takes a deliberate flag. That friction is intentional.
scripts/verify_offline.shtests the claim by attempting real outbound connections from inside each network, rather than reading the compose file and trusting it.
D-12 - Offline bundle on removable media#
Date: 2026-09-01 | Status: ACCEPTED Decided by: project lead (see TEAM_DECISIONS.md T-07)
scripts/build_bundle.sh runs on a connected machine and produces a directory
containing the container images (docker save), the downloaded models (the
exported Ollama volume), the repository itself, a manifest of exact image
digests, and SHA256 checksums. That directory is copied to a flash drive.
scripts/install_offline.sh consumes it on a machine that has never had
internet access.
This addresses sponsor stretch goal S-1 and super-stretch S-1b.
Alternatives considered:
- Shipping only
.gguffiles and building models on the target. Kept as a secondary path (scripts/import_models.sh) for adding models later, but not the primary one: it does not solve the container images, which are the larger problem. - A single compressed archive instead of a directory. Rejected: a 10 GB archive that fails a checksum has to be recopied entirely, and a directory lets you verify and recopy individual pieces.
Consequences:
- The bundle is roughly 10 GB and takes a while to build. Unavoidable.
- Docker itself is not in the bundle and must already be installed on the target. This is the largest remaining gap in the air-gap story and is recorded in SCOPE.md NB-02.
- Integrity is verified with checksums, not signatures. A checksum detects corruption in transit; it does not prove who built the bundle. For a platform intended to run unattended for years in a protected environment, signing is the stronger control and is not built.
MANIFEST.txtrecords exact image digests, which is the evidence of what was actually installed. This partially answers D-07 and NB-04: even with floating tags, the bundle records precisely what shipped.
D-13 - Admins add models through the browser; nginx lifts the body limit on that one path#
Date: 2026-10-19 | Status: ACCEPTED (pending team review)
An administrator adds a model with Admin Panel > Settings > Models >
Manage > Upload a GGUF model. The file travels browser -> nginx ->
Open WebUI -> Ollama, over the internal networks only, so the platform stays
sealed. nginx/nginx.conf gives the path /ollama/models/upload a 10 GB body
limit; every other path keeps 512 MB.
Why: after hand-over, the receiving organization adds models for years with no one to ask. A browser page is the route its admin can use without a terminal. D-04 already promised this; until now it did not work.
What was tested on 2026-10-19 (Open WebUI 0.11.3, Ollama 0.33.3), with an
808 MB Llama-3.2-1B-Instruct-Q4_K_M.gguf whose SHA-256 matched the publisher's:
- Before: nginx refused the upload with 413 (
client intended to send too large body: 807694701 bytes). - After: the upload reached Ollama. A normal document upload of the same size
is still refused with 413 in under 1 ms, and
verify_offline.shstill reports SEALED. - The model was not created. Open WebUI 0.11.x returns success without reading Ollama's streamed reply, so Ollama abandons the create. This is an upstream bug, reported as open-webui#31861 and fixed by PR #31862, first released in v0.12.0. Sending the same request and reading the reply to the end created a working model, which confirms the cause.
Alternatives considered:
- Raise the global limit. Rejected: it would give every upload path, including ones any user can reach, a 10 GB limit.
- Patch Open WebUI ourselves. Rejected: nobody would maintain the patch after hand-over. Upgrading to a fixed release is the right route.
- Keep
scripts/import_models.shas the only way. Kept as the fallback and for very large models, but it needs a terminal.
Consequences:
- The browser upload only works on Open WebUI v0.12.0 or later. On 0.11.x the page reports success and no model appears. Upgrading is a separate change.
- 10 GB covers a Q4 model up to about 14B, already beyond what the CPU-only
target hardware can run. A GPU site can raise it in
nginx.conf. - Disk: while uploading, the file briefly exists about three times (a temp
file inside Open WebUI, its upload folder, Ollama's store). A 2 GB model
needs about 6 GB free during upload.
import_models.shpeaks at 2x. - In our test, Ollama kept two copies afterwards: the uploaded file and the copy its create step made, which is the one the model uses. Restarting Ollama (0.33.3) did not remove the original, so the model costs about twice its size on disk for good. Not yet re-tested on Open WebUI v0.12.x, where the create completes normally.
- Open WebUI reads the whole upload before it checks who is sending it.
Tested: a request with no login was refused (401) only after all 808 MB had
arrived. Anyone who can reach the page can therefore make the server take in
up to 10 GB per request before refusal. The same was already true at 512 MB on
every path. Candidate fix: an nginx
auth_requestcheck before the body is read. Not built. - The feature is marked experimental upstream, and the image tag is not pinned (D-07), so a future Open WebUI could change or remove it.
- Model provenance is still unchecked (NB-02). This makes adding a model easier, not safer: the admin is trusting whoever published the file.
D-14 - Apache Tika for document text extraction, with OCR#
Date: 2026-10-19 | Status: ACCEPTED
A fifth container, apache/tika:3.3.1.0-full, extracts text for Open WebUI.
The -full image bundles Tesseract, so pages that are images (scans, photographed
slides) become searchable with no runtime downloads. It sits on ai_data only,
read-only root filesystem, Java heap capped at 1 GB.
Measured on a 15-page lecture PDF with 3 image-only pages: built-in parser 3,589 characters, Tika 7,541, including the scanned text; 5.8 s on CPU; about 500 MB RAM.
Alternatives: Docling (better tables, but a multi-GB image that may fetch models at runtime, risky while sealed); Open WebUI's own image OCR (its library is not installed in the image, and installing it needs internet).
Consequences: +344 MB image, about +0.5 GB RAM, slower uploads for scanned PDFs. New installs use Tika automatically; an existing install must switch it once in Admin > Settings > Documents, because Open WebUI keeps its own copy of that setting. Documents uploaded before the switch keep their old text until re-uploaded.
D-15 - Ship gemma3:4b as an optional image-reading model; legacy function calling#
Date: 2026-10-19 | Status: ACCEPTED
EXTRA_MODELS (default gemma3:4b) lists optional models that
start_mvp.sh --online and build_bundle.sh download next to the default,
so every install and every offline bundle includes them. Gemma 3 4B reads
images (screenshots, photos) as well as text; US origin (Google), so D-4's
origin concern does not apply. ~3.4 GB.
llama3.2:3b stays the default: Gemma reports completion, vision but no
tool calling. With Open WebUI's default (native) function calling, it
attaches built-in tools to every request, and Gemma refused with
does not support tools. DEFAULT_MODEL_PARAMS={"function_calling":"legacy"}
makes Open WebUI inject retrieved documents into the prompt instead, which
any model handles.
Tested 2026-10-19 on macOS (CPU): Gemma correctly read the title and merged
status from a screenshot of a GitHub page (~1 min). llama3.2:3b still
answered a question from an uploaded PDF correctly, with its source.
Consequences: +3.4 GB per install and bundle (set EXTRA_MODELS= empty to
skip). Only one model stays loaded (OLLAMA_MAX_LOADED_MODELS=1), so switching
models costs a reload. Built-in tool features (memory, notes as tools) are
off by default. Existing installs must set Function Calling to Legacy once in
the admin panel (D-13's persistent-config caveat, issue #10).
Also: the launchers' fallback chat model is now llama3.2:3b (was
llama3:8b, contradicting D-04), and model presence is checked by exact
name, so gemma3:12b no longer counts as gemma3:4b.
D-16 - Every approved user can use every enabled model#
Date: 2026-10-19 | Status: ACCEPTED
BYPASS_MODEL_ACCESS_CONTROL=true. Open WebUI shows a model only to admins
until someone gives it a database entry with access rules, and models pulled
through Ollama never get one. Tested with a non-admin account: it saw zero
models and every chat was refused. SLAP was usable by the admin alone.
With the setting, the same account sees every enabled model and can chat. Its view of other users' files, chats and Knowledge is unchanged (empty lists, 404/401 on direct access), because document access is a separate control that stays on (D-03). Model control stays with admins: only they can upload models (D-13) or switch one off in Admin > Settings > Models, which hides it and refuses direct requests for it.
Read from the environment at every start, so it also fixes existing installs.
Alternative: mark each model Public by hand. Rejected: a manual step per model and per install, repeated after every new model, which a site with no one to ask will miss. Per-group model restriction (S-5) would need it; not built.
Admin notes: switch off nomic-embed-text so users don't pick it (tested:
document search keeps working). Open WebUI quirk: the first time a model is
switched off, switching it back on without reloading the page silently
fails; reload first.
D-17 - nginx checks for an admin before accepting a model upload; config edits apply on re-run#
Date: 2026-10-19 | Status: ACCEPTED | Amends D-13
/ollama/models/upload now uses nginx auth_request against Open WebUI's
admin-only /ollama/config. Tested: a request with no login or from a
regular user is refused with 401 in ~4 ms with 0 bytes of an 808 MB upload
sent (before: 401 only after all 808 MB had arrived). An admin passes.
nginx now mounts the nginx/ directory and starts with
-c /etc/nginx/slap/nginx.conf; start_mvp.sh tests and reloads the config
on every run and refuses a broken one. Before, a single-file mount kept the
old file after an editor replaced it, so edits silently never applied.
Tested by editing the file and re-running start_mvp.sh.
D-18 - Pin every image to the tested version; Open WebUI 0.11.3 -> v0.12.3#
Date: 2026-10-19 | Status: ACCEPTED | Answers NB-04 question 1 (tag, not digest)
| Image | Pinned | Was |
|---|---|---|
| ollama/ollama | 0.33.3 | latest |
| ghcr.io/open-webui/open-webui | v0.12.3 | main (0.11.3 on the test machine) |
| qdrant/qdrant | v1.19.1 | latest |
| nginx | 1.27.5-alpine | 1.27-alpine |
| apache/tika | 3.3.1.0-full | (already pinned) |
Versions live only in docker-compose.yml, under new names
(OPEN_WEBUI_VERSION etc.), so an old .env that still says
OPEN_WEBUI_TAG=main can no longer override them. build_bundle.sh reads
its image list from the same file (docker compose config --images), and
verify_offline.sh probes with whatever nginx image is running. Tags, not
digests: readable, and the bundle's MANIFEST already records exact digests.
Upgrade tested on the macOS dev machine (after copying the data volumes by hand, since Open WebUI migrates its database one way): chats, users, files and settings all kept; a regular user's existing login kept working; Tika + document Q&A, Gemma reading a screenshot, and the offline check all pass. The admin browser upload of an 808 MB GGUF now creates a working model (the upstream bug blocking D-13 is fixed in 0.12). Still true on 0.12.3: Ollama keeps two copies of an uploaded model, and the model toggle quirk from D-16 (reload before switching a model back on).
D-19 - OCR images inside PDFs; search with the user's own words#
Date: 2026-10-19 | Status: ACCEPTED | Fixes issue #18
Two causes of retrieval misses found by testing an 8-question set against a 15-page lecture PDF (scanned pages, charts) on Open WebUI v0.12.3:
- Chart text was never extracted. Tika OCRs only pages with no text, so
numbers inside a chart on a text page (13.7%, 86.3%) were missing.
PDF_EXTRACT_IMAGES=truemakes Tika OCR embedded images too: 7,499 -> 12,213 characters, chart numbers present; retrieval found the right passage for 8/8 questions (was 6/8). Extraction took ~12 s instead of ~6 s. - Chat searched with a rewrite, not the question. By default the model
first rewrites the question into search queries; llama3.2:3b dropped
"toothpaste", so the right passage was never retrieved.
ENABLE_RETRIEVAL_QUERY_GENERATION=falsesearches with the question as typed. Toothpaste, table tennis, 36 men, 13.7%, the PSU survey and the four food-security levels were then all answered correctly in chat.
Hybrid search (BM25 + vector) was tested and did not help: with no reranking model (and downloading one is not possible sealed) its final ranking falls back to vector similarity, 6/8 like plain vector search.
Consequences: slower uploads for PDFs with many images; logos and photos may add some OCR noise. Vague follow-up questions ("and in 2021?") are searched as typed, so they retrieve less well than a self-contained question. Both settings apply at first boot only; existing installs: Admin > Settings > Documents > PDF Extract Images (OCR) on, and Admin > Settings > Interface > Retrieval Query Generation off; then re-upload documents. One document is a small test set: a larger, labelled one is still needed (NB-05, S-4).
D-20 - Settings come from the repo on every start; signup closed by default#
Date: 2026-10-20 | Status: ACCEPTED | Fixes issue #10
ENABLE_PERSISTENT_CONFIG=false. Open WebUI otherwise copies its settings
into its database on first boot and ignores docker-compose.yml and .env
afterwards, so every setting changed since then (Tika, image OCR, legacy
function calling, search with the user's words) had to be clicked by hand on
each existing install, and an upgrade could not carry settings.
Tested on an install set back to the old values: after a plain
./start_mvp.sh, all four took the repo's values with no clicks. Users and
roles, chats, files, a Knowledge collection, model on/off switches and the
regular user's existing login all survived. A Tika + OCR upload and a
retrieval question worked end to end.
What changes for admins: Admin Panel settings pages now apply until the
next restart, then revert to the repo's values (tested: top-K 5 -> 7 ->
restart -> 5). Change settings in docker-compose.yml or .env instead.
Everything admins do in the app is data and persists: users and approvals,
documents, Knowledge, model on/off switches (tested across a restart).
Signup: Open WebUI used to close signup by writing to its own settings after
the first account, which this setting now ignores. ENABLE_SIGNUP in .env
is therefore the one real switch, and now defaults to false. Tested on a
fresh, empty instance: with signup off the first account is still allowed
and becomes admin (Open WebUI never gates the first admin), and a second
signup is refused (403). start_mvp.sh warns on every run while signup is
open. An existing install whose .env still says ENABLE_SIGNUP=true will
have signup open (new accounts wait as pending) until it is set to false.
D-21 - Two ways to add models: a models folder on the drive, or an optional timed download window#
Date: 2026-10-20 | Status: ACCEPTED (pending team review) | Amends D-11, D-12
Starting assumption: the target machine has no internet, not even for setup. Adding models should still be as simple as possible.
- Models folder (the default). The bundle's
models/folder holds every model: the exported Ollama archive, plus any.gguffiles.build_bundle.shcopies.gguffiles from the build machine's./modelsinto it, soSHA256SUMScovers them. More can be dropped in on the drive later.bash install.sh, now written at the top of the bundle, runs the installer, which imports them withimport_models.sh <folder>. That script now accepts any folder. It copies each file into./models(the only folder Ollama can see), imports it, deletes the copy, and records the file's SHA-256 inmodel-imports.log. - Download window (optional).
./start_mvp.sh --window(30 minutes;--window=Nfor 1 to 240) starts the whole platform with the provisioning network on Ollama only, so an admin can use Admin Panel > Settings > Models > Manage > Pull a model from Ollama.com. The window ends on its timer, on Ctrl+C, or on a kill or hang-up, then re-seals exactly as--onlinedoes. Any later./start_mvp.shor./stop_mvp.shremoves a provisioning network left behind by a run that was cut off. ALLOW_ONLINEin.env.falsemakes--onlineand--windowrefuse to run. Unset meanstrue, so older.envfiles keep working. A fresh offline install writesfalse. A connected install keepstrue, so the README quick start still works.build_bundle.shignores it: it only runs on the build machine.
A site's own .gguf files add to the default models; they never replace
them. The bundle always carries CHAT_MODEL and EMBED_MODEL. File names
cannot contain :, so an imported file can never match a name like
llama3.2:3b, and replacing the embedding model would change document
search.
Alternatives considered:
- A button in the admin panel that opens the network. Rejected: a stolen admin password could then open the platform to the internet. Keeping the switch at the server's own terminal ties it to access to the machine.
- A window with no time limit, closed by hand. Rejected: forgetting to close it is the most likely failure.
- Mounting the USB folder straight into Ollama instead of copying. Rejected: the mount is fixed in the compose file, and changing it means recreating Ollama for every import, with a path that differs on every machine.
- Letting a site's own files replace the defaults. Rejected for the naming and document search reasons above.
Tested 2026-10-20 on the Windows development machine (Git Bash). The running
stack was on older, unpinned images (ollama:latest, Open WebUI main):
bash -n, ShellCheck and shfmt pass on every script.--windowrefuses 0, 241 and non-numbers. WithALLOW_ONLINE=false, both flags refuse before any container is touched.import_models.sh <folder>, given a relative path, importednomic-embed-text-v1.5.Q4_K_M.gguf(84 MB, SHA-256 matching the publisher's), refused a file name containing a space, deleted its copy and logged the checksum. A second run skipped it. The imported file returned 768-number embeddings, like the officialnomic-embed-text, so an embedding model can arrive as a.gguf. Not tested through a document upload.- The generated
install.shpasses the right bundle path from any working directory, and a fresh.envgetsALLOW_ONLINE=false.
Tested 2026-10-29 on a Linux PC (Ryzen 7600X, no GPU, pinned images), during the public demo setup (T-14):
./start_mvp.sh --online --window=120pulled the default models, opened the window and started the countdown.verify_offline.shreported NOT SEALED while it was open.- Two more models (
gpt-oss:20b,granite4:tiny-h) were pulled during the window withollama pullinside the container, not from the admin panel. - Sending the launcher SIGTERM closed the window early. It removed the
provisioning network and restarted sealed, and
verify_offline.shthen passed all checks.
Not yet tested:
- A pull from the admin panel during the window, and whether
OFFLINE_MODE=1in Open WebUI hides or blocks the admin panel's pull box. - Ctrl+C from an interactive terminal. SIGTERM goes through the same trap, but that is not the same as trying it.
- Letting the timer run out rather than closing early.
- A full
build_bundle.shtoinstall.shrun on a second machine (TODO item 5). - What happens to the window when the terminal is closed on Windows.
Consequences:
- D-11's "no route to the internet at any time" now holds unless an operator
opens a window. During one, the whole platform runs and users can use it
while Ollama has internet.
verify_offline.shreports NOT SEALED for the whole window. - Model provenance is unchanged (NB-02). Both routes make adding a model easier, not safer. The SHA-256 log is a record, not a check: comparing it with the publisher's checksum is a manual step.
- Files added to the drive after the build are not in
SHA256SUMS. The installer names each one. - The timer runs in the terminal session. A window cut off by a dropped
connection stays open until the next
./start_mvp.shor./stop_mvp.sh. - Fixed in passing: the offline installer's last line printed
${HTTP_PORT:-8080}literally instead of the port.
Source: docs/DECISIONS.md in the CapstoneLocalAI repository (local working copy). Built Dec 3, 2026.