[GH-ISSUE #2829] Use cloudflared Tunnels to publish ollama service ports, with clients returning with no messages #48231

Open
opened 2026-04-28 07:16:52 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @online2311 on GitHub (Feb 29, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2829

The cloudflared Tunnels are used to publish the ollama service port, and the client uses the enchanted-llm app for the dialogue, with no messages returned. But without cloudflared Tunnels, everything works fine. Is ollama using streaming dialogue using websocket?

Originally created by @online2311 on GitHub (Feb 29, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2829 The cloudflared Tunnels are used to publish the ollama service port, and the client uses the enchanted-llm app for the dialogue, with no messages returned. But without cloudflared Tunnels, everything works fine. Is ollama using streaming dialogue using websocket?
GiteaMirror added the question label 2026-04-28 07:16:52 -05:00
Author
Owner

@sanlega commented on GitHub (Mar 31, 2024):

Did you use localhost/127.0.0.1 or did you exposed the 0.0.0.0 local ip of your machine in the OLLAMA_HOST env variable?

For me adding OLLAMA_HOST="0.0.0.0:PORT" setting a desired port, in my case 5000 worked fine.

I took a bit of time to notice that i was exposing only the localhost no to my machines ip and the redirection wasn't working.

In the cloudflare config for the tunnel i had to set the rule to HTTP. Now it works fine but i still need to query the api with HTTPS instead of HTTP.

<!-- gh-comment-id:2028848375 --> @sanlega commented on GitHub (Mar 31, 2024): Did you use localhost/127.0.0.1 or did you exposed the 0.0.0.0 local ip of your machine in the OLLAMA_HOST env variable? For me adding OLLAMA_HOST="0.0.0.0:PORT" setting a desired port, in my case 5000 worked fine. I took a bit of time to notice that i was exposing only the localhost no to my machines ip and the redirection wasn't working. In the cloudflare config for the tunnel i had to set the rule to HTTP. Now it works fine but i still need to query the api with HTTPS instead of HTTP.
Author
Owner

@thedavc commented on GitHub (Apr 17, 2024):

What settings did you use in cloudflare? I'm encountering the 524 error.

<!-- gh-comment-id:2060557448 --> @thedavc commented on GitHub (Apr 17, 2024): What settings did you use in cloudflare? I'm encountering the 524 error.
Author
Owner

@sanlega commented on GitHub (Apr 17, 2024):

As commented up there I just served it on 0.0.0.0 and using the PORT 5000

<!-- gh-comment-id:2060632122 --> @sanlega commented on GitHub (Apr 17, 2024): As commented up there I just served it on 0.0.0.0 and using the PORT 5000
Author
Owner

@online2311 commented on GitHub (Apr 25, 2024):

Use a normal, temporary solution after passing the litellm proxy.

<!-- gh-comment-id:2076239444 --> @online2311 commented on GitHub (Apr 25, 2024): Use a normal, temporary solution after passing the litellm proxy.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#48231