Every Ollama command talks to a local server on port 11434, and most Ollama failures start with that server not answering. One curl command tells you whether the server is up before you chase the model, the network, or the app.
What you need
- Ollama installed
- A terminal with curl
- The Ollama server expected on 127.0.0.1:11434
Step 1: Ask the server for its status
Run curl http://127.0.0.1:11434 in a terminal. This asks the default address and port the server listens on.
Step 2: Read the reply
A reply of Ollama is running means the server is up and listening. No reply, or a connection refused error, means no server is listening on that address.
Step 3: Start the server if it is down
On macOS and Windows, open the Ollama app. On Linux, run sudo systemctl start ollama and then sudo systemctl status ollama to confirm the service is active, then repeat the curl check.
Worked example: synthetic server check
The table below is a synthetic example. It shows the expected result of checking the server; no server was queried.
| Command | Reply | Meaning |
|---|---|---|
| curl http://127.0.0.1:11434 | Ollama is running | Server is up |
| curl after start | Ollama is running | Start worked |
| ollama list | Models listed | Commands can talk to the server |
Expected result (UNTESTED). curl returns Ollama is running, and ollama list then works. If the first curl fails, starting the server makes the second one succeed. This check was not run live; the table shows the expected result for the synthetic example.
Limits
- The check only covers the default address; if the server was started with a different OLLAMA_HOST, curl must use that address.
- A running server does not mean the model you want is downloaded; check ollama list separately.
- On macOS and Windows the app starts the server for you, so a failed curl usually means the app is not open.
