If ollama serve reports listen tcp 127.0.0.1:11434: bind: address already in use on a Mac, another process is already listening on Ollama’s default local port. Often it is the Ollama app itself. Check the running service before stopping anything: if it responds, you can use it without starting a second server.
1. Check whether Ollama is already serving requests
In Terminal, run:
curl -sS http://127.0.0.1:11434/api/version
If the response contains a JSON version value, an Ollama server is responding on that port. Leave it running and use Ollama normally; do not open a second ollama serve process. If the request fails or returns something unexpected, identify the listener in the next step. Ollama documents port 11434 as its default local server address.
2. Identify the process using port 11434
lsof -nP -iTCP:11434 -sTCP:LISTEN
Look at the COMMAND and PID columns. A result named ollama indicates that Ollama is already listening. A different command points to another application using that port. If there is no listener, retry ollama serve and record the exact new error; a transient startup problem may have cleared. Do not guess a PID or stop an unfamiliar process.
3. Choose whether to keep or stop the existing service
If the listener is Ollama: keep it if the version check works. On macOS, the desktop app can run in the background. If you specifically need a Terminal-managed server, quit the Ollama app from its menu-bar item first, confirm that lsof shows no listener, and then run ollama serve.
If another app owns the port: identify the app before changing it. If you own that process and can safely stop it, use its normal Quit or Stop control. For a Terminal process you started yourself, kill -TERM PID requests a graceful stop; replace PID with the number shown by lsof. Recheck the port before starting Ollama. Avoid kill -9 or system-wide network resets as a first step.
4. Use another local port if the other app must stay
For a Terminal-managed Ollama server, choose a free port such as 11435:
OLLAMA_HOST=127.0.0.1:11435 ollama serve
In a second Terminal window, verify the new address:
curl -sS http://127.0.0.1:11435/api/version
Point any client application at http://127.0.0.1:11435 too. Setting OLLAMA_HOST only for this command does not change the address used by an already-running desktop app. Ollama’s macOS instructions say that app-level environment changes use launchctl setenv and require restarting the app. Keep the address on 127.0.0.1 unless you intentionally need network access.
5. Check logs if the port looks free but startup still fails
Try starting Ollama once and read the latest server messages:
tail -n 80 ~/.ollama/logs/server.log
Ollama’s troubleshooting documentation lists that file for the macOS app. A manually started ollama serve process also writes errors to its Terminal window. If the message differs from address already in use, follow the actual error rather than changing ports or reinstalling. Include the command, exact error, Ollama version and macOS version when asking for help; remove any private paths or tokens from shared logs.
What to expect
A successful version request returns JSON with a version value. The port check should show one intended listener, and starting a second server on the same address should no longer be necessary. If another app occupies 11434, either stop that app safely or use a separate port and update the clients that connect to Ollama.
Sources and scope
- Ollama FAQ — default bind address and macOS environment-variable instructions.
- Ollama API introduction — local API address.
- Ollama troubleshooting — macOS server-log location.
- Ollama API reference — version endpoint.
This guide is based on the linked product documentation and a review of the commands. It has not been tested on every Ollama or macOS version. If a step differs on your setup, send us a correction with the observed result.