Kodename JPG
IDEN

Local AI on Linux: Ollama + Open WebUI on a Potato Laptop (CPU Only)


Written: Nov 28, 2026 · Level: Intermediate · Category: AI Agent


Home > Tutorials > Local AI on Linux: Ollama + Open WebUI on a Potato Laptop (CPU Only)

Local AI means the AI model runs on your own laptop — not on a company's server. There are two big reasons this is appealing: privacy and saving money.
Privacy: your chats, questions, and documents never leave your laptop — they are not sent to any server, and they are not used to train someone else's model.
Saving money: the models are open-weight and free, with no monthly subscription — all you need is a laptop and electricity.
To be honest: on a potato laptop's CPU, a small (3B) model answers more slowly than ChatGPT. But for Q&A, summarizing documents, and helping you write, it is fast enough. This tutorial uses Ollama to run the model, and Open WebUI as its web interface — it looks like ChatGPT, but it runs 100% offline in your browser.
Local AI architecture: browser → Open WebUI (port 3000) → Ollama (port 11434) → local model, all inside a Linux laptop

Figure 1: Local AI architecture — browser, Open WebUI, Ollama, and the model, all on your laptop.


What You Need




- A Linux laptop — if yours is old, use a lightweight distro (see the tutorial recommending lightweight Linux for old laptops).
- 8 GB of RAM is recommended if you want to use a 3B model (see the table below).
- Docker, if you install Open WebUI with Docker — or Python pip if you prefer to skip Docker.

Step 1: Install Ollama




Install Ollama with a single command — the installer sets Ollama up as a systemd service, and its API runs on 127.0.0.1:11434.
curl -fsSL https://ollama.com/install.sh | sh

Step 2: Download and Run a Model




Download the qwen2.5:3b model (about 1.9 GB):
ollama pull qwen2.5:3b

Once the download finishes, run it and start chatting in the terminal:
ollama run qwen2.5:3b

Other useful commands:
ollama list
ollama ps
ollama rm <model>

ollama list shows the models you have downloaded, ollama ps shows the models currently running, and ollama rm <model> deletes a model you no longer use.

Pick a Model for Your RAM




Here is the rough rule — a model that is too big for your RAM will run slowly or fail to start.
Laptop RAMModel sizeExample models
2–4 GB0.5B–1.5Bqwen2.5:0.5b, llama3.2:1b
8 GB3Bqwen2.5:3b (±1.9 GB), llama3.2:3b (±2.0 GB), gemma2:2b
16 GB7–8Bqwen2.5:7b, llama3.1:8b, mistral:7b

Without a GPU, a model still runs on the CPU — just more slowly. Speed depends on your RAM and on how many CPU cores you have.
Local AI install flow: install Ollama, pull a model, run Open WebUI, then open localhost:3000 in your browser

Figure 2: Install flow — Ollama, model, Open WebUI, then open it in your browser.


Step 3: Install Open WebUI




Open WebUI is a web interface for Ollama — it looks like ChatGPT: a chat list on the left, a chat column in the middle, and you can switch models. If Ollama is on the same machine, run this container:
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

Then open http://localhost:3000 in your browser. The first time you open it, you are asked to create an account — this first account automatically becomes the admin.
Alternative without Docker. If you would rather not use Docker, install it with pip:
pip install open-webui

then run it:
open-webui serve

Open WebUI will run on http://localhost:8080.
Single-container CPU-only alternative. There is also an image that already contains both Ollama and Open WebUI — good for CPU-only setups, with no separate Ollama install:
docker run -d -p 3000:8080 -v ollama:/root/.ollama -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:ollama
Warning — Ollama is not reachable from the container: Ollama binds to 127.0.0.1 by default — meaning it can only be reached from the laptop itself. The Open WebUI Docker container runs on its own network, so it cannot reach Ollama on the laptop's localhost. The symptom: Open WebUI shows a "Server Connection Error". Fix it by letting Ollama listen on all interfaces — run systemctl edit ollama and add this line in the editor that opens:
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"

Save, then reload and restart Ollama:
systemctl daemon-reload
systemctl restart ollama
Warning: NEVER expose port 11434 directly to the internet — Ollama has no authentication, and anyone who finds that port can use your Ollama.

Quick Troubleshooting




- Slow model → use a smaller model, or shrink the context.
- Open WebUI shows a "Server Connection Error" → check OLLAMA_HOST (see the gotcha above).

Where to Go Next




You now have your own private, offline ChatGPT. Two next steps: access this AI from your phone, and turn it into a search engine for your private documents.
- Accessing Local AI from Your Phone via LAN & Cloudflare Tunnel
- Building a Private Document Search Web App (Local RAG) with Open WebUI

References



  1. https://ollama.com
  2. https://pypi.org/project/open-webui/
  3. https://www.codewithanjum.com/run-llm-locally-with-ollama
  4. https://clinerds.com/article/ollama-local-llm-cheap-vps

Like this tutorial? Support the author so there are even more free tutorials.

Support via Saweria

Comments