Open-WebUI ; Issues with Nginx proxy #51

Open
opened 2025-11-20 21:01:20 -05:00 by sickprodigy · 16 comments
Owner

So trying to use it with redis isn't working causes weird json error.

So trying to use it with redis isn't working causes weird json error.
Author
Owner

Also ordered p100 to go with the server later. Gotta figure out how to code it into the docker file too

Also ordered p100 to go with the server later. Gotta figure out how to code it into the docker file too
Author
Owner

open-webui appears to be logging in according to console logs, the screen just isn't wanting to load

open-webui appears to be logging in according to console logs, the screen just isn't wanting to load
Author
Owner

notifications get through, but still not loading web page.

notifications get through, but still not loading web page.
Author
Owner

https://docs.openwebui.com/tutorials/https/nginx

CORS_ALLOW_ORIGIN="https://openwebui.hello.duckdns.org"

the above breaks and has json error for some reason.

Add your url to open-webui (otherwise getting HTTPS error):

Go to your open-webui → Admin Panel → Settings → General
In the Webhook URL text field, enter your URL through which you will connect to your open-webui via Nginx reverse proxy. Example: hello.duckdns.org (not essential with this one) or openwebui.hello.duckdns.org (essential with this one).

did the above, but didn't work. Still have this saved as
https://open-webui.rcs1.top

maybe that's correct or it needs

https://open-webui.rcs1.top/webhook

like the example it shows in open-webui and not docs...

https://docs.openwebui.com/tutorials/https/nginx CORS_ALLOW_ORIGIN="https://openwebui.hello.duckdns.org" the above breaks and has json error for some reason. Add your url to open-webui (otherwise getting HTTPS error): Go to your open-webui → Admin Panel → Settings → General In the Webhook URL text field, enter your URL through which you will connect to your open-webui via Nginx reverse proxy. Example: hello.duckdns.org (not essential with this one) or openwebui.hello.duckdns.org (essential with this one). did the above, but didn't work. Still have this saved as https://open-webui.rcs1.top maybe that's correct or it needs https://open-webui.rcs1.top/webhook like the example it shows in open-webui and not docs...
Author
Owner

Updated cors bs that don't work
3f165ca650

  - CORS_ALLOW_ORIGIN=https://open-webui.rcs1.top # ,http://rcs1.top,https://open-webui,http://192.168.86.239,http://localhost:3030
  - WEBUI_URL=https://open-webui.rcs1.top # ,http://rcs1.top,https://open-webui,http://192.168.86.239,http://localhost:3030

websocket issues:
https://github.com/open-webui/open-webui/discussions/18250

  # - ENABLE_WEBSOCKET_SUPPORT=true # didn't work commented out

Now trying to downgrade from 0.6.36 to 0.6.34 see if that works

Doesn't seem to be working with cors bs, gonna try commenting that out.

Error thrown

JSON.parse: unexpected character at line 1 column 1 of the JSON data

Alright commenting out cors and webui_url works locally, but not behind reverse proxy. idk wtf bro

Updated cors bs that don't work https://github.com/open-webui/docs/commit/3f165ca650a7af8b144a4486cd1e7a5dbd56daa2 - CORS_ALLOW_ORIGIN=https://open-webui.rcs1.top # ,http://rcs1.top,https://open-webui,http://192.168.86.239,http://localhost:3030 - WEBUI_URL=https://open-webui.rcs1.top # ,http://rcs1.top,https://open-webui,http://192.168.86.239,http://localhost:3030 websocket issues: https://github.com/open-webui/open-webui/discussions/18250 # - ENABLE_WEBSOCKET_SUPPORT=true # didn't work commented out Now trying to downgrade from 0.6.36 to 0.6.34 see if that works Doesn't seem to be working with cors bs, gonna try commenting that out. ## Error thrown `JSON.parse: unexpected character at line 1 column 1 of the JSON data` Alright commenting out cors and webui_url works locally, but not behind reverse proxy. idk wtf bro
Author
Owner

Setting ENABLE_WEBSOCKET_SUPPORT=false did the trick -- now there are a lot of HTTP requests, but it is working.

the above did not work for me whether true or false. Downgrade didn't work. idk. stupid

Setting ENABLE_WEBSOCKET_SUPPORT=false did the trick -- now there are a lot of HTTP requests, but it is working. the above did not work for me whether true or false. Downgrade didn't work. idk. stupid
Author
Owner

The connection to wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket was interrupted while the page was loading. websocket.js:43:27
GET
wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket
NS_ERROR_WEBSOCKET_CONNECTION_REFUSED

Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. websocket.js:43:27
Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. websocket.js:43:27
The connection to wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket was interrupted while the page was loading. websocket.js:43:27
Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. websocket.js:43:27
The connection to wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket was interrupted while the page was loading. websocket.js:43:27
GET
wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket
NS_ERROR_WEBSOCKET_CONNECTION_REFUSED

Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. websocket.js:43:27
Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. websocket.js:43:27
The connection to wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket was interrupted while the page was loading. websocket.js:43:27

The connection to wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket was interrupted while the page was loading. [websocket.js:43:27](https://open-webui.rcs1.top/node_modules/engine.io-client/build/esm/transports/websocket.js) GET wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket NS_ERROR_WEBSOCKET_CONNECTION_REFUSED Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. [websocket.js:43:27](https://open-webui.rcs1.top/node_modules/engine.io-client/build/esm/transports/websocket.js) Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. [websocket.js:43:27](https://open-webui.rcs1.top/node_modules/engine.io-client/build/esm/transports/websocket.js) The connection to wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket was interrupted while the page was loading. [websocket.js:43:27](https://open-webui.rcs1.top/node_modules/engine.io-client/build/esm/transports/websocket.js) Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. [websocket.js:43:27](https://open-webui.rcs1.top/node_modules/engine.io-client/build/esm/transports/websocket.js) The connection to wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket was interrupted while the page was loading. [websocket.js:43:27](https://open-webui.rcs1.top/node_modules/engine.io-client/build/esm/transports/websocket.js) GET wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket NS_ERROR_WEBSOCKET_CONNECTION_REFUSED Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. [websocket.js:43:27](https://open-webui.rcs1.top/node_modules/engine.io-client/build/esm/transports/websocket.js) Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. [websocket.js:43:27](https://open-webui.rcs1.top/node_modules/engine.io-client/build/esm/transports/websocket.js) The connection to wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket was interrupted while the page was loading. [websocket.js:43:27](https://open-webui.rcs1.top/node_modules/engine.io-client/build/esm/transports/websocket.js) ​
Author
Owner
extra_hosts:
  - "host.docker.internal:host-gateway"

from

https://github.com/krausality/nginx-https-open-webui-proxy/blob/main/docker-compose.yml

see if it works

extra_hosts: - "host.docker.internal:host-gateway" from https://github.com/krausality/nginx-https-open-webui-proxy/blob/main/docker-compose.yml see if it works
Author
Owner

wonder if this has something to do with it:

<html> ENABLE_OAUTH_ID_TOKEN_COOKIE | true | For backward compatibility. Controls if the legacy oauth_id_token cookie is set. Recommended to set to false. -- | -- | -- </html>

Critical Configuration Notes:

WEBUI_URL Must Be Set First: Configure WEBUI_URL in the Admin Panel before enabling OAuth, as it's used for redirect URIs.

Persistent Config Behavior: When ENABLE_OAUTH_PERSISTENT_CONFIG=true (default), OAuth settings are stored in the database after first launch. To change environment variables after initial setup, either:
    Set ENABLE_OAUTH_PERSISTENT_CONFIG=false to always read from environment variables
    Update settings through the Admin Panel instead of environment variables

Required Variables: Always verify you're using the exact variable names from the [environment configuration documentation](https://docs.openwebui.com/getting-started/env-configuration/). Common mistakes include using non-existent variables like OIDC_CONFIG.

although this whole page is about oauth which is not basic authentication, maybe it's auto adding some of this shit which in turn throws off web sockets. Idk, should still be in readable json format.

Link for data: https://docs.openwebui.com/features/auth/sso/

wonder if this has something to do with it: <html><body> <!--StartFragment--> ENABLE_OAUTH_ID_TOKEN_COOKIE | true | For backward compatibility. Controls if the legacy oauth_id_token cookie is set. Recommended to set to false. -- | -- | -- <!--EndFragment--> </body> </html> Critical Configuration Notes: WEBUI_URL Must Be Set First: Configure WEBUI_URL in the Admin Panel before enabling OAuth, as it's used for redirect URIs. Persistent Config Behavior: When ENABLE_OAUTH_PERSISTENT_CONFIG=true (default), OAuth settings are stored in the database after first launch. To change environment variables after initial setup, either: Set ENABLE_OAUTH_PERSISTENT_CONFIG=false to always read from environment variables Update settings through the Admin Panel instead of environment variables Required Variables: Always verify you're using the exact variable names from the [environment configuration documentation](https://docs.openwebui.com/getting-started/env-configuration/). Common mistakes include using non-existent variables like OIDC_CONFIG. although this whole page is about oauth which is not basic authentication, maybe it's auto adding some of this shit which in turn throws off web sockets. Idk, should still be in readable json format. Link for data: https://docs.openwebui.com/features/auth/sso/
Author
Owner
Env Variables https://docs.openwebui.com/getting-started/env-configuration#redis Trusted header look at later: https://docs.openwebui.com/features/auth/sso/
Author
Owner
  - CORS_ALLOW_ORIGIN=https://open-webui.rcs1.top;http://rcs1.top;http://open-webui;http://open-webui:8080;http://192.168.86.239;http://192.168.86.239:3030;http://localhost:3030
  - WEBUI_URL=https://open-webui.rcs1.top;http://rcs1.top;http://open-webui;http://open-webui:8080;http://192.168.86.239;http://192.168.86.239:3030;http://localhost:3030

guess not having http://192.168.86.239:3030, was causing local version not to work.

- CORS_ALLOW_ORIGIN=https://open-webui.rcs1.top;http://rcs1.top;http://open-webui;http://open-webui:8080;http://192.168.86.239;http://192.168.86.239:3030;http://localhost:3030 - WEBUI_URL=https://open-webui.rcs1.top;http://rcs1.top;http://open-webui;http://open-webui:8080;http://192.168.86.239;http://192.168.86.239:3030;http://localhost:3030 guess not having http://192.168.86.239:3030, was causing local version not to work.
Author
Owner
  - CORS_ALLOW_ORIGIN=https://open-webui.rcs1.top;https://rcs1.top;http://open-webui;http://open-webui:8080;http://192.168.86.239;http://192.168.86.239:3030;http://localhost:3030;http://192.168.86.1
  - WEBUI_URL=https://open-webui.rcs1.top;https://rcs1.top;http://open-webui;http://open-webui:8080;http://192.168.86.239;http://192.168.86.239:3030;http://localhost:3030;http://192.168.86.1

tried adding http://192.168.86.1 to get reverse proxy working, figure it would come from router basically port 80? maybe need to add port 80

- CORS_ALLOW_ORIGIN=https://open-webui.rcs1.top;https://rcs1.top;http://open-webui;http://open-webui:8080;http://192.168.86.239;http://192.168.86.239:3030;http://localhost:3030;http://192.168.86.1 - WEBUI_URL=https://open-webui.rcs1.top;https://rcs1.top;http://open-webui;http://open-webui:8080;http://192.168.86.239;http://192.168.86.239:3030;http://localhost:3030;http://192.168.86.1 tried adding http://192.168.86.1 to get reverse proxy working, figure it would come from router basically port 80? maybe need to add port 80
Author
Owner

Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket.

I wonder if it's because of the cors thing or something id, wss:// isn't in that

tried that too, wasn't the issue.

  • SOCKET_CORS_ALLOW_ORIGIN=wss://open-webui.rcs1.top
Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data Firefox can’t establish a connection to the server at wss://open-webui.rcs1.top/ws/socket.io/?EIO=4&transport=websocket. I wonder if it's because of the cors thing or something id, wss:// isn't in that tried that too, wasn't the issue. - SOCKET_CORS_ALLOW_ORIGIN=wss://open-webui.rcs1.top
Author
Owner

2025-11-21 18:19:47.588 | INFO | open_webui.models.auths:authenticate_user:126 - authenticate_user: prodigysick@gmail.com

2025-11-21 18:19:47.895 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.86.1:0 - "POST /api/v1/auths/signin HTTP/1.1" 200

2025-11-21 18:19:47.922 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.86.1:0 - "GET /api/config HTTP/1.1" 200

2025-11-21 18:20:00.641 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.20.0.37:35342 - "GET / HTTP/1.1" 200

2025-11-21 18:20:17.786 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.86.139:54730 - "GET /_app/version.json HTTP/1.1" 304

using :
- CORS_ALLOW_ORIGIN=https://open-webui.rcs1.top;https://rcs1.top;http://open-webui;http://open-webui:8080;https://open-webui:8080;http://192.168.86.239;http://192.168.86.239:3030;http://localhost:3030;http://192.168.86.1:80;http://192.168.86.1:443

didn't work for reverse proxy. So a bunch of these variables just seem pointless now ig

2025-11-21 18:19:47.588 | INFO | open_webui.models.auths:authenticate_user:126 - authenticate_user: prodigysick@gmail.com 2025-11-21 18:19:47.895 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.86.1:0 - "POST /api/v1/auths/signin HTTP/1.1" 200 2025-11-21 18:19:47.922 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.86.1:0 - "GET /api/config HTTP/1.1" 200 2025-11-21 18:20:00.641 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.20.0.37:35342 - "GET / HTTP/1.1" 200 2025-11-21 18:20:17.786 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.86.139:54730 - "GET /_app/version.json HTTP/1.1" 304 using : - CORS_ALLOW_ORIGIN=https://open-webui.rcs1.top;https://rcs1.top;http://open-webui;http://open-webui:8080;https://open-webui:8080;http://192.168.86.239;http://192.168.86.239:3030;http://localhost:3030;http://192.168.86.1:80;http://192.168.86.1:443 didn't work for reverse proxy. So a bunch of these variables just seem pointless now ig
sickprodigy added the Kind/Bug
Priority
Medium
Status
Need More Info
labels 2025-11-21 20:42:04 -05:00
Author
Owner

i did end up getting redis and the variable cors_allow_origin to work in template provided
https://gitea.rcs1.top/sickprodigy/home-server/src/branch/main/open-webui/docker-compose.yml

but it still doesn't allow nginx to work properly.

key part that helped, having local at least tap right with "http://192.168.1.239:3030" in cors_allow_origin. along with gateway since it seems requests would look like they are coming from there also.

I think now it kind of depends on open-webui to fix the way they allow connections through container or something. Maybe nginx is stripping some variables before sending it through. Could check that somehow I'm sure.

i did end up getting redis and the variable cors_allow_origin to work in template provided https://gitea.rcs1.top/sickprodigy/home-server/src/branch/main/open-webui/docker-compose.yml but it still doesn't allow nginx to work properly. key part that helped, having local at least tap right with "http://192.168.1.239:3030" in cors_allow_origin. along with gateway since it seems requests would look like they are coming from there also. I think now it kind of depends on open-webui to fix the way they allow connections through container or something. Maybe nginx is stripping some variables before sending it through. Could check that somehow I'm sure.
Author
Owner

ordered a fan, graphics card, and fan housing to go with this. Not exactly related but figured I'd mention here. After several updates, the reverse proxy link still isn't working. Not quite sure what to do to fix.

ordered a fan, graphics card, and fan housing to go with this. Not exactly related but figured I'd mention here. After several updates, the reverse proxy link still isn't working. Not quite sure what to do to fix.
Sign in to join this conversation.