Hi everyone! I recently set up Ollama/Mixtral:8x7b on my MacBook Pro M4 and installed Docker as well. Now, I'm trying to get OpenClaw running with a command that includes cloning the OpenClaw GitHub repository and running the Docker setup script. However, when I tried to add Ollama during the setup, I encountered a 404 error. Ollama works perfectly on my machine at 'http://localhost:11434/', but using 'http://host.docker.internal:11434/' in Docker isn't working. Since I need OpenClaw to run in Docker while keeping Ollama outside to utilize my GPU, should I be adding any environment variables or extra host configurations to resolve this? Any insights would be greatly appreciated! Cheers!
2 Answers
The 'host.docker.internal' trick can be tricky on Mac, depending on your version of Docker Desktop. Try adding '--add-host=host.docker.internal:host-gateway' to your docker run command, or set an environment variable like 'OLLAMA_HOST=0.0.0.0' to bind Ollama to all interfaces. If you want to avoid the Docker networking complications, there's also ClawHosters.com which can connect to your local Ollama through ZeroTier VPN. This setup keeps everything peer-to-peer and encrypted while running your OpenClaw instance. Just a thought in case the networking issues become too much!
You should try exposing 'host.docker.internal' as an extra host for your Docker container. This can help in resolving the 404 issue you're facing.

Related Questions
Neural Network Simulation Tool
xAI Grok Token Calculator
DeepSeek Token Calculator
Google Gemini Token Calculator
Meta LLaMA Token Calculator
OpenAI Token Calculator