[GH-ISSUE #3271] Cloudflare Tunnels Not Work After Update 1.2.9 #48527

Closed
opened 2026-04-28 08:47:14 -05:00 by GiteaMirror · 11 comments
Owner

Originally created by @projetosfsi on GitHub (Mar 20, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/3271

What is the issue?

I'm using Cloudfalre Tunnels to connect Ollama to a web domain.

Everything was working fine until the update to version 1.2.9

I started getting the 403 Access Denied error.

Regardless of how I run it, with administrative access or as a regular user, nothing changes.

After downgrading to version 1.2.8 everything worked normally again.

To make sure the problem wasn't with Cloudflare, I noticed that when I changed the routing to another application it opened normally.

What did you expect to see?

The Ollama Api should be working on the domain of my choice as it was before

ollama.mydomain.com

Steps to reproduce

Step 01: Configure Cloudflare Tunnel

https://www.youtube.com/watch?v=ey4u7OUAF3c

Step 02: Open API Endpoint yoursubdomain.domain.com.br

In version 1.2.8 working normally

In version 1.2.9 Not Found - Erro 403

Are there any recent changes that introduced the issue?

Update Version 1.2.8 > 1.2.9

OS

Windows

Architecture

x86

Platform

No response

Ollama version

1.2.9

GPU

Nvidia

GPU info

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 551.76 Driver Version: 551.76 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3070 Ti WDDM | 00000000:06:00.0 On | N/A |
| 0% 37C P8 23W / 290W | 7284MiB / 8192MiB | 6% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

CPU

AMD

Other software

No response

Originally created by @projetosfsi on GitHub (Mar 20, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/3271 ### What is the issue? I'm using Cloudfalre Tunnels to connect Ollama to a web domain. Everything was working fine until the update to version 1.2.9 I started getting the 403 Access Denied error. Regardless of how I run it, with administrative access or as a regular user, nothing changes. After downgrading to version 1.2.8 everything worked normally again. To make sure the problem wasn't with Cloudflare, I noticed that when I changed the routing to another application it opened normally. ### What did you expect to see? The Ollama Api should be working on the domain of my choice as it was before ollama.mydomain.com ### Steps to reproduce Step 01: Configure Cloudflare Tunnel https://www.youtube.com/watch?v=ey4u7OUAF3c Step 02: Open API Endpoint yoursubdomain.domain.com.br In version 1.2.8 working normally In version 1.2.9 Not Found - Erro 403 ### Are there any recent changes that introduced the issue? Update Version 1.2.8 > 1.2.9 ### OS Windows ### Architecture x86 ### Platform _No response_ ### Ollama version 1.2.9 ### GPU Nvidia ### GPU info +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 551.76 Driver Version: 551.76 CUDA Version: 12.4 | |-----------------------------------------+------------------------+----------------------+ | GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 3070 Ti WDDM | 00000000:06:00.0 On | N/A | | 0% 37C P8 23W / 290W | 7284MiB / 8192MiB | 6% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ ### CPU AMD ### Other software _No response_
GiteaMirror added the bug label 2026-04-28 08:47:14 -05:00
Author
Owner

@jmorganca commented on GitHub (Mar 20, 2024):

Hi there, thanks for creating an issue I've added a section to the FAQ on using Ollama with Cloudflare Tunnel: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-use-ollama-with-cloudflare-tunnel

Hope this helps!

<!-- gh-comment-id:2010040767 --> @jmorganca commented on GitHub (Mar 20, 2024): Hi there, thanks for creating an issue I've added a section to the FAQ on using Ollama with Cloudflare Tunnel: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-use-ollama-with-cloudflare-tunnel Hope this helps!
Author
Owner

@projetosfsi commented on GitHub (Mar 20, 2024):

Hi there, thanks for creating an issue I've added a section to the FAQ on using Ollama with Cloudflare Tunnel: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-use-ollama-with-cloudflare-tunnel

Hope this helps!

Unfortunately it doesn't work, when you install Cloudflared it installs the service that will create the tunnel between localhost and the cloudflare server.

After the installation carried out, when trying to execute the command mentioned in the documentation, the terminal cannot complete and is stuck at:

Registered tunnel connection connIndex=0 connection=b213f007-208f-403f-8a96-85e84c7383e4 event=0 ip=198.41.192.27 location=gru14 protocol=quic

<!-- gh-comment-id:2010589808 --> @projetosfsi commented on GitHub (Mar 20, 2024): > Hi there, thanks for creating an issue I've added a section to the FAQ on using Ollama with Cloudflare Tunnel: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-use-ollama-with-cloudflare-tunnel > > Hope this helps! Unfortunately it doesn't work, when you install Cloudflared it installs the service that will create the tunnel between localhost and the cloudflare server. After the installation carried out, when trying to execute the command mentioned in the documentation, the terminal cannot complete and is stuck at: Registered tunnel connection connIndex=0 connection=b213f007-208f-403f-8a96-85e84c7383e4 event=0 ip=198.41.192.27 location=gru14 protocol=quic
Author
Owner

@go2sujeet commented on GitHub (Apr 10, 2024):

@projetosfsi is it working for you?

I'm too facing the same issue

<!-- gh-comment-id:2046598934 --> @go2sujeet commented on GitHub (Apr 10, 2024): @projetosfsi is it working for you? I'm too facing the same issue
Author
Owner

@AjmalShajahan commented on GitHub (Apr 10, 2024):

Hi, I have cloudflared installed as a service for locally managed tunnels I use config.yml .

  - hostname: ollama*
    originRequest:
      httpHostHeader: "localhost:11434"

for remote managed ones you can configure it in Zero trust

  1. In Zero TrustOpen external link, go to Networks > Tunnels.
  2. Choose a tunnel and select Configure.
  3. Select the Public Hostname tab.
  4. Choose a route and select Edit.
  5. Under Additional application settings, modify one or more origin configuration parameters.
  6. Select Save hostname.

Refs:
https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/
https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/remote-management/
https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/#httphostheader

<!-- gh-comment-id:2046610422 --> @AjmalShajahan commented on GitHub (Apr 10, 2024): Hi, I have cloudflared installed as a service for locally managed tunnels I use config.yml . ```yaml - hostname: ollama* originRequest: httpHostHeader: "localhost:11434" ``` for remote managed ones you can configure it in Zero trust 1. In [Zero TrustOpen external link](https://one.dash.cloudflare.com/), go to **Networks** > **Tunnels**. 2. Choose a tunnel and select **Configure**. 3. Select the **Public Hostname** tab. 4. Choose a route and select **Edit**. 5. Under **Additional application settings**, modify one or more [origin configuration parameters](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/). 6. Select **Save hostname**. Refs: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/remote-management/ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/#httphostheader
Author
Owner

@projetosfsi commented on GitHub (Apr 13, 2024):

Hi, I have cloudflared installed as a service for locally managed tunnels I use config.yml .

  - hostname: ollama*
    originRequest:
      httpHostHeader: "localhost:11434"

for remote managed ones you can configure it in Zero trust

  1. In Zero TrustOpen external link, go to Networks > Tunnels.
  2. Choose a tunnel and select Configure.
  3. Select the Public Hostname tab.
  4. Choose a route and select Edit.
  5. Under Additional application settings, modify one or more origin configuration parameters.
  6. Select Save hostname.

Refs: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/remote-management/ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/#httphostheader

Thanks My Friend

<!-- gh-comment-id:2053667286 --> @projetosfsi commented on GitHub (Apr 13, 2024): > Hi, I have cloudflared installed as a service for locally managed tunnels I use config.yml . > > ```yaml > - hostname: ollama* > originRequest: > httpHostHeader: "localhost:11434" > ``` > > for remote managed ones you can configure it in Zero trust > > 1. In [Zero TrustOpen external link](https://one.dash.cloudflare.com/), go to **Networks** > **Tunnels**. > 2. Choose a tunnel and select **Configure**. > 3. Select the **Public Hostname** tab. > 4. Choose a route and select **Edit**. > 5. Under **Additional application settings**, modify one or more [origin configuration parameters](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/). > 6. Select **Save hostname**. > > Refs: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/remote-management/ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/#httphostheader Thanks My Friend
Author
Owner

@quentinzhang commented on GitHub (Jun 19, 2024):

I added "localhost:11434" to HTTP Host Header in Additional application settings, and it works now.

<!-- gh-comment-id:2177440481 --> @quentinzhang commented on GitHub (Jun 19, 2024): I added "localhost:11434" to HTTP Host Header in **Additional application settings**, and it works now.
Author
Owner

@matsyui commented on GitHub (Sep 9, 2024):

Still no hope ;(

image
image

but it works fine when access it to browser and thunder client

image

I added "localhost:11434" to HTTP Host Header in Additional application settings, and it works now.

<!-- gh-comment-id:2336953702 --> @matsyui commented on GitHub (Sep 9, 2024): Still no hope ;( ![image](https://github.com/user-attachments/assets/f944d329-658d-4dbc-ace7-a6d4ded24d04) ![image](https://github.com/user-attachments/assets/04fbdc16-b5eb-44ac-8080-a1fe6c05f305) but it works fine when access it to browser and thunder client ![image](https://github.com/user-attachments/assets/9afcb7d2-4261-40eb-880c-47ef41badc74) > I added "localhost:11434" to HTTP Host Header in **Additional application settings**, and it works now.
Author
Owner

@matsyui commented on GitHub (Sep 9, 2024):

Hi there, thanks for creating an issue I've added a section to the FAQ on using Ollama with Cloudflare Tunnel: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-use-ollama-with-cloudflare-tunnel

Hope this helps!

didnt worked just created a different URL (not my domain

<!-- gh-comment-id:2336978908 --> @matsyui commented on GitHub (Sep 9, 2024): > Hi there, thanks for creating an issue I've added a section to the FAQ on using Ollama with Cloudflare Tunnel: https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-use-ollama-with-cloudflare-tunnel > > Hope this helps! didnt worked just created a different URL (not my domain
Author
Owner

@johnykes commented on GitHub (Nov 7, 2024):

Hi, I have cloudflared installed as a service for locally managed tunnels I use config.yml .

  - hostname: ollama*
    originRequest:
      httpHostHeader: "localhost:11434"

for remote managed ones you can configure it in Zero trust

  1. In Zero TrustOpen external link, go to Networks > Tunnels.
  2. Choose a tunnel and select Configure.
  3. Select the Public Hostname tab.
  4. Choose a route and select Edit.
  5. Under Additional application settings, modify one or more origin configuration parameters.
  6. Select Save hostname.

Refs: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/remote-management/ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/#httphostheader

bro I wasted 3 hours searching for the 'problem'. thank you so much !!!!

<!-- gh-comment-id:2462976557 --> @johnykes commented on GitHub (Nov 7, 2024): > Hi, I have cloudflared installed as a service for locally managed tunnels I use config.yml . > > ```yaml > - hostname: ollama* > originRequest: > httpHostHeader: "localhost:11434" > ``` > > for remote managed ones you can configure it in Zero trust > > 1. In [Zero TrustOpen external link](https://one.dash.cloudflare.com/), go to **Networks** > **Tunnels**. > 2. Choose a tunnel and select **Configure**. > 3. Select the **Public Hostname** tab. > 4. Choose a route and select **Edit**. > 5. Under **Additional application settings**, modify one or more [origin configuration parameters](https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/). > 6. Select **Save hostname**. > > Refs: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/local-management/ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/remote-management/ https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/configure-tunnels/origin-configuration/#httphostheader bro I wasted 3 hours searching for the 'problem'. thank you so much !!!!
Author
Owner

@dr4kedk commented on GitHub (Aug 14, 2025):

Still no hope ;(

image image

but it works fine when access it to browser and thunder client

image

I added "localhost:11434" to HTTP Host Header in Additional application settings, and it works now.

Did you solve this? I'm facing same issues :(

<!-- gh-comment-id:3186684079 --> @dr4kedk commented on GitHub (Aug 14, 2025): > Still no hope ;( > > ![image](https://github.com/user-attachments/assets/f944d329-658d-4dbc-ace7-a6d4ded24d04) ![image](https://github.com/user-attachments/assets/04fbdc16-b5eb-44ac-8080-a1fe6c05f305) > > but it works fine when access it to browser and thunder client > > ![image](https://github.com/user-attachments/assets/9afcb7d2-4261-40eb-880c-47ef41badc74) > > > I added "localhost:11434" to HTTP Host Header in **Additional application settings**, and it works now. Did you solve this? I'm facing same issues :(
Author
Owner

@projetosfsi commented on GitHub (Aug 14, 2025):

Still no hope ;(
image image
but it works fine when access it to browser and thunder client
image

I added "localhost:11434" to HTTP Host Header in Additional application settings, and it works now.

Did you solve this? I'm facing same issues :(

if you have the webui on the same docker network as ollama, it would be more efficient to make it connect using the docker network

<!-- gh-comment-id:3187084132 --> @projetosfsi commented on GitHub (Aug 14, 2025): > > Still no hope ;( > > ![image](https://github.com/user-attachments/assets/f944d329-658d-4dbc-ace7-a6d4ded24d04) ![image](https://private-user-images.githubusercontent.com/62344860/365487204-04fbdc16-b5eb-44ac-8080-a1fe6c05f305.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTUxNTE4NTIsIm5iZiI6MTc1NTE1MTU1MiwicGF0aCI6Ii82MjM0NDg2MC8zNjU0ODcyMDQtMDRmYmRjMTYtYjVlYi00NGFjLTgwODAtYTFmZTZjMDVmMzA1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTA4MTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwODE0VDA2MDU1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY3MDRmYzYzNTU5YmFlZjQ0Yjk1NGZkZjE3ZTlmY2ExYTM1NTAyMmQ4ZWU0ZWNjMDk0NmJkYWJhOTBiODM0MTkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.XNOJSbnhyVWWbOu0UrMU-asSgmoezL1FEoGENMoMAXc) > > but it works fine when access it to browser and thunder client > > ![image](https://github.com/user-attachments/assets/9afcb7d2-4261-40eb-880c-47ef41badc74) > > > I added "localhost:11434" to HTTP Host Header in **Additional application settings**, and it works now. > > Did you solve this? I'm facing same issues :( if you have the webui on the same docker network as ollama, it would be more efficient to make it connect using the docker network
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#48527