[GH-ISSUE #5714] Swagger docs require an Internet connection #52762

Closed
opened 2026-05-05 13:52:37 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @gaby on GitHub (Sep 26, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5714

Bug Report

Installation Method

  • Docker

Environment

  • Latest Open-WebUI
  • Both Firefox and Chrome

Expected Behavior:

Visiting the API docs page would render the Swagger page.

Actual Behavior:

Swagger / API docs do not render.

Description

Bug Summary:
While Open-WebUI relies on FastAPI by default it requires internet to download the JS/CSS files for the Swagger docs.

This is heavily documented here: https://github.com/fastapi/fastapi/issues/608

And can be easily solved by using the fastapi offline package here: https://github.com/turettn/fastapi_offline

Originally created by @gaby on GitHub (Sep 26, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5714 # Bug Report ## Installation Method - Docker ## Environment - Latest Open-WebUI - Both Firefox and Chrome ## Expected Behavior: Visiting the API docs page would render the Swagger page. ## Actual Behavior: Swagger / API docs do not render. ## Description **Bug Summary:** While Open-WebUI relies on FastAPI by default it requires internet to download the JS/CSS files for the Swagger docs. This is heavily documented here: https://github.com/fastapi/fastapi/issues/608 And can be easily solved by using the `fastapi offline` package here: https://github.com/turettn/fastapi_offline
GiteaMirror added the good first issuenon-core labels 2026-05-05 13:52:37 -05:00
Author
Owner

@tjbck commented on GitHub (Sep 27, 2024):

Will not be using fastapi_offline but investigating at the moment.

<!-- gh-comment-id:2379188972 --> @tjbck commented on GitHub (Sep 27, 2024): Will not be using [fastapi_offline](https://github.com/turettn/fastapi_offline) but investigating at the moment.
Author
Owner

@gaby commented on GitHub (Sep 27, 2024):

@tjbck There's a solution here that doesnt use a dependency:

https://github.com/fastapi/fastapi/discussions/8500#discussioncomment-5152408

The versions of the .js/.css files prob need to be updated since it was posted 2 years ago.

<!-- gh-comment-id:2379204320 --> @gaby commented on GitHub (Sep 27, 2024): @tjbck There's a solution here that doesnt use a dependency: https://github.com/fastapi/fastapi/discussions/8500#discussioncomment-5152408 The versions of the .js/.css files prob need to be updated since it was posted 2 years ago.
Author
Owner

@tjbck commented on GitHub (Sep 27, 2024):

PR welcome!

<!-- gh-comment-id:2379205559 --> @tjbck commented on GitHub (Sep 27, 2024): PR welcome!
Author
Owner

@lee-b commented on GitHub (Sep 28, 2024):

@tjbck There's a solution here that doesnt use a dependency:

fastapi/fastapi#8500 (comment)

The versions of the .js/.css files prob need to be updated since it was posted 2 years ago.

Would suggest that tracking these updates is important, cybersecurity wise. The build process should probably pull the latest versions in automatically, subject to subsequent scans.

I tend to agree that using fastapi_offline here would mostly just introduce new supply chain security concerns, no guarantees of any improved maintenance, so that it's probably simpler to maintain this in-project for now.

Longer-term, the solution is probably to raise this issue with the fastapi team, and have them fix it there.

<!-- gh-comment-id:2380554443 --> @lee-b commented on GitHub (Sep 28, 2024): > @tjbck There's a solution here that doesnt use a dependency: > > [fastapi/fastapi#8500 (comment)](https://github.com/fastapi/fastapi/discussions/8500#discussioncomment-5152408) > > The versions of the .js/.css files prob need to be updated since it was posted 2 years ago. Would suggest that tracking these updates is important, cybersecurity wise. The build process should probably pull the latest versions in automatically, subject to subsequent scans. I tend to agree that using fastapi_offline here would mostly just introduce new supply chain security concerns, no guarantees of any improved maintenance, so that it's probably simpler to maintain this in-project for now. Longer-term, the solution is probably to raise this issue with the fastapi team, and have them fix it there.
Author
Owner

@gaby commented on GitHub (Sep 28, 2024):

@tjbck There's a solution here that doesnt use a dependency:
fastapi/fastapi#8500 (comment)
The versions of the .js/.css files prob need to be updated since it was posted 2 years ago.

Would suggest that tracking these updates is important, cybersecurity wise. The build process should probably pull the latest versions in automatically, subject to subsequent scans.

I tend to agree that using fastapi_offline here would mostly just introduce new supply chain security concerns, no guarantees of any improved maintenance, so that it's probably simpler to maintain this in-project for now.

Longer-term, the solution is probably to raise this issue with the fastapi team, and have them fix it there.

I has been brought up in the fastapi repo multiple times and there's still no built-in way of doing this.

Both Open-WebUI and Ollama use a ton of dependencie, I don't see anyone bringing up the "supply chain" concerns on those.

Whichever solution works, I just want to be able to use Open-WebUI offline as it's README says. That is currently not possible, a lot of features don't work at all.

<!-- gh-comment-id:2380882118 --> @gaby commented on GitHub (Sep 28, 2024): > > @tjbck There's a solution here that doesnt use a dependency: > > [fastapi/fastapi#8500 (comment)](https://github.com/fastapi/fastapi/discussions/8500#discussioncomment-5152408) > > The versions of the .js/.css files prob need to be updated since it was posted 2 years ago. > > Would suggest that tracking these updates is important, cybersecurity wise. The build process should probably pull the latest versions in automatically, subject to subsequent scans. > > I tend to agree that using fastapi_offline here would mostly just introduce new supply chain security concerns, no guarantees of any improved maintenance, so that it's probably simpler to maintain this in-project for now. > > Longer-term, the solution is probably to raise this issue with the fastapi team, and have them fix it there. I has been brought up in the fastapi repo multiple times and there's still no built-in way of doing this. Both Open-WebUI and Ollama use a ton of dependencie, I don't see anyone bringing up the "supply chain" concerns on those. Whichever solution works, I just want to be able to use Open-WebUI offline as it's README says. That is currently *not* possible, a lot of features don't work at all.
Author
Owner

@flefevre commented on GitHub (Nov 12, 2024):

@gaby for a newbee like me could you give the url to access the initial fastapi of open-webui?
http(s)://localhost:port/XXX ?
Thanks

<!-- gh-comment-id:2469820564 --> @flefevre commented on GitHub (Nov 12, 2024): @gaby for a newbee like me could you give the url to access the initial fastapi of open-webui? http(s)://localhost:port/XXX ? Thanks
Author
Owner

@semidark commented on GitHub (Nov 21, 2024):

https://docs.openwebui.com/getting-started/advanced-topics/api-endpoints/#swagger-documentation-links

I am also having trouble finding the API Docs in my locally hosted Open-WebUI instance.

http://localhost:3000/api/v1/docs returns

{"detail":"Not Found"}

Though the API is working. as described in the Link to the docs.

<!-- gh-comment-id:2490961005 --> @semidark commented on GitHub (Nov 21, 2024): https://docs.openwebui.com/getting-started/advanced-topics/api-endpoints/#swagger-documentation-links I am also having trouble finding the API Docs in my locally hosted Open-WebUI instance. http://localhost:3000/api/v1/docs returns ``` {"detail":"Not Found"} ``` Though the API is working. as described in the Link to the docs.
Author
Owner

@lililililli1 commented on GitHub (Nov 24, 2024):

是的,在完全断网的情况下webui完全不能使用

<!-- gh-comment-id:2495875842 --> @lililililli1 commented on GitHub (Nov 24, 2024): 是的,在完全断网的情况下webui完全不能使用
Author
Owner

@gaby commented on GitHub (Dec 14, 2024):

@semidark I was getting that error until I added an environment variable to docker run:

-e ENV=dev

Regardless, the swagger docs or any api docs do not load when self-hosted without internet access.

<!-- gh-comment-id:2542833489 --> @gaby commented on GitHub (Dec 14, 2024): @semidark I was getting that error until I added an environment variable to docker run: `-e ENV=dev` Regardless, the swagger docs or any api docs do *not* load when self-hosted without internet access.
Author
Owner

@gaby commented on GitHub (Dec 25, 2024):

Fixed via #7905 released in https://github.com/open-webui/open-webui/releases/tag/v0.5.0

<!-- gh-comment-id:2562021488 --> @gaby commented on GitHub (Dec 25, 2024): Fixed via #7905 released in https://github.com/open-webui/open-webui/releases/tag/v0.5.0
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#52762