Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossible to connect to ollama #93

Open
MatthewDlr opened this issue Jan 21, 2025 · 3 comments
Open

Impossible to connect to ollama #93

MatthewDlr opened this issue Jan 21, 2025 · 3 comments

Comments

@MatthewDlr
Copy link
Contributor

Hey there,

Recently, I struggled to get connected to the web app to OLLAMA outside of localhost.
I get an error 500 every time I load the website: GET https://ollama/api/tags 500 (Internal Server Error)

I think this might have something to do with OLLAMA_ORIGINS, but the docs on this are not helpful.
By any chance, do you have tips to get connected to OLLAMA from your project?

Thanks!

@jakobhoeg
Copy link
Owner

Hi @MatthewDlr,

First off, sorry for the late response!
May I ask where the UI is hosted?

I just pushed some changes in #95, could you try updating and then change the .env from NEXT_PUBLIC_OLLAMA_URL to OLLAMA_URL? I also added a Docker guide in the readme.

@MatthewDlr
Copy link
Contributor Author

No worries mate!

My UI is hosted here
I have not changed anything yet but I guess that from ollama you have to allow some origins right?

@jakobhoeg
Copy link
Owner

jakobhoeg commented Feb 4, 2025

Ah, I see.
It won't work on a hosted instance, since the server api routes resolves 127.0.0.1 as the IP of hosted server’s own loopback interface, not your local machine.

I think to make it work, you'd have to probably host your Ollama server somewhere over HTTPS. For instance using Cloudflare Tunnel or Ngrok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants