Originally created by @gaby on GitHub (Sep 26, 2024).
# 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
Will not be using fastapi_offline but investigating at the moment.
@tjbck commented on GitHub (Sep 27, 2024):
Will not be using [fastapi_offline](https://github.com/turettn/fastapi_offline) but investigating at the moment.
The versions of the .js/.css files prob need to be updated since it was posted 2 years ago.
@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.
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.
@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.
@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.
@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.
@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
@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
Though the API is working. as described in the Link to the docs.
@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.
@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.
@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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @gaby on GitHub (Sep 26, 2024).
Bug Report
Installation Method
Environment
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 offlinepackage here: https://github.com/turettn/fastapi_offline@tjbck commented on GitHub (Sep 27, 2024):
Will not be using fastapi_offline but investigating at the moment.
@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.
@tjbck commented on GitHub (Sep 27, 2024):
PR welcome!
@lee-b commented on GitHub (Sep 28, 2024):
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.
@gaby commented on GitHub (Sep 28, 2024):
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.
@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
@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
Though the API is working. as described in the Link to the docs.
@lililililli1 commented on GitHub (Nov 24, 2024):
是的,在完全断网的情况下webui完全不能使用
@gaby commented on GitHub (Dec 14, 2024):
@semidark I was getting that error until I added an environment variable to docker run:
-e ENV=devRegardless, the swagger docs or any api docs do not load when self-hosted without internet access.
@gaby commented on GitHub (Dec 25, 2024):
Fixed via #7905 released in https://github.com/open-webui/open-webui/releases/tag/v0.5.0