Repository navigation
Connecting Odysseus in Docker to Ollama on the Linux host #6661
kfurkanbek
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Connecting Odysseus in Docker to Ollama on the Linux host
I run Odysseus in Docker and Ollama directly on my Linux laptop.
Ollama had qwen3:4b installed, and its API worked on the host, but Odysseus couldn’t find any models.
The problem was that Ollama initially listened only on 127.0.0.1:11434.
After changing it to listen on all interfaces, requests from the Odysseus container still timed out.
The remaining issue was UFW blocking traffic from the Docker network.
1. Confirm Ollama has the model
On the host, run:
If the response lists your model, Ollama is serving it. You don’t need to run
ollama run just to make it appear in the model list.
2. Configure Ollama to accept connections from Docker
For a systemd-managed Ollama service, create an override:
Verify that Ollama is listening beyond localhost:
The address should show *:11434 or 0.0.0.0:11434, rather than only
127.0.0.1:11434.
3. Find the Docker network gateway
Use the Odysseus container name to inspect its Docker network:
My Odysseus Docker network used gateway 172.18.0.1 and subnet 172.18.0.0/16.
4. Allow the Docker network through UFW
This was the step that fixed the connection for me:
Use the subnet reported for your Docker network if it differs.
5. Test from inside the Odysseus container
A successful request from the host does not confirm that the container can reach
Ollama. Test from inside the Odysseus container:
The response should list your model, such as qwen3:4b.
6. Configure the endpoint in Odysseus
Set the OpenAI-compatible endpoint to:
Then refresh the model list and select the installed model.
Security note
Binding Ollama to 0.0.0.0 makes it reachable on network interfaces.
Restrict access with your firewall, allow only the Docker network you need, and don’t forward port 11434 from your router.
And to remove the rule:
All reactions