Docker container failed to launch with custom OPENAI_API_KEY and OPENAI_API_BASE_URL #679

Closed
opened 2025-11-11 14:28:55 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @AnotiaWang on GitHub (Apr 21, 2024).

Bug Report

Description

Bug Summary:
I use open-webui with custom OpenAI endpoint, and after today's release v0.1.120 the docker container can't run.

Steps to Reproduce:
I run this project using the following Docker command:

docker run -d \ 
  -v open-webui:/app/backend/data \
  --name open-webui \
  --restart always \
  -e OPENAI_API_KEY=..... \
  -e OPENAI_API_BASE_URL=https://my-custom-endpoint.com/v1 \
  -p 3004:8080 
  --log-driver=json-file --log-opt=max-size=10M --log-opt=max-file=10 \
  ghcr.io/open-webui/open-webui:main 

Expected Behavior:
The Docker container should launch successfully.

Actual Behavior:
The Docker container crashes

Environment

  • Open WebUI Version: 0.1.120

  • Ollama (if applicable): None

  • Operating System: Debian 12

  • Browser (if applicable): Vivaldi 6.6.3271.61 (Stable channel) (arm64)

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
502 Bad Gateway from Nginx (due to the app crashes and can't handle requests)

Docker Container Logs:

  File "/app/backend/config.py", line 326, in <module>
    OPENAI_API_BASE_URLS.index("https://api.openai.com/v1")
ValueError: 'https://api.openai.com/v1' is not in list

Screenshots (if applicable):
None

Installation Method

Docker

Additional Information

None

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @AnotiaWang on GitHub (Apr 21, 2024). # Bug Report ## Description **Bug Summary:** I use open-webui with custom OpenAI endpoint, and after today's release v0.1.120 the docker container can't run. **Steps to Reproduce:** I run this project using the following Docker command: ```sh docker run -d \ -v open-webui:/app/backend/data \ --name open-webui \ --restart always \ -e OPENAI_API_KEY=..... \ -e OPENAI_API_BASE_URL=https://my-custom-endpoint.com/v1 \ -p 3004:8080 --log-driver=json-file --log-opt=max-size=10M --log-opt=max-file=10 \ ghcr.io/open-webui/open-webui:main ``` **Expected Behavior:** The Docker container should launch successfully. **Actual Behavior:** The Docker container crashes ## Environment - **Open WebUI Version:** 0.1.120 - **Ollama (if applicable):** None - **Operating System:** Debian 12 - **Browser (if applicable):** Vivaldi 6.6.3271.61 (Stable channel) (arm64) ## Reproduction Details **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** `502 Bad Gateway` from Nginx (due to the app crashes and can't handle requests) **Docker Container Logs:** ``` File "/app/backend/config.py", line 326, in <module> OPENAI_API_BASE_URLS.index("https://api.openai.com/v1") ValueError: 'https://api.openai.com/v1' is not in list ``` **Screenshots (if applicable):** None ## Installation Method Docker ## Additional Information None ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@tjbck commented on GitHub (Apr 21, 2024):

Just added a fix, let me know if the issue persists!

@tjbck commented on GitHub (Apr 21, 2024): Just added a fix, let me know if the issue persists!
Author
Owner

@AnotiaWang commented on GitHub (Apr 21, 2024):

Pulled the latest image, and it looks fine now

@AnotiaWang commented on GitHub (Apr 21, 2024): Pulled the latest image, and it looks fine now
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#679