What is the Ollama default port?

Ollama’s default port is 11434. The local server binds to 127.0.0.1 on port 11434, so by default only the same computer can reach it.

As of December 2, 2026, Ollama’s documentation lists these local base URLs:

  • Ollama API: http://localhost:11434/api
  • OpenAI compatibility: http://localhost:11434/v1
  • Anthropic client base URL: http://localhost:11434

To change the port or host, set the OLLAMA_HOST environment variable, for example OLLAMA_HOST=0.0.0.0:11434 to expose Ollama on your network, then restart Ollama.

  • macOS app: run launchctl setenv OLLAMA_HOST, then restart the app.
  • Linux (systemd): add Environment=”OLLAMA_HOST=…” with systemctl edit ollama.service, then reload systemd and restart Ollama.
  • Windows: quit Ollama, add OLLAMA_HOST in your account’s environment variables, then start Ollama again.

Local requests need no API key. Ollama’s cloud API uses https://ollama.com/api instead.

Related: Ollama 0.40.17 power-user guide, Where does Ollama store models? and How to update Ollama?

Source: Ollama docs, FAQ; Ollama docs, API introduction

Image: Ollama logo by ParthSareen on behalf of Ollama, MIT License, via Wikimedia Commons. Placed on a white background and resized. Ollama is a trademark of its owner. FreeAnswers is not affiliated with or endorsed by Ollama.



Related answers

Leave a Comment