[GH-ISSUE #11503] Ollama IPv4 Binding Issue on Ubuntu #7599

Closed
opened 2026-04-12 19:41:08 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @panairi on GitHub (Jul 23, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/11503

What is the issue?

An Ollama instance running as a systemd service on an Ubuntu computer was inaccessible from other machines on a Tailscale network. The initial investigation revealed that the Ollama service was only listening on IPv6 (tcp6 :::11434) and not on any IPv4 addresses, which was the root cause of the connection failure.

Troubleshooting Summary
A series of extensive troubleshooting steps were taken to configure the service to listen on IPv4 (0.0.0.0).

Systemd Configuration: Standard and advanced systemd override methods were employed to set the OLLAMA_HOST="0.0.0.0" environment variable. This included both setting the Environment variable and directly modifying the ExecStart command.

Error Resolution: The configuration changes led to a series of secondary errors that were successfully resolved:

Address In Use: A crash loop caused by a lingering "ghost" process was fixed by identifying and terminating the conflicting process.

Permission Denied: A "factory reset" of the application's settings (by moving its home directory) led to a startup failure due to file permissions. This was resolved by manually recreating the home directory and assigning correct ownership to the ollama user.

Final State: After resolving all intermediate configuration conflicts and application errors, the Ollama service starts cleanly and runs without crashing. However, it stubbornly reverts to its original behavior, listening only on IPv6 and completely ignoring the correctly configured OLLAMA_HOST environment variable designed to enable IPv4 listening.

Conclusion
The system's service configuration is now correct and clean according to best practices. The persistence of the issue strongly indicates an application-level bug within this specific version of Ollama, where the binary does not honor its own environment variables for network configuration on the host system. The recommended next step is to report the issue to the Ollama developers and attempt to update the application.

Relevant log output


OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @panairi on GitHub (Jul 23, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/11503 ### What is the issue? An Ollama instance running as a systemd service on an Ubuntu computer was inaccessible from other machines on a Tailscale network. The initial investigation revealed that the Ollama service was only listening on IPv6 (tcp6 :::11434) and not on any IPv4 addresses, which was the root cause of the connection failure. Troubleshooting Summary A series of extensive troubleshooting steps were taken to configure the service to listen on IPv4 (0.0.0.0). Systemd Configuration: Standard and advanced systemd override methods were employed to set the OLLAMA_HOST="0.0.0.0" environment variable. This included both setting the Environment variable and directly modifying the ExecStart command. Error Resolution: The configuration changes led to a series of secondary errors that were successfully resolved: Address In Use: A crash loop caused by a lingering "ghost" process was fixed by identifying and terminating the conflicting process. Permission Denied: A "factory reset" of the application's settings (by moving its home directory) led to a startup failure due to file permissions. This was resolved by manually recreating the home directory and assigning correct ownership to the ollama user. Final State: After resolving all intermediate configuration conflicts and application errors, the Ollama service starts cleanly and runs without crashing. However, it stubbornly reverts to its original behavior, listening only on IPv6 and completely ignoring the correctly configured OLLAMA_HOST environment variable designed to enable IPv4 listening. Conclusion The system's service configuration is now correct and clean according to best practices. The persistence of the issue strongly indicates an application-level bug within this specific version of Ollama, where the binary does not honor its own environment variables for network configuration on the host system. The recommended next step is to report the issue to the Ollama developers and attempt to update the application. ### Relevant log output ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-04-12 19:41:08 -05:00
Author
Owner

@rick-github commented on GitHub (Jul 23, 2025):

#9056

<!-- gh-comment-id:3110466017 --> @rick-github commented on GitHub (Jul 23, 2025): #9056
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7599