The Ollama server provides the local HTTP API that CLI commands, SDKs, browser apps, and integrations use. Starting it explicitly is useful on headless hosts, in containers, or when the desktop app is not managing the runtime.
Foreground ollama serve is convenient for testing environment variables. Production Linux installs normally use the ollama systemd service so the server starts on boot.
Check the API endpoint after starting the server. A process that starts but does not answer on the expected host and port will still fail client requests.
Related: How to manage the Ollama service
Related: How to check the Ollama API server
Related: How to set the Ollama host address
$ ollama serve
Listening on 127.0.0.1:11434
$ sudo systemctl start ollama
Related: How to manage the Ollama service
$ curl -s http://localhost:11434/api/version {"version":"0.31.1"}
$ OLLAMA_HOST=0.0.0.0:11434 ollama serve
Related: How to set the Ollama host address
$ journalctl -e -u ollama ##### snipped #####
Related: How to view Ollama logs