[GH-ISSUE #482] Add docs on using the Backend Reverse Proxy feature #50750

Closed
opened 2026-05-05 11:04:14 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @oxaronick on GitHub (Jan 15, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/482

The README.md says:

🔒 Backend Reverse Proxy Support: Bolster security through direct communication between Ollama Web UI backend and Ollama. This key feature eliminates the need to expose Ollama over LAN. Requests made to the '/ollama/api' route from the web UI are seamlessly redirected to Ollama from the backend, enhancing overall system security.

A request to /ollama/api/generate returns a 403, so the endpoint is authenticated, which is good.

Looking through the code, the server is looking for a Bearer token. However, there are no docs and nothing I can see in the UI to allow me to get a Bearer token to use with this feature.

Describe the solution you'd like

I'd like documentation on how to get a Bearer token for my user, to allow me to make API requests directly to Ollama.

Describe alternatives you've considered

I could set up my own authentication using NGINX. However, the description above shows this feature is explicitly meant to allow admins to not have to do that, so I'm hopeful I can use this feature as advertised.

Additional context

I'm looking to make API requests directly to Ollama because I'd like in-editor code completion, and there are VSCode extensions that will use an Ollama server to generate completions.

Originally created by @oxaronick on GitHub (Jan 15, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/482 The README.md says: > 🔒 Backend Reverse Proxy Support: Bolster security through direct communication between Ollama Web UI backend and Ollama. This key feature eliminates the need to expose Ollama over LAN. Requests made to the '/ollama/api' route from the web UI are seamlessly redirected to Ollama from the backend, enhancing overall system security. A request to `/ollama/api/generate` returns a 403, so the endpoint is authenticated, which is good. Looking through the code, the server is looking for a Bearer token. However, there are no docs and nothing I can see in the UI to allow me to get a Bearer token to use with this feature. **Describe the solution you'd like** I'd like documentation on how to get a Bearer token for my user, to allow me to make API requests directly to Ollama. **Describe alternatives you've considered** I could set up my own authentication using NGINX. However, the description above shows this feature is explicitly meant to allow admins to not have to do that, so I'm hopeful I can use this feature as advertised. **Additional context** I'm looking to make API requests directly to Ollama because I'd like in-editor code completion, and there are VSCode extensions that will use an Ollama server to generate completions.
Author
Owner

@justinh-rahb commented on GitHub (Jan 15, 2024):

Not sure use by external applications is officially supported as of yet, but this discussion thread is about the same topic and has some information that may be useful to you:
https://github.com/ollama-webui/ollama-webui/discussions/351

<!-- gh-comment-id:1892313583 --> @justinh-rahb commented on GitHub (Jan 15, 2024): Not sure use by external applications is officially supported as of yet, but this discussion thread is about the same topic and has some information that may be useful to you: https://github.com/ollama-webui/ollama-webui/discussions/351
Author
Owner

@oxaronick commented on GitHub (Jan 15, 2024):

@justinh-rahb That's the info I was looking for - thanks!

<!-- gh-comment-id:1892323425 --> @oxaronick commented on GitHub (Jan 15, 2024): @justinh-rahb That's the info I was looking for - thanks!
Author
Owner

@oxaronick commented on GitHub (Jan 15, 2024):

I'm good now but there is still documentation needed. Feel free to keep open to track, or just close this issue.

<!-- gh-comment-id:1892611546 --> @oxaronick commented on GitHub (Jan 15, 2024): I'm good now but there is still documentation needed. Feel free to keep open to track, or just close this issue.
Author
Owner

@tjbck commented on GitHub (Jan 15, 2024):

Indeed, this would be great to have for the documentation. Let's continue our discussion here: open-webui/docs#44

<!-- gh-comment-id:1892736645 --> @tjbck commented on GitHub (Jan 15, 2024): Indeed, this would be great to have for the documentation. Let's continue our discussion here: open-webui/docs#44
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#50750