New Tool Radar

Local AI

How to Let Another Computer on Your Network Reach Ollama with OLLAMA_HOST

Set OLLAMA_HOST to 0.0.0.0:11434 so another computer on your trusted home network can reach Ollama, and understand that the server has no login before you do it.

Schematic diagram comparing the default 127.0.0.1:11434, this computer only, with OLLAMA_HOST=0.0.0.0:11434, and the warning that there is no login by default.

By default, Ollama only listens to its own computer. Ollama’s FAQ says it binds 127.0.0.1 port 11434 by default, and 127.0.0.1 means “this computer only” — a laptop on the same Wi-Fi cannot reach it. Changing one setting, OLLAMA_HOST, opens it to the network. Do that only after understanding the safety warning below, because the local server has no login.

The safety warning first

Ollama’s API introduction says local requests do not need an API key, and to omit the authorization header for local requests. That means anyone who can reach your Ollama server can use it: run models, list them, and send prompts. Treat your home Wi-Fi as a network boundary, not access control. Before changing the bind address, restrict access with the host firewall to the one device you intend to use, or keep localhost and use an authenticated private connection. Never expose it to the internet, and never leave it open on a shared or public network. When you are finished, set OLLAMA_HOST back to 127.0.0.1 and restart Ollama, so it listens to its own computer only again.

Open Ollama to your network

Ollama’s FAQ says to change the bind address with the OLLAMA_HOST environment variable, and it gives the per-system steps for setting environment variables: on macOS, use launchctl setenv and restart the Ollama app; on Linux, edit the systemd service with systemctl edit ollama.service and restart it; on Windows, quit Ollama, edit the user environment variables, and start the app again. The value to set is OLLAMA_HOST=0.0.0.0:11434, which tells the server to listen on all network interfaces on port 11434.

OLLAMA_HOST value Who can reach Ollama When to use it
127.0.0.1:11434 (the default) Only the computer Ollama runs on Normal use; the safe default
0.0.0.0:11434 Any computer on your network that knows the address Only with explicit firewall rules limiting access to intended clients

Try it: reach Ollama from a second computer

On the computer running Ollama, set OLLAMA_HOST=0.0.0.0:11434 and restart Ollama. Then, from a second computer on the same network, open http://192.168.1.10:11434 in a browser, replacing 192.168.1.10 with the first computer’s real address on your network — for a fictional practice example, the first computer’s address is 192.168.1.10. If the page answers that Ollama is running, the second computer can reach it; if it does not answer, check that Ollama restarted with the new setting and that the network allows the connection. When the test is done, set OLLAMA_HOST back to 127.0.0.1 and restart Ollama. Expected result. We checked the Ollama FAQ and API introduction. We did not change OLLAMA_HOST or expose a server on this machine.

Limits

Setting OLLAMA_HOST changes where the server listens, not who is allowed in: there is no password, no user account, and no list of allowed computers added by this setting. A firewall on the server computer can still block port 11434 even when the setting is correct, and the address of the server computer can change when it reconnects to the network, so write down the address you tested with. We did not test any network setup ourselves.

Sources

See all