Ollama address already in use on Mac? The error listen tcp 127.0.0.1:11434: bind: address already in use means a process already listens on the local address where ollama serve wants to start. On macOS, it is often the Ollama desktop app running in the background. First ask the existing server for its version. If it responds, use that server instead of launching a duplicate. Only identify and stop a process if you deliberately need a separate Terminal-managed server.

This guide is for a Mac running Ollama locally. If the same message appears on a PC, follow our Windows-specific Ollama port guide. A refused connection or a client that cannot reach the server is a different symptom; use the localhost 11434 connection guide for that case.
On this page
What the port error means on macOS
Ollama’s local FAQ says its server binds to 127.0.0.1:11434 by default. The address is local to your Mac; 11434 is the port. Two servers cannot both take the same listening address at once. This error is about starting another listener. It does not, by itself, say that models are damaged, the GPU failed, or the existing Ollama server is unusable.
There are three practical possibilities. First, the Ollama menu-bar app is already running and serving requests normally. Second, a Terminal session, background launcher or container started another Ollama instance. Third, an unrelated application owns the port. The checks below separate these cases without deleting model files or reinstalling Ollama. Make a note of the exact error and of any custom OLLAMA_HOST setting before making a change.
The first test is read-only. It does not start, stop or reconfigure anything. Keep the expected result beside the command so you can stop as soon as your intended server is working.
Ollama address already in use on Mac: six safe checks
1. Check whether Ollama is already serving requests
Open Terminal and request the local version endpoint:
curl -sS http://127.0.0.1:11434/api/version
Ollama’s API documentation identifies the local server as http://localhost:11434/api. A JSON response containing a version field indicates that a server is answering the version request on this port. If this is the instance you intended to use, stop here. You do not need a second ollama serve process. Use the running app or connect your client to the existing local server.
If the response is a connection failure, a different server response, or an HTTP error, continue to identify the listener. A version response establishes API availability, not model health. If a model loads poorly or a client cannot generate despite a working API, investigate that separate problem rather than restarting the server repeatedly.
Expected result: One intended Ollama server answers the local version request. Record the response and any custom port your client uses.
2. Identify the process listening on port 11434
Ask macOS which process has opened the port:
lsof -nP -iTCP:11434 -sTCP:LISTEN
Read the COMMAND, PID and USER columns. If the command is Ollama and the API test succeeded, the “address already in use” message came from trying to start another Ollama server. If the command is unfamiliar, identify the application and how it was started before stopping it. A listener can be a development tool, a container, or another background service. Do not copy a PID from an example or assume every process on port 11434 is safe to terminate.
If lsof shows no listener but ollama serve still reports the same bind error, repeat the query immediately after the error. A short-lived process may start between checks. Compare the exact host in the error with the host you queried: a custom OLLAMA_HOST value can point Ollama at a different address or port. If the message has changed, follow the new message rather than applying a port-collision fix.
Expected result: You know which process owns the address. Do not alter it until you decide whether you need that process to stay.
3. Keep the working app, or quit it before manual serving
If Ollama’s macOS app owns port 11434 and the API responds, keeping the app is normally the simplest solution. You can use the CLI and clients against the server it already started. Running ollama serve as well does not make the app faster or create a second usable server on the same local address.
If you intentionally want to manage Ollama in a Terminal window, quit the Ollama app from its menu-bar control. Then run the lsof command again and make sure the listener has gone. Only after that should you run:
ollama serve
Leave that Terminal window open while using the server. If you close it or stop the foreground process, your client may lose access. You can reverse the change by ending the Terminal-managed server normally and reopening the Ollama app. A restart may also bring back an app configured to launch automatically, so do not assume the port will stay free forever.
If a process you started yourself must be stopped, use that program’s normal Quit or Stop command first. For a known Terminal process, kill -TERM <PID> requests a graceful exit after you replace <PID> with the verified process ID. Do not use a force kill or system-wide network reset as the first response to this message.
Expected result: Only the server you intend to use is listening. The original command no longer tries to bind over a running app.
4. Use another local port if the first listener must stay
If a separate application legitimately needs port 11434, a Terminal-managed Ollama server can use an unused local port. For example, in a new Terminal window run:
OLLAMA_HOST=127.0.0.1:11435 ollama serve
Keep that server window open. In a second window, test the new address:
curl -sS http://127.0.0.1:11435/api/version
If it responds with a version, point each client or integration at http://127.0.0.1:11435 as appropriate for that client’s base-URL setting. A server on 11435 will not fix a client still asking 11434. The one-command environment assignment above applies only to that Terminal launch; it does not change a desktop app already running in another process.
Ollama’s FAQ explains that environment variables for the macOS application are set through launchctl setenv and take effect after restarting the app. If you need the desktop app itself to use a different port, follow that official app procedure and then verify the new port. Record the previous value so you can restore it. Keep a personal local server bound to 127.0.0.1 unless you deliberately need network access and understand the access controls. Binding to 0.0.0.0 exposes more interfaces.
Expected result: The intended server responds on its new port and clients use the same port. The old listener can continue uninterrupted.
5. Check whether a custom host setting or second launcher is involved
If the displayed error uses another address, confirm how Ollama was started. A Terminal command may have an inline OLLAMA_HOST assignment, while the desktop app inherits its launch environment. The macOS app and a Terminal session do not necessarily share the same effective setting. Do not change a system-wide environment variable just because a single Terminal command collided with an app already running correctly.
Look for another Terminal window that still runs ollama serve, a login item that starts the app, or a container that publishes 11434. Close only the duplicate you control. When a container owns the port, use that container’s normal stop and inspect command rather than killing an arbitrary host PID. After each change, repeat the version request and the lsof query. A service that restarts automatically will reappear; identify its launcher before trying to stop it again.
This check also prevents a misleading partial fix: you can free port 11434, start Ollama successfully, and still have your client configured for 11435. Compare the server’s listening address with the address used by the client. If the client says the API is unreachable, our connection guide covers that different failure.
Expected result: You can identify one intended launcher and one matching client address. Any duplicate start command is removed without disturbing unrelated software.
6. Read the log when the port test and error disagree
If the port appears free but Ollama still fails to start, capture the error in the Terminal where you ran ollama serve. For the macOS application, Ollama’s troubleshooting documentation lists ~/.ollama/logs/server.log. Read the recent lines with:
tail -n 80 ~/.ollama/logs/server.log
The macOS installation guide also identifies the app and server log locations. Look for the first startup error around the time of your test. A permission failure, missing binary, or model problem calls for a different fix than “bind: address already in use.” Avoid deleting ~/.ollama or reinstalling as an initial port check; that directory contains models and configuration, and the port conflict itself does not show corruption.
When requesting help, include the exact command, error, Ollama version, macOS version, whether the desktop app is open, and the lsof result. Redact usernames, private paths, tokens and prompts from shared logs. If the version endpoint works but model inference fails, the port is already serving and the remaining issue lies elsewhere.
Expected result: The log confirms the real startup failure or shows that the server is already running. Continue only with a fix that matches that evidence.
Choose the next action from the result
| Result | Meaning | Next action |
|---|---|---|
/api/version returns JSON and lsof shows Ollama |
Ollama is already running locally. | Use that server; do not start a second ollama serve. |
| Ollama owns the port but you need a Terminal-managed instance | The app and manual server compete for the same address. | Quit the app, verify the port is free, then start the manual server. |
| Another known app owns 11434 | There is a genuine port collision. | Stop that app normally if appropriate, or use a free local port and update clients. |
| No listener appears and the error persists | A process may be transient, a custom host may be involved, or the error has changed. | Repeat lsof immediately, compare the exact address, then read logs. |
| Server works but a client cannot connect | The client may target a different host or port. | Match its base URL to the actual server; follow the connection guide. |
When these port checks will not help
If /api/version works and Ollama has one intended listener, the bind error from a second launch is already explained. More port changes will not repair slow inference, a missing model, or GPU use. Likewise, an API connection refused error means no server answered at the address the client used; that requires a connection check, not an “already in use” workaround.
Do not delete models, disable the firewall, expose Ollama to the network, or reboot the Mac repeatedly solely because a second ollama serve command failed. Start with a read-only API request and the listener check. If you intentionally changed OLLAMA_HOST, restore the previous value or restart the app to roll back the test.
Frequently asked questions
Do I have to run ollama serve every time on Mac?
No, if the Ollama app is already running and the local API responds. A manual server is useful when you deliberately manage its process in Terminal. Running both on the same host and port causes the collision.
Is port 11434 a sign of malware?
No. Ollama documents 11434 as its default local API port. Still identify the actual listening process with lsof; the port number alone does not establish which application owns it.
Why does changing OLLAMA_HOST not fix my app?
An inline Terminal setting affects that command only. Ollama says a macOS application setting uses launchctl setenv and an app restart. Also ensure the client points to the new port.
Can I use port 11435 instead?
Yes, if it is free and you configure both the server and clients to use it. Test the new address with the version endpoint. Keep the listener local unless you intentionally need other devices to connect.
What if the server answers but my model still fails?
That is a separate model, client or resource problem. Record the model error and inspect Ollama’s logs. A successful version request does not prove that a particular model can run.
Sources and related guides
- Ollama local FAQ — default bind address and macOS app environment settings.
- Ollama API introduction — local API base URL.
- Ollama version endpoint — endpoint reference.
- Ollama troubleshooting and macOS guide — logs and app behavior.
Next step: If Ollama says “address already in use” on a Mac, run the version request before stopping anything. Use the existing server when it works. If a different process owns the port, identify it and choose a safe stop or a separate local port. This article follows the linked product documentation and a review of the command syntax; it does not claim that every Ollama or macOS version was personally tested. Send a correction if your setup differs, without sharing private logs or tokens.


