Ollama · Ollama / Linux, macOS, Windows

Connection refused on port 11434

Error messageError: Post "http://127.0.0.1:11434/api/chat": dial tcp 127.0.0.1:11434: connect: connection refused

Why it happens

The Ollama background server is not running, crashed at startup, or is listening on a different host or port than the CLI or client expects.

How to fix it

  1. On Linux, start and verify the systemd service: sudo systemctl start ollama && sudo systemctl status ollama.
  2. On Windows or macOS, launch the Ollama desktop app from Applications/Start Menu and verify the tray/menu bar icon is active.
  3. Verify the server responds locally with curl http://127.0.0.1:11434 (should return Ollama is running).
  4. If running manually or debugging a crash, start the server in a terminal with ollama serve or inspect logs via journalctl -u ollama -n 50.
  5. If you changed OLLAMA_HOST, ensure the client uses the matching host/port or unset OLLAMA_HOST.
sudo systemctl start ollama && curl http://127.0.0.1:11434

Seeing a different message? Paste it into the Error Code Fixer

Related errors

Fixes are reviewed by ComputerTech against current documentation, and software changes fast. If a step differs on your version, tell us. Back up important data before changing drivers, BIOS or system files.