π€ Bunker Bot β Offline AI Setup
Bunker Bot (Offline Survival AI) runs entirely on your local machine using Ollama β no internet, no API keys, no data leaving your device. This guide walks you through setup on any operating system.
A computer (macOS, Windows, or Linux), at least 8GB RAM (16GB recommended for larger models), and disk space for the model (4β40GB depending on model choice). Initial setup requires internet. After that, Bunker Bot works completely offline.
Prefer zero setup? A llamafile is a single file that is the AI model and the server β no Ollama, no install. Download one (e.g. Llama-3.2-3B, ~2.3 GB), make it executable, and run it:
chmod +x your-model.llamafile
./your-model.llamafile --server --nobrowser
Then open Bunker Bot, pick the π¦ Llamafile mode (gear β Mode), and it connects to localhost:8080 automatically. The Ollama guide below is the alternative if you want a model manager. Get a llamafile from the Download page or Mozilla's llamafile project.
1. Install Ollama
Ollama is a free, open-source tool for running large language models locally. One installer, works on all platforms.
macOS (Apple Silicon & Intel)
- Download the macOS installer from ollama.com/download β look for the macOS package (
Ollama-darwin.zip). - Unzip the downloaded file. Move
Ollama.appto your/Applicationsfolder. - Double-click
Ollama.appto launch it. A llama icon appears in your menu bar β this means it's running. - Open Terminal (Spotlight Search β "Terminal") and verify the installation:
ollama --version
You should see a version number like ollama version 0.x.x.
Ollama natively uses Apple Silicon's Neural Engine and unified memory for dramatically faster inference than CPU-only. A 7B model runs comfortably on a base M1 MacBook Air with 8GB unified memory.
2. Pull a Model
After Ollama is installed, download a language model. This requires internet and can take several minutes depending on model size and your connection speed.
# Recommended default β good balance of speed and capability
ollama pull llama3
# Or a specific size variant:
ollama pull llama3:8b # 4.7GB β faster, less capable
ollama pull llama3:70b # 40GB β slower, much more capable
# Alternative models:
ollama pull gemma3 # Google's Gemma 3
ollama pull phi3 # Microsoft's Phi-3 Mini β excellent for low-RAM systems
ollama pull mistral # Mistral 7B β very fast and capable
After downloading, test the model:
ollama run llama3
# Type: "What are the top 5 priorities in a survival situation?"
# Type /bye to exit
List all installed models:
ollama list
3. Run Ollama as a Local Server
Bunker Bot connects to Ollama's REST API on localhost:11434. On macOS and Windows, the Ollama app runs the server automatically when it's in the menu bar / system tray. On Linux, the systemd service handles this.
Manual Server Start
# Start the server manually (if not auto-starting):
ollama serve
# Verify the server is running (test in a browser or curl):
curl http://localhost:11434/api/tags
You should see a JSON response listing your installed models.
CORS Configuration (Required for Browser Access)
By default, Ollama only accepts connections from localhost β which is what we want for security. The Bunker Bot chat panel in this guide sends requests to http://localhost:11434. If you see connection errors, verify Ollama is running and the port is not blocked by a firewall.
Some browsers block fetch() calls from a local file (file:///) to localhost. If Bunker Bot shows a connection error despite Ollama running, try: opening the guide via a local HTTP server (python3 -m http.server 8080 in the guide folder, then open http://localhost:8080). Or use Firefox, which has more permissive localhost policies.
4. Portable USB/SSD Setup
Store Ollama + models on a portable drive so you can run Bunker Bot on any compatible computer without downloading anything.
What You Need
- USB-C SSD (portable, fast β USB-A will work but be slower): minimum 64GB for one model, 500GB+ for several
- The Ollama installer for your target platform
- The downloaded models
macOS Setup
- Copy
Ollama.appto the USB drive. - Move the models to a folder on the USB drive. Ollama stores models in
~/.ollama/models/by default. - Set the
OLLAMA_MODELSenvironment variable to point to the USB drive location before launching:OLLAMA_MODELS=/Volumes/MyUSB/ollama-models /Volumes/MyUSB/Ollama.app/Contents/MacOS/ollama serve - Create a shell script on the USB drive (
start-aria.sh) that sets this variable and launches Ollama automatically.
Windows Setup
- Copy the Ollama installer to the USB drive.
- After installing on the target computer, move the models folder to USB:
- Create a batch file (
start-aria.bat) on the USB:@echo off set OLLAMA_MODELS=E:\OllamaModels start "" "C:\Users\%USERNAME%\AppData\Local\Programs\Ollama\ollama.exe" serve
# Move model directory to USB drive
robocopy %USERPROFILE%\.ollama\models E:\OllamaModels /E /MOVE
# Set environment variable and restart Ollama
setx OLLAMA_MODELS "E:\OllamaModels"
Linux Setup
- Mount your USB drive and create a models directory on it.
- Copy models:
cp -r ~/.ollama/models /mnt/myusb/ollama-models - Launch Ollama pointing to USB models:
OLLAMA_MODELS=/mnt/myusb/ollama-models ollama serve &
USB-A 3.0 drives have 50β80 MB/s read speed β adequate but slow for large model files. A USB-C NVMe SSD enclosure (500+ MB/s) makes a significant difference in load times for large models. For field use, a 1TB Samsung T7 Shield or similar ruggedized portable SSD is recommended.
5. Model Selection by Hardware
| Hardware Tier | RAM | Recommended Model | Size | Quality |
|---|---|---|---|---|
| Low (laptop, Raspberry Pi 5) | 4β8GB | phi3:mini | 2.3GB | Good for simple Q&A |
| Low | 4β8GB | gemma:2b | 1.4GB | Minimal, fast |
| Mid (modern laptop, Apple M1/M2) | 8β16GB | llama3:8b | 4.7GB | Very good β default recommendation |
| Mid | 8β16GB | phi3:medium | 7.9GB | Excellent for its size |
| Mid | 16GB | mistral:7b | 4.1GB | Fast and capable |
| High (workstation, gaming PC with GPU) | 24GB+ | llama3:70b | 40GB | Excellent β near GPT-4 quality |
| High | 32GB+ | mixtral:8x7b | 26GB | Very capable, mixture of experts |
| High (M2/M3 Ultra Mac) | 64GB+ | llama3:70b (quantized) | 40GB | Best available offline model |
Models come in different quantization levels (Q4, Q5, Q8, F16). Lower quantization = smaller file, faster speed, slightly lower quality. For survival use cases, Q4 or Q5 quantization is entirely adequate β the quality difference is negligible for practical questions. Ollama defaults to the optimal quantization for your hardware.
6. Fully Airgapped Operation
After initial setup (downloading Ollama and your model), Bunker Bot works with zero internet connectivity.
Setup Checklist for Airgapped Use
- Ollama installed on target machine (or on USB drive)
- Model downloaded and stored locally or on USB
- This survival guide folder (all files) stored locally or on USB
- Test: disconnect from internet β open guide β launch Bunker Bot β ask a question β verify response
- Test on a secondary machine using only the USB drive (no internet on that machine)
What Works Without Internet
- All 8 sections of this guide β complete and fully functional
- Client-side search β searches all content locally
- Print-to-PDF on any section
- Bunker Bot AI assistant (if Ollama is running locally)
- All SVG diagrams, star charts, and compass rose
Starting Ollama at Boot (No GUI Needed)
# Linux/macOS β add to crontab or startup script:
@reboot OLLAMA_MODELS=/path/to/models ollama serve &
# macOS LaunchAgent β create plist in ~/Library/LaunchAgents/
# Windows β set Ollama to start automatically via Task Scheduler
7. Test Bunker Bot in This Guide
Once Ollama is running with a model pulled, click the π€ Bunker Bot button in the top right corner of any page to open the chat panel. The status indicator will show:
- β Checking β connecting to Ollama
- β Online β Ollama running, model ready
- β Offline β Ollama not reachable
Try asking Bunker Bot:
- "What's the fastest way to purify water without equipment?"
- "I have a deep cut that won't stop bleeding. What do I do?"
- "How do I size a solar system for basic lighting and phone charging?"
- "What are the signs of a failing appendix?"
Bunker Bot is a survival-focused AI assistant β it's prompted to only answer questions related to preparedness, medical, food/water, energy, shelter, navigation, security, and community resilience. It will decline off-topic requests. All responses are generated by a local AI model and may contain errors β always cross-reference critical medical and technical information with the guide's written content and other reliable sources.