HTTPS frontend for OpenWebUI (reverse proxy with websockets)

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
DanielC
-


Joined: 19 Jan 2008
Posts: 8
Location: France

PostPosted: Mon Mar 31, 2025 5:00 pm    Post subject: HTTPS frontend for OpenWebUI (reverse proxy with websockets) Reply with quote

Hi,
Has anyone managed to get OpenWebUI (v0.5.20) working through through the reverse proxy ?
I seem to either get a 500 Internal Server Error with this shown in OpenWebUI Docker Logs :
Code:
assert scope["type"] == "http"
AssertionError
Using this configuration :
Code:
Local Virtual Path: /
Remote Host: 127.0.0.1
Remote Port: 8080
Remote Virtual Path: /
HTTPS: No
Fix URLs in Cookies: Yes
Fix URLs in Location Response Headers: Yes
Preserve the "Host" Header: Yes
Upgrade: websocket
Connection: upgrade
Sec-WebSocket-Key: ************************
Sec-WebSocket-Version: 13
Timeout : 600 second(s)
Connection Timeout: 600 second(s)
Or i get a blank page (200 OK) with this shown in OpenWebUI Docker Logs :
Code:
uvicorn.protocols.http.httptools_impl:send:476 - 127.0.0.1:0 - "GET / HTTP/1.1" 200 - {}
Using this configuration :
Code:
Local Virtual Path: /
Remote Host: 127.0.0.1
Remote Port: 8080
Remote Virtual Path: /
HTTPS: No
Fix URLs in Cookies: Yes
Fix URLs in Location Response Headers: Yes
Preserve the "Host" Header: Yes
Timeout : 600 second(s)
Connection Timeout: 600 second(s)
I have tried various combinations :
- One proxy for everything under / with upgrade
- Two proxys with one for / without upgrade and one for /ws/socket.io/ with upgrade
- Various combinations of preserve host or not
- Using X-Real-IP, X-Forwarded-For, X-Forwarded-Proto, X-Forwarded-Port or not
- Using Access-Control-Allow-Origin, Access-Control-Allow-Methods, Access-Control-Allow-Headers, or not
- Using the root of a subdomain or using 127.0.0.1
- Using HTTPS or using only HTTP
I was using a remote Abyss install, but I also did a fresh install directly on the host just to test, same results.
The docker instance is currently running via this command, but others have been tried, with or without socketio and cors etc. :
Code:
docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 -e SOCKETIO_PATH=/ws/socket.io -e CORS_ALLOW_ORIGIN=* --name open-webui --restart always ghcr.io/open-webui/open-webui:main
I can access the OpenWebUI perfectly fine on http://127.0.0.1:8080/
OpenWebUI also works fine with an NGINX reverse proxy using just the two upgrade headers.

Am I stupidly missing or misunderstanding something incredibly simple or is there a deeper problem, maybe related to the websockets ?
_________________
~ Dan
www.danielclayton.com
Back to top View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group