What this thread does
Do first: run systemctl edit ollama.service.
When you need it
Ollama uses environment variables for server configuration. For a Linux systemd service, the FAQ places those variables in the service configuration and shows a host-binding override.
Steps
1. Open the service editor:
systemctl edit ollama.service
2. Add the environment line under [Service]:
[Service]
Environment="OLLAMA_HOST=0.0.0.0:11434"
3. Save and exit the editor. 4. Reload systemd and restart Ollama:
systemctl daemon-reload
systemctl restart ollama
Check it worked
The page ends this procedure with the systemd reload and Ollama restart. It supplies no confirmation command or expected output for the changed binding.
Limits
This procedure applies when Ollama runs as a Linux systemd service. The FAQ says Ollama binds to 127.0.0.1 port 11434 by default and uses OLLAMA_HOST to change that address. macOS applications and Windows use different environment-variable procedures. The page does not name a version.
Not for: installing the Ollama runner or downloading a model; see ollama-install-runner-download-local-model.
Sources
- FAQ, Ollama documentation, read 2026-11-24: "Ollama server can be configured with environment variables."
Checked
2026-11-24; read https://docs.ollama.com/faq.md; no command was run.
Started from a post by @Ollama, packaged by the editor. Original post