How to access remote Ollama server domain
I have ollama hosted on a Mac Studio and have a domain mapped to the Ollama URL on that server: https://ollama.mydomain.com. Unfortunately, it looks like Goose adds :11434/v1/chat/completions to the end of whatever host a user puts into the Ollama setup field. Is there anyway to make sure it doesn't do that and just maps to the endpoint of the URL I provided?
I am assuming that is why I am getting the "Ran into this error: Execution error: error sending request for url" message, because I have Qwen 2.5 in Ollama on the remote server.
Would it be possible to set up a reverse proxy? Like
server {
listen 443 ssl;
server_name ollama.mydomain.com;
location / {
proxy_pass http://127.0.0.1:11434;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
maybe adding the :80 port is enough for goose to not do that ?
I'm running into the same problem.
I have Ollama running on https://ollama.mydomain.com.
When I entered this URL in Goose (Desktop), it would try to access it on port 11434 instead of 443. After some effort, I added the url with the :443 port and now I get this error:
Ran into this error: Execution error: error sending request for url (https://ollama.mydomain.com/v1/chat/completions).
When I click on this link, it goes to the browser and this URL does not exist.
I looked into the Ollama API documentation at https://github.com/ollama/ollama/blob/main/docs/api.md and there all URL's begin with /api/ and there is nothing that ends with /chat/completions or /completions
Also I noticed that if I change the URL within Goose, I always have to Quit and Restart Goose before it takes effect.
Just to add to this defining the port ollama host did override the 11434 default ok for me, thanks! I'm using the open-webui chart which deploys an ollama sub chart as well accessible in k8s cluster via ingress.
🟢
$ goose configure
Welcome to goose! Let's get you set up with a provider.
you can rerun this command later to update your configuration
┌ goose-configure
│
◇ Which model provider should we use?
│ Ollama
│
◇ Provider Ollama requires OLLAMA_HOST, please enter a value
│ https://ollama.somecooldomain.lan:443
│
◇ Model fetch complete
│
◇ Enter a model from that provider:
│ devstral:latest
│
◓ Checking your configuration...
└ Configuration saved successfully
Tip: Run 'goose configure' again to adjust your config or add extensions
So we should default to 443 if we have a fully qualified url?
I'd say, default port for http is 80, for https it is 443. This is just the standard and everybody knows it. If you need another port you specify it.
if custom providers are fully functional, this is a good test case ...
we have custom providers now! give it a whirl!