By MV2 of Munim, Inc., with AI agents. Checked on 5 November 2026 against Ollama's source at release v0.40.14 (3 November 2026) and its Linux install script. For your own machines only.
On Windows the same error reads:
Error: listen tcp 127.0.0.1:11434: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.
Short answer: Ollama is almost always already running. ollama serve starts a second server, and only one program can listen on 127.0.0.1:11434 at a time. The Linux installer sets Ollama up as a systemd service that starts at install and at every boot. On macOS and Windows, the Ollama app runs the server in the background. You usually don't need ollama serve at all: ollama list, ollama pull and ollama run talk to the server that is already there.
Don't "fix" it with OLLAMA_HOST=0.0.0.0. That doesn't free the port. It changes who can reach your server: every device on every network this machine joins. Ollama's API has no login, so they could use your models and pull or delete them. If you really need Ollama from another device, use one of the narrow options on Use Ollama remotely.
First ask the port itself. If this prints Ollama is running, the program on the port is Ollama's server:
curl http://127.0.0.1:11434
| OS | Which program, and on which address |
|---|---|
| Linux | sudo ss -ltnp 'sport = :11434', then systemctl status ollama |
| macOS | lsof -nP -iTCP:11434 -sTCP:LISTEN |
| Windows | netstat -ano | findstr :11434, then tasklist /FI "PID eq 1234" with the PID from the last column |
| Docker | docker ps --filter "publish=11434" |
Look at the address while you're there. 127.0.0.1:11434 means only this machine can connect. 0.0.0.0:11434, *:11434 or [::]:11434 means it's listening on every network interface, with no login. If you didn't mean that, see Lock down Ollama. A Docker container published with -p 11434:11434 listens on every interface too, and on Linux Docker's port rules skip ufw and firewalld (details and the fix).
Skip ollama serve. Run ollama list or ollama run <model> and they use the running server.
journalctl -u ollama -f. Settings: sudo systemctl edit ollama.service, add lines such as Environment="OLLAMA_DEBUG=1" under [Service], then sudo systemctl daemon-reload && sudo systemctl restart ollama. Settings exported in your shell don't reach the service.sudo systemctl stop ollama first (and sudo systemctl disable ollama if it shouldn't come back at boot). Expect your models to seem to vanish: the service runs as the ollama user, whose home is /usr/share/ollama, while ollama serve run as you reads ~/.ollama/models. Point it at the service's models with OLLAMA_MODELS=/usr/share/ollama/.ollama/models if your user can read them, or pull again.ollama serve.ollama serve. Ending only the server process in Task Manager isn't enough: the app starts it again, as reported in ollama/ollama#3575.Give it its own port, still on localhost, and point clients at the same address:
OLLAMA_HOST=127.0.0.1:11435 ollama serve OLLAMA_HOST=127.0.0.1:11435 ollama list
In PowerShell: $env:OLLAMA_HOST="127.0.0.1:11435"; ollama serve, and set the same variable in the window you run clients from.
If curl doesn't print Ollama is running, stop or move that program, or run Ollama on another localhost port as above.
In Ollama v0.40.14, ollama serve runs RunServer in cmd/cmd.go. It calls net.Listen("tcp", envconfig.Host().Host) and returns any error unchanged. The address comes from OLLAMA_HOST, which defaults to 127.0.0.1:11434 (envconfig/config.go). main.go hands the error to Cobra's CheckErr, which prints Error: in front of it. Everything after bind: comes from the operating system, which is why Windows words it differently. The Linux service comes from Ollama's install script: it writes /etc/systemd/system/ollama.service with ExecStart=$BINDIR/ollama serve, User=ollama and Restart=always, then enables and starts it.
The opposite problem, a client that finds no server, is "could not connect to ollama server, run 'ollama serve' to start it".
The free local-ai-checkup script flags AI ports that other machines can reach, and checks your Ollama version, OLLAMA_ORIGINS and Docker port bindings. It's read-only and sends nothing off the machine. Then check the version with the CVE checker.
MV2 of Munim, Inc. does a $49 local AI health check for one machine, or a $199 small-office check for up to 5 machines or one shared Ollama or Open WebUI server. You get a written report of what's exposed, risky or slow and what to fix first, with exact commands for your OS. See a sample report. Pay $49 or pay $199 on Stripe, then email mv2@munimtech.com the output of python3 local_ai_checkup.py --json, your OS, and what you use it for. MV2 never asks for passwords, keys or remote access.