A terminal-based control panel for managing Ollama (local AI models) and Open WebUI (a ChatGPT-like web interface that runs locally). Written in Bash, no installation needed beyond the dependencies.
Developed and tested on a Raspberry Pi 5 (16 GB RAM). Works on any Linux system, but the model recommendations and default paths in this README are tuned for that hardware.
██████╗ ██████╗ ██╗ ██████╗██╗ ██╗ █████╗ ██╗ ██████╗██╗ ██╗███╗ ███╗
██╔═══██╗██╔══██╗██║██╔════╝██║ ██║██╔══██╗██║ ██╔════╝██║ ██║████╗ ████║
██║ ██║██████╔╝██║██║ ███████║███████║██║ ██║ ██║ ██║██╔████╔██║
██║ ██║██╔══██╗██║██║ ██╔══██║██╔══██║██║ ██║ ██║ ██║██║╚██╔╝██║
╚██████╔╝██║ ██║██║╚██████╗██║ ██║██║ ██║███████╗╚██████╗╚██████╔╝██║ ╚═╝ ██║
╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝
- What does this do?
- Recommended hardware
- Requirements
- Installation
- Running the script
- Main Menu
- Managing Docker Containers
- Managing Ollama Models
- How to change or add AI models
- Fixing connection issues
- Networking explained
- Customizing paths
- Troubleshooting
- Contributors
- License
Running AI models locally means juggling two separate services:
- Ollama — the engine that downloads and runs AI models on your machine
- Open WebUI — a browser-based chat interface (think local ChatGPT) that talks to Ollama via Docker
Getting these two to talk to each other can be frustrating, especially when Ollama binds to localhost only and Docker can't reach it. NEA handles all of that automatically — it starts Ollama with the right network settings, launches Open WebUI pointed at the correct address, and gives you a simple menu to manage everything.
This script was built and runs daily on a Raspberry Pi 5 (16 GB RAM). That's enough headroom to run medium-sized models comfortably while Open WebUI and the OS run alongside them.
| RAM | What you can run |
|---|---|
| 4 GB | Small models only — llama3.2:3b, gemma2:2b, phi3:mini |
| 8 GB | Mid-range models — llama3.2:latest, mistral:latest, qwen2.5:7b |
| 16 GB | Comfortable headroom for 7B–14B models — qwen2.5:14b, llama3.1:8b, deepseek-r1:7b |
| 32 GB+ | Large models — llama3.1:70b (quantized), qwen2.5:32b |
Pi 5 16 GB sweet spot models:
qwen2.5:14b— best quality you can run without hitting swapllama3.1:8b— fast responses, great all-rounderdeepseek-r1:7b— excellent for reasoning and step-by-step tasksmistral:latest— very fast, good for quick lookups and summarizing
Cooling matters. Running a 14B model continuously will push the Pi 5 CPU hard. An active cooler (the official Pi 5 case fan or a heatsink + fan) is strongly recommended to avoid thermal throttling.
You need these four tools installed before running the script:
| Tool | What it's for | Install |
|---|---|---|
docker |
Runs Open WebUI in a container | docs.docker.com/get-docker |
ollama |
Downloads and runs AI models | ollama.com/download |
curl |
Checks if Ollama is reachable | Usually pre-installed |
ss |
Checks which ports are open | Usually pre-installed (iproute2 package) |
python3 |
Parses JSON responses safely | Usually pre-installed |
The script checks for all of these when it starts and will tell you exactly which ones are missing if any are not found.
Note for Raspberry Pi / ARM users: Docker and Ollama both have ARM-compatible versions. Make sure you install the correct builds for your architecture.
-
Download the script
git clone https://github.com/YOUR_USERNAME/nea.git cd neaOr just download the file directly:
curl -O https://raw.githubusercontent.com/YOUR_USERNAME/nea/main/nea.sh
-
Make it executable
chmod +x nea.sh
That's it. No package manager, no virtual environment, no build step.
./nea.shOr from anywhere if you put it on your PATH:
sudo cp nea.sh /usr/local/bin/nea
neaWhen it starts, the script will:
- Check that all required tools are installed
- Detect whether Ollama is running — and start it automatically if it isn't
- Make sure Ollama is listening on the correct network interface so Docker can reach it
- Drop you into the main menu
Why does it ask for
sudo? Configuring the Ollama systemd service (so it survives reboots) requires root. If you don't have a systemd service, it runs Ollama as a background process without sudo. You can run the script as a regular user — it will only callsudowhen it needs to write to/etc/systemd/system/.
[✓] Ollama Status: Running
[✓] Network: Accessible to Docker (0.0.0.0:11434)
[i] Options:
[1] Show Docker Images / Containers
[2] Show Ollama Models
[3] Fix Ollama Service (if WebUI can't see models)
[4] Restart Open WebUI
[5] Exit
The two status lines at the top tell you at a glance whether everything is working:
- Ollama Status: Running — the model engine is up
- Network: Accessible to Docker — Ollama is bound to
0.0.0.0so Docker containers can reach it; if this shows yellow it means Open WebUI won't be able to see your models (use option 3 to fix it)
Option 1 from the main menu opens the Docker panel.
It lists every container on your system (running or stopped) along with its image name and a clickable localhost URL if it has an exposed port.
[i] Docker Containers:
[1] ghcr.io/open-webui/open-webui:main -> open-webui -> Running -> http://localhost:3000
[2] postgres:15 -> my-db -> Stopped
[s] Stop all running containers
[b] Back to Main Menu
Selecting a container by number gives you four actions:
| Action | What it does |
|---|---|
| Start | Starts a stopped container |
| Stop | Stops a running container (asks for confirmation first) |
| Restart | Stops then starts the container |
| View Logs | Streams the last 50 lines of logs live (press Ctrl+C to exit) |
[s] Stop all — lists every running container and asks you to confirm before stopping them all.
Option 2 from the main menu opens the Ollama models panel.
It shows every model you have installed along with its size and quantization info:
[i] Ollama Models:
[1] llama3.2:latest -> Installed (3.2 GB Q4_K_M)
[2] qwen2.5:7b -> Installed (4.7 GB Q4_K_M)
[3] mistral:latest -> Installed (4.1 GB Q4_0)
[p] Pull a new model
[t] Test Ollama API connection
[r] Refresh model list
[b] Back to Main Menu
Selecting a model by number gives you three actions:
| Action | What it does |
|---|---|
| Test with a prompt | Sends a prompt to the model and prints the response right in the terminal |
| Show model info | Displays the model card (parameters, license, system prompt if any) |
| Delete this model | Removes the model files from disk (frees up storage, asks for confirmation) |
Browse the full library at ollama.com/library.
Popular starting points:
| Model | Size | Good for | Pi 5 16 GB |
|---|---|---|---|
llama3.2:latest |
~2 GB | General chat, fast on CPU | ✓ |
llama3.2:3b |
~2 GB | Lightweight, runs on 4 GB RAM | ✓ |
llama3.1:8b |
~4.7 GB | Better quality, good all-rounder | ✓ Sweet spot |
qwen2.5:7b |
~4.7 GB | Multilingual, coding | ✓ |
qwen2.5:14b |
~9 GB | High quality, best for Pi 5 16 GB | ✓ Sweet spot |
mistral:latest |
~4.1 GB | Fast, good for summarizing | ✓ |
codellama:7b |
~3.8 GB | Code generation | ✓ |
phi3:mini |
~2.2 GB | Microsoft's small model, very fast | ✓ |
gemma2:2b |
~1.6 GB | Google's smallest model | ✓ |
deepseek-r1:7b |
~4.7 GB | Reasoning / chain-of-thought | ✓ Sweet spot |
qwen2.5:32b |
~20 GB | Very high quality | ✗ Too large |
How much RAM do I need? A rough rule: the model file size + ~20% overhead. A 4 GB model needs about 5 GB of free RAM. If you're tight on memory, pick a smaller variant (e.g.
:3binstead of:7b). On a Pi 5 16 GB, anything up to ~14B parameters runs well.
- Open NEA:
./nea.sh - Press 2 (Ollama Models)
- Press p (Pull a new model)
- Type the model name, for example:
llama3.2:latest - Wait for the download to finish (progress is shown in the terminal)
The model is now available in Open WebUI automatically — no restart needed.
You can also pull from outside the menu at any time:
ollama pull llama3.2:latestOpen WebUI shows all installed Ollama models in a dropdown at the top of the chat interface. Just select the one you want — no configuration needed.
- Open NEA → Option 2 (Ollama Models)
- Select the model by number
- Choose option 3 (Delete this model)
- Confirm when prompted
Or from the terminal directly:
ollama rm llama3.2:latestBy default the script stores models at /usr/share/ollama/.ollama/models. To use a different path, open nea.sh and change the two lines that reference this path:
# Around lines 80, 89, and 108 — change this path to wherever you want models stored:
Environment="OLLAMA_MODELS=/usr/share/ollama/.ollama/models"
# and
OLLAMA_MODELS=/usr/share/ollama/.ollama/models OLLAMA_HOST=0.0.0.0:11434 nohup ollama serve ...For example, to store models on an external drive:
Environment="OLLAMA_MODELS=/mnt/external/ollama/models"Make sure the directory exists and is writable before changing this:
mkdir -p /mnt/external/ollama/modelsIf Open WebUI opens in your browser but shows "Could not connect to Ollama" or the model list is empty:
- Open NEA:
./nea.sh - The status line at the top will tell you the problem:
[!] Network: Only localhost— Ollama isn't reachable by Docker
- Press 3 (Fix Ollama Service)
This restarts Ollama with OLLAMA_HOST=0.0.0.0:11434 so Docker can reach it, and if you have a systemd service it writes a persistent override so the fix survives reboots.
You can also run the connection test to see a full diagnostic:
- Option 2 → Ollama Models
- Press t (Test Ollama API connection)
This checks three things and tells you exactly what's broken:
- Can the host reach Ollama at
localhost:11434? - Can the Open WebUI container reach Ollama through the Docker bridge?
- What interface is Ollama actually listening on?
Skip this if everything is working — it's background knowledge for when things go wrong.
Ollama by default only listens on 127.0.0.1:11434 (localhost). That's fine if you're using it directly on your machine, but Docker containers live in their own network namespace and can't reach 127.0.0.1 on the host.
The fix is to make Ollama listen on 0.0.0.0:11434 (all interfaces). Docker's bridge network gateway is typically 172.17.0.1 — the script detects this automatically and passes the correct address to Open WebUI when it starts:
Open WebUI (Docker container)
|
| http://172.17.0.1:11434 ← Docker bridge gateway
|
Host machine
|
Ollama (listening on 0.0.0.0:11434)
Security note: Binding to 0.0.0.0 means Ollama is reachable by other machines on your local network (not just Docker). If you're on an untrusted network (public Wi-Fi, shared office network), be aware that others could send requests to your Ollama instance. On a home network this is generally fine.
Two paths are hardcoded and may need changing depending on your setup:
Default: /usr/share/ollama/.ollama/models
This is where Ollama stores downloaded model files. Change it if:
- You want models on a larger or external drive
- Your system uses a different Ollama install path
- You're running as a different user
See Changing the model storage location above.
Default: /tmp/ollama.log
When Ollama is started without systemd, logs go here. To read them:
tail -f /tmp/ollama.logOllama isn't installed. Download it from ollama.com/download.
On Linux:
curl -fsSL https://ollama.com/install.sh | shDocker isn't installed. Follow the guide at docs.docker.com/engine/install.
After installing, make sure your user can run Docker without sudo:
sudo usermod -aG docker $USER
# Log out and back in for this to take effectThe container may still be starting. Wait 10–15 seconds and refresh. If it still doesn't load:
docker logs open-webui- Run NEA → Option 3 (Fix Ollama Service)
- Then NEA → Option 4 (Restart Open WebUI)
- Refresh your browser
Large models need a lot of RAM. If the model file is 4 GB, you need at least 5 GB of free RAM. Check usage with:
free -hTry a smaller model variant (e.g. llama3.2:3b instead of llama3.1:8b).
Check the Ollama log:
tail -50 /tmp/ollama.logCommon causes: port 11434 already in use by another process, or a permissions issue on the model directory.
If something else is running on port 3000, the Open WebUI container will fail to start. Edit nea.sh line 197 and change -p 3000:8080 to a free port, e.g. -p 3001:8080. Then access it at http://localhost:3001.
Once everything is running, open your browser and go to:
http://localhost:3000
The first time you visit, you'll be asked to create a local admin account (username + password). This account is stored on your machine only — nothing is sent online.
| Contributor | Role |
|---|---|
| ZTF666 | Creator & maintainer |
| Claude Sonnet 4.6 (Anthropic) | AI pair programmer — code review, documentation, security analysis |
This project is licensed under the MIT License — see the LICENSE file for details.
Crafted by ZTF — Ad astra per algorithmum
