docker run binds on 0.0.0.0 instead of localhost #1381

Closed
opened 2025-11-11 14:43:56 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @szuecs on GitHub (Jun 26, 2024).

Not sure if you want to have this as feature or bug. :)

% docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Unable to find image 'ghcr.io/open-webui/open-webui:main' locally
main: Pulling from open-webui/open-webui
2cc3ae149d28: Pull complete
87c0edd565e2: Pull complete
3df7545512d5: Pull complete
8f26d42ebf67: Pull complete
8951c7adce45: Pull complete
e68b3f3b28fc: Pull complete
4f4fb700ef54: Pull complete
04910e925ba2: Pull complete
e00576178709: Pull complete
7b74341f8bd7: Pull complete
46aff8bb649e: Pull complete
d2f7110849c1: Pull complete
293258db973c: Pull complete
5267614e0fff: Pull complete
ed7eecbb61eb: Pull complete
97b36ceb575c: Pull complete
Digest: sha256:374776656904d937b4b313e4a05303d7c462860c0f5cf16fca9056fa9b9f2320
Status: Downloaded newer image for ghcr.io/open-webui/open-webui:main
545feebf7c7d5744e775d6a7085c19a8f03ef91fdc77e3b97fa038b789401654
[sszuecs@sandor-lab:~]% netstat -tlpen | grep :3000                                                             
tcp        0      0 0.0.0.0:3000            0.0.0.0:*               LISTEN      0          822323     -

For security reasons it makes more sense to have the local installation default to bind on 127.0.0.1 with hostnetwork, such that 127.0.0.1 works.
Maybe Mac will have an issue with this config but linux will work.

Originally created by @szuecs on GitHub (Jun 26, 2024). Not sure if you want to have this as feature or bug. :) ``` % docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main Unable to find image 'ghcr.io/open-webui/open-webui:main' locally main: Pulling from open-webui/open-webui 2cc3ae149d28: Pull complete 87c0edd565e2: Pull complete 3df7545512d5: Pull complete 8f26d42ebf67: Pull complete 8951c7adce45: Pull complete e68b3f3b28fc: Pull complete 4f4fb700ef54: Pull complete 04910e925ba2: Pull complete e00576178709: Pull complete 7b74341f8bd7: Pull complete 46aff8bb649e: Pull complete d2f7110849c1: Pull complete 293258db973c: Pull complete 5267614e0fff: Pull complete ed7eecbb61eb: Pull complete 97b36ceb575c: Pull complete Digest: sha256:374776656904d937b4b313e4a05303d7c462860c0f5cf16fca9056fa9b9f2320 Status: Downloaded newer image for ghcr.io/open-webui/open-webui:main 545feebf7c7d5744e775d6a7085c19a8f03ef91fdc77e3b97fa038b789401654 [sszuecs@sandor-lab:~]% netstat -tlpen | grep :3000 tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 0 822323 - ``` For security reasons it makes more sense to have the local installation default to bind on 127.0.0.1 with hostnetwork, such that 127.0.0.1 works. Maybe Mac will have an issue with this config but linux will work.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#1381