localhost – explained simply
localhost (or 127.0.0.1) is the address of your own computer; what runs there is usually reachable only from your PC.
Also: 127.0.0.1, Loopback
If you open http://127.0.0.1:8188 in your browser, you are talking to a program on your own machine, not the Internet. Local AI tools use this to show their interface in the browser, even though everything runs on your PC.
By default, Ollama binds to 127.0.0.1, so it is not reachable from other devices on the network. You can change that with the environment variable OLLAMA_HOST, for example so your laptop can access the desktop PC. But that also opens the service to all other devices on your network.
What does that mean for you? Keep services on localhost unless you specifically want to use them from other devices.
Related terms
Errors where that matters
- Ollama: could not connect to ollama app, is it running? (Ollama server is not running or can’t be reached)
- Ollama: model "…" not found, try pulling it first (model missing on this server)
- Ollama: POST predict … /completion: EOF / wsarecv: An existing connection was forcibly closed by the remote host (model process crashed in the middle of the response)
- Ollama: something went wrong, please see the ollama server logs for details (command doesn't get a usable response from the server)
- Open WebUI: WebSocket connection failed / is not an accepted origin (page keeps loading behind reverse proxy)