Ollama · Ollama / Linux, macOS, Windows
Connection refused on port 11434
Error message
Error: Post "http://127.0.0.1:11434/api/chat": dial tcp 127.0.0.1:11434: connect: connection refusedWhy 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
- On Linux, start and verify the systemd service:
sudo systemctl start ollama && sudo systemctl status ollama. - On Windows or macOS, launch the Ollama desktop app from Applications/Start Menu and verify the tray/menu bar icon is active.
- Verify the server responds locally with
curl http://127.0.0.1:11434(should returnOllama is running). - If running manually or debugging a crash, start the server in a terminal with
ollama serveor inspect logs viajournalctl -u ollama -n 50. - If you changed
OLLAMA_HOST, ensure the client uses the matching host/port or unsetOLLAMA_HOST.
sudo systemctl start ollama && curl http://127.0.0.1:11434Seeing a different message? Paste it into the Error Code Fixer
Related errors
- Model requires more system memory
- PyTorch CUDA Out of Memory
- PyTorch Cannot Detect CUDA GPU
- PyTorch Installed Without CUDA
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.