Skip to content
,
Run open models from scratch · Part 3

One local stack end to end (Ollama-style)

10 min read
Featured image: One local stack, stick to it. Editorial illustration for Analytics Made Simple.

Kenji pasted a 12-line warehouse note into a curl he had saved for localhost:8080. Connection refused. Activity Monitor listed 3 processes that all claimed to be a local model: Ollama, LM Studio, and Docker Desktop still hugging a llama.cpp container that had already exited. The note was 2 pallets and a missed 14:00 dock. The prompt hit the stack that was off.

This is OS10, Part 3 of Run open models from scratch. OS9 walked friendly desktop runners from zero. Today you pick one of those runners and live in it. Next is OS11, first useful offline tasks. Definitions still live in Open-source AI explained. OS2 is hosted vs local. Groq (the inference company, q) is not Grok (xAI). Neither is this page. This page is one local Ollama stack, as of writing in August 2026.

Pull, run, keep the name

  • Why three local apps on three ports is a raffle, not a stack
  • The four pieces: app, model file, chat UI, and where RAM goes
  • A 30-minute Ollama path you can paste: install, pull one 7B-class model, chat
  • How to save a prompt, find the files on disk, and quit the extra apps
  • How Kenji’s 3 processes ate a 12-line status before 08:30

One app, one port

A local model is a process listening on a port. Curl, a chat window, and a VS Code extension all talk to that port. They do not talk to “AI on my laptop” as a mood. If the process is down, you get connection refused. If three processes are up, you might hit the idle one, the half-loaded one, or the container that died last night.

As of writing, Ollama binds 127.0.0.1:11434 by default. LM Studio’s local server commonly sits on 1234. A llama.cpp llama-server in Docker often lands on 8080. Kenji’s gist still said 8080 because that was the blog he copied 11 days ago, after a Saturday with Docker. Monday he had also installed Ollama. Tuesday he opened LM Studio “to compare.” Three listeners, three model folders, one prompt, zero answers.

If OS9 already left you inside LM Studio and you have chatted once, stay there. Close Ollama. This page uses Ollama because the CLI is easy to paste and the docs are on ollama.com. The rule is one stack.

Rule of thumb: If Activity Monitor shows three model runners, you do not have a local stack. You have a port raffle.

The four pieces of the stack

People say “I installed Ollama” and mean four different objects. Split them on purpose. The map below is the stack you are keeping.

Four pieces of one local stack: app, model file, chat UI, and where RAM goes
Four pieces of one local stack: app, model file, chat UI, and where RAM goes
PieceWhat it isOllama as of writingWhere RAM goes
AppThe runtime that loads weights and listensOllama app plus the ollama CLI, port 11434Small until a model is loaded
Model fileWeights on disk~/.ollama/models on a Mac (see FAQ for Linux and Windows)Disk only, until you run
Chat UIWhere you typeollama run or the app windowAlmost none
Loaded modelWeights copied into memoryollama ps shows NAME, SIZE, PROCESSORRAM or VRAM, often several GB

ollama list is the disk catalog. ollama ps is what is in memory. Kenji had a 4.9 GB pull and still had nothing loaded in Ollama, because the curl never reached 11434. LM Studio was chewing 2.4 GB on a model he was not talking to. Docker Desktop sat at about 800 MB with an exited container. That is how 3 processes spend RAM without answering a warehouse note.

Ollama’s public homepage currently sells computer and cloud. Stay on a local tag today. If a model line says cloud, the prompt leaves, same lesson as OS2. You can set OLLAMA_NO_CLOUD=1 or disable_ollama_cloud in ~/.ollama/server.json if you want the app to refuse that path.

A 30-minute Ollama path

This is a worked clock. One terminal. One model tag you confirmed on the library page this week. If the pull is slow, wait. Do not fill the wait by launching LM Studio.

A 30-minute Ollama day: install one app, pull one 7B-class model, chat and save a prompt, then find files and quit extras
A 30-minute Ollama day: install one app, pull one 7B-class model, chat and save a prompt, then find files and quit extras

Minutes 0 to 5: install from ollama.com/download. macOS has a DMG (Sonoma or later on the current download page). Windows has a setup exe. Linux still documents curl -fsSL https://ollama.com/install.sh | sh. Then ollama --version. If that command is missing, open a new terminal after the installer, or use the app’s own window.

Minutes 5 to 18: pull one 7B-class model that fits RAM. As of writing, llama3.1:8b is an 8B Q4 around 4.9 GB on the library page. That is the neighborhood OS3 called laptop-sized. On an 8 GB machine, switch to llama3.2:3b (about 2 GB). Do not run ollama pull llama3.3 and hope. Untagged names often resolve to a huge default. Read the size on ollama.com/library the morning you pull. Tags move. The command below is a shape from August 2026, not a forever pin.

# One local stack. Paste in order. Do not open LM Studio this hour.
# Re-check the tag and size on https://ollama.com/library this week (August 2026).
# 16 GB RAM example: llama3.1:8b (about 4.9 GB Q4 as of writing).
# 8 GB RAM: llama3.2:3b instead. Never pull an untagged 70B default.

ollama --version
ollama pull llama3.1:8b
ollama list
ollama run llama3.1:8b "Summarize this public sentence: The warehouse delay was ours."
ollama ps

What that block does: version proves the CLI exists. pull writes weights. list is your receipt. run with a public toy sentence is the first chat. ps shows whether the 4.9 GB file is now in memory, and whether PROCESSOR says CPU, GPU, or a split. Time the reply. If the first sentence takes 20 seconds on CPU, that is hardware talking, not a broken install. Stay. Do not add a second runner to go faster. One more public prompt in the same session is enough. A vendor NDA is not. P4 is still the paste test even when the fan is yours.

Save a prompt you will reuse

Kenji retyped “make this a Slack status, five bullets, no hello” every time, then got a 200-word essay anyway. Save the instruction next to the model. Ollama’s way is a Modelfile: a FROM line (which weights) plus a SYSTEM line (how to behave). Create a tiny named model from that file. Tomorrow you run the name, not the speech.

FROM llama3.1:8b
SYSTEM You turn messy meeting notes into 5 short Slack bullets. No greeting. No closing line.

# Save as Modelfile in the folder where you will run the next two commands.
# Tags move; keep FROM in sync with what you pulled.
ollama create notes-status -f Modelfile
ollama run notes-status "Warehouse delay was ours. Carrier missed the 14:00 dock. Two pallets still on the floor."

What that prints, on a good day: five bullets, dock time, pallets, no “Happy to help.” If you get a speech, the SYSTEM line is being ignored or the tag you FROM is not the local file you think. Run ollama list and check the name. A desktop notes-status.txt you paste by hand is also a valid save. Skip Open WebUI and prompt libraries this week. One SYSTEM line is the assignment.

Where the files live

Ollama does not drop a friendly llama-3.1.gguf in Downloads. It stores hashed blobs plus manifests. Kenji looked for a .gguf, found none, and installed LM Studio “to get a real file.” That is how the second folder started. Look in the documented directory instead.

As of the current FAQ: macOS uses ~/.ollama/models. Linux with the stock installer uses /usr/share/ollama/.ollama/models. Windows uses C:\Users\%username%\.ollama\models. Point a different disk with OLLAMA_MODELS, then restart the app. On Linux the ollama user needs write access to that folder. Do not delete blobs in Finder while a run is live.

LM Studio keeps its own cache. A Docker llama.cpp compose file usually bind-mounts a ./models folder you chose. Three apps, three copies. Kenji’s disk had about 4.9 GB in Ollama, 4.7 GB in LM Studio, and 4.1 GB in a Docker volume: 13.7 GB of near-duplicate 7B-class weights. OS3 covers size. OS12 will do heat and battery. Today: know the path, know it is not Downloads.

Stop the extra apps

Kenji skipped this part. Quit LM Studio from the menu, not only the chat tab. On a Mac, the menu-bar icon can keep the server up after the window is gone. Docker: docker ps -a, then docker stop the llama.cpp container if it is still named. Quit Docker Desktop if you only installed it for this.

Confirm one listener:

# Expect one healthy local server, not a cloud id.
curl -s http://127.0.0.1:11434/api/tags
ollama ps
# Optional, macOS / Linux: who owns 11434, 1234, 8080
lsof -nP -iTCP:11434 -sTCP:LISTEN
lsof -nP -iTCP:1234 -sTCP:LISTEN
lsof -nP -iTCP:8080 -sTCP:LISTEN

What you want: tags JSON from 11434, one row in ollama ps (or none, if you already stopped the model), nothing listening on 1234 or 8080. If 8080 still answers, that is the Docker habit. If 1234 answers, LM Studio’s server toggle is still on. Kenji’s curl was perfect. It was pointed at a corpse. RAM goes to whichever process loaded weights, not to whichever icon you clicked last.

Worked example: 3 processes, one dead port

Tuesday 08:12. Ops dropped 12 lines in Slack: carrier missed the 14:00 dock, 2 pallets on the floor, customer wants a time. Kenji had a curl from a llama.cpp gist, still aimed at 8080. He hit return. Refused. He spent 19 minutes restarting Docker Desktop because the gist said Docker. The container was Exited (0) 14 hours ago. Ollama had been listening on 11434 the whole time with no model loaded. LM Studio had a Qwen sitting in RAM from last night’s compare window.

ProcessPortStatus at 08:12What Kenji hit
Ollama11434Listening, no model loadedHe did not curl this
LM Studio1234App open, model half-warm2.4 GB RAM, unused
Docker llama.cpp8080Container exitedConnection refused
The 12-line note(Slack)Still in the threadRewritten by hand at 08:41

The fix that would have landed the 08:15 Slack reply: quit LM Studio, leave Docker alone, ollama run notes-status with the 12 lines. Even a cold 8B on CPU would have beaten 19 minutes of compose logs. He typed the status himself at 08:41 and told the stand-up that “local LLMs are flaky.” The flaky part was the gist port. Write the working path on a sticky note: app name, port, model tag, models directory. Kenji’s note had only “llama.cpp 8080.”

ollama run is not production self-host

  • Installing Ollama, LM Studio, and Docker llama.cpp in one weekend, then curling the one that is off.
  • Pulling an untagged model that resolves to 70B, filling the disk, blaming “Ollama.”
  • Treating ollama list as proof the prompt is local. A cloud id can sit next to the 4.9 GB file.
  • Hunting for a .gguf in Downloads, then adding a second app to “see the file.”
  • Leaving LM Studio’s server on 1234 so two OpenAI-shaped endpoints exist and your extension hits the wrong one.
  • Skipping the saved SYSTEM prompt, then deciding the 8B “cannot write Slack.”

One model, one prompt, write the id

Block 30 minutes. One app. If you already like LM Studio from OS9, stay there and skip the Ollama commands. If you are starting cold, paste the Ollama block above. Pull one 7B-class tag that fits RAM. Chat with a public sentence. Save a SYSTEM prompt (Modelfile or a text file). Open the models directory. Quit the other two apps. Write the port on a sticky note. Next: OS11, first useful offline tasks. Hardware tax is OS12. Ordinary writing still goes through the products chooser. Catalog: Learn.

The Ollama-style day

  • Pick one runner. Close the other two. Curl the port that is up.
  • Know the four pieces: app, file on disk, chat UI, RAM via ollama ps.
  • Pull one tagged 7B-class model. Re-check size on ollama.com the week you run it.
  • Save a SYSTEM prompt. Open ~/.ollama/models (or the FAQ path for your OS).
  • Kenji’s 3 processes were the outage. The 8B file was fine.

Sources

  • Ollama (download, library, local and cloud modes; confirm which you are in)
  • Ollama library (tags and file sizes the week you pull)
  • Ollama FAQ (default port 11434, model directories, ollama ps, cloud disable)
  • LM Studio (the other desktop runner; pick it or Ollama, not both this week)
  • llama.cpp (engine under many apps; Docker server often on 8080)
  • Meta Llama downloads (license and acceptable use if your tag is Llama)
  • AMS OS2 (hosted vs local) and OS9 (desktop runners)
Written by

Jose S

Founder & Lead Analyst · Analytics Made Simple

Hands-on data strategist, analytics engineering lead, and educator. Writing practical, no-fluff guides to help everyday teams, analysts, and engineers master SQL, AI systems, and modern data architectures.