[GH-ISSUE #1402] Startup process is stuck when running docker container in host mode #51147

Closed
opened 2026-05-05 12:03:35 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @TheNaman047 on GitHub (Apr 3, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1402

Bug Report

Description

Command:
docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main

Output:

2024-04-03 11:03:28 No WEBUI_SECRET_KEY provided
2024-04-03 11:03:28 Loading WEBUI_SECRET_KEY from .webui_secret_key
2024-04-03 11:03:35 INFO:     Started server process [1]
2024-04-03 11:03:35 INFO:     Waiting for application startup.
2024-04-03 11:03:35 INFO:     Application startup complete.
2024-04-03 11:03:35 INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)

Bug Summary:
UI container does not bootup and is stuck on the log above. But when ran in default network mode, it's working fine.

Steps to Reproduce:
Run the above mentioned command.

Expected Behavior:
Should load the UI in host mode same as in bridge mode of docker.

Environment

  • Operating System:
    image

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

Following screenshot is when the container is restarted:
image

Docker Container Logs:

2024-04-03 11:08:59 INFO:     Shutting down
2024-04-03 11:08:59 INFO:     Waiting for application shutdown.
2024-04-03 11:08:59 INFO:     Application shutdown complete.
2024-04-03 11:08:59 INFO:     Finished server process [1]
2024-04-03 11:08:59 
2024-04-03 11:08:59 #------------------------------------------------------------#
2024-04-03 11:08:59 #                                                            #
2024-04-03 11:08:59 #       'This feature doesn't meet my needs because...'       #
2024-04-03 11:08:59 #        https://github.com/BerriAI/litellm/issues/new        #
2024-04-03 11:08:59 #                                                            #
2024-04-03 11:08:59 #------------------------------------------------------------#
2024-04-03 11:08:59 
2024-04-03 11:08:59  Thank you for using LiteLLM! - Krrish & Ishaan
2024-04-03 11:08:59 
2024-04-03 11:08:59 
2024-04-03 11:08:59 
2024-04-03 11:08:59 Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
2024-04-03 11:08:59 
2024-04-03 11:08:59 
2024-04-03 11:09:00 No WEBUI_SECRET_KEY provided
2024-04-03 11:09:00 Loading WEBUI_SECRET_KEY from .webui_secret_key
2024-04-03 11:09:07 INFO:     Started server process [1]
2024-04-03 11:09:07 INFO:     Waiting for application startup.
2024-04-03 11:09:07 INFO:     Application startup complete.
2024-04-03 11:09:07 INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
Originally created by @TheNaman047 on GitHub (Apr 3, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/1402 # Bug Report ## Description Command: `docker run -d --network=host -v open-webui:/app/backend/data -e OLLAMA_BASE_URL=http://127.0.0.1:11434 --name open-webui --restart always ghcr.io/open-webui/open-webui:main` Output: ``` 2024-04-03 11:03:28 No WEBUI_SECRET_KEY provided 2024-04-03 11:03:28 Loading WEBUI_SECRET_KEY from .webui_secret_key 2024-04-03 11:03:35 INFO: Started server process [1] 2024-04-03 11:03:35 INFO: Waiting for application startup. 2024-04-03 11:03:35 INFO: Application startup complete. 2024-04-03 11:03:35 INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit) ``` **Bug Summary:** UI container does not bootup and is stuck on the log above. But when ran in default network mode, it's working fine. **Steps to Reproduce:** Run the above mentioned command. **Expected Behavior:** Should load the UI in host mode same as in bridge mode of docker. ## Environment - **Operating System:** ![image](https://github.com/open-webui/open-webui/assets/25585634/a7eb8e67-ac0d-4d68-9a42-307649258aed) ## 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 Following screenshot is when the container is restarted: ![image](https://github.com/open-webui/open-webui/assets/25585634/95bd707b-55e0-48ad-b70c-2a0ba1c907c0) **Docker Container Logs:** ``` 2024-04-03 11:08:59 INFO: Shutting down 2024-04-03 11:08:59 INFO: Waiting for application shutdown. 2024-04-03 11:08:59 INFO: Application shutdown complete. 2024-04-03 11:08:59 INFO: Finished server process [1] 2024-04-03 11:08:59 2024-04-03 11:08:59 #------------------------------------------------------------# 2024-04-03 11:08:59 # # 2024-04-03 11:08:59 # 'This feature doesn't meet my needs because...' # 2024-04-03 11:08:59 # https://github.com/BerriAI/litellm/issues/new # 2024-04-03 11:08:59 # # 2024-04-03 11:08:59 #------------------------------------------------------------# 2024-04-03 11:08:59 2024-04-03 11:08:59 Thank you for using LiteLLM! - Krrish & Ishaan 2024-04-03 11:08:59 2024-04-03 11:08:59 2024-04-03 11:08:59 2024-04-03 11:08:59 Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new 2024-04-03 11:08:59 2024-04-03 11:08:59 2024-04-03 11:09:00 No WEBUI_SECRET_KEY provided 2024-04-03 11:09:00 Loading WEBUI_SECRET_KEY from .webui_secret_key 2024-04-03 11:09:07 INFO: Started server process [1] 2024-04-03 11:09:07 INFO: Waiting for application startup. 2024-04-03 11:09:07 INFO: Application startup complete. 2024-04-03 11:09:07 INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit) ```
Author
Owner

@justinh-rahb commented on GitHub (Apr 3, 2024):

In host networking as in your example, you'd use http://localhost:8080 as the address, not the port 3000 one.. is this what you tried?

<!-- gh-comment-id:2034378256 --> @justinh-rahb commented on GitHub (Apr 3, 2024): In host networking as in your example, you'd use http://localhost:8080 as the address, not the port 3000 one.. is this what you tried?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#51147