Configuration
Verified by owner

Ollama: listen tcp 127.0.0.1:11434 bind: address already in use

Error: listen tcp 127.0.0.1:11434: bind: address already in use
By Eruo Fredoline · Last verified Jun 12, 2026

Cause

Environment: Ollama on Linux/macOS/Windows; especially common on Linux where the systemd unit and a manual ollama serve both try to bind.

Severity: low — only blocks startup; no data risk.

  • The Linux installer registers a systemd unit that auto-starts; running ollama serve again fights it
  • macOS LaunchAgent left over from a previous install
  • A second Ollama instance (e.g. one inside Docker, one on host) competing for 11434
  • Stale process from a crashed prior run that didn't release the port
  • LM Studio's local server occasionally collides on the same port if reconfigured

Solution

1. Find what's holding the port:

# Linux / macOS
sudo lsof -i :11434
ss -tulpn | grep 11434
# Windows PowerShell
Get-NetTCPConnection -LocalPort 11434 | Select-Object OwningProcess

2. If it's the systemd unit, either let it serve and don't run ollama serve manually, or override the unit:

sudo systemctl status ollama
# Stop and disable if you prefer manual control
sudo systemctl stop ollama
sudo systemctl disable ollama
ollama serve

3. Override the listen host/port via env-file (production-grade):

sudo systemctl edit ollama
# In the editor:
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11500"
sudo systemctl daemon-reload && sudo systemctl restart ollama

4. Kill stale processes:

pkill -f ollama && sleep 1 && ollama serve

5. Run on a different port if you legitimately need two:

OLLAMA_HOST=0.0.0.0:11500 ollama serve

Related errors

Did this fix it?

If your case was different, email Contact support with what you saw and we'll update the page. If it worked but took different commands on your platform, we want to know that too.