doc: rootless mode docker installation #1

Closed
opened 2026-02-15 17:04:56 -05:00 by yindo · 4 comments
Owner

Originally created by @bwiercinski on GitHub (Jan 26, 2024).

Is your feature request related to a problem? Please describe.
I've tried to install webui on a docker running in rootless mode. Unfortunately, the instructions don't work for rootless. The --add-host=host.docker.internal:host-gateway does not work on rootless by design stack overflow. Also --network=host doesn't work docker docs. What I had to do is:

  • Bind host.docker.internal to my local interface (e.g. wifi interface) using:
docker run -d -p 3000:8080 --add-host "host.docker.internal:$(nslookup "$HOST.home" | awk '/^Address: /{ print $2 }')" -v ollama-webui:/app/backend/data --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main

(alternatively replace in $(...) to ip addr show wifi-interface | grep -oP 'inet \K[0-9.]+')

  • Host the ollama server at 0.0.0.0 instead of 127.0.0.1. Instructions here: ollama docs

Describe the solution you'd like
Improve documentation for other affected people.

Describe alternatives you've considered
use socat
https://stackoverflow.com/a/74979409/11226692

Originally created by @bwiercinski on GitHub (Jan 26, 2024). **Is your feature request related to a problem? Please describe.** I've tried to install webui on a docker running in [rootless mode](https://docs.docker.com/engine/security/rootless/). Unfortunately, the instructions don't work for rootless. The `--add-host=host.docker.internal:host-gateway` does not work on rootless by design [stack overflow](https://stackoverflow.com/a/74979409/11226692). Also `--network=host` doesn't work [docker docs](https://docs.docker.com/engine/security/rootless/#--nethost-doesnt-listen-ports-on-the-host-network-namespace). What I had to do is: * Bind `host.docker.internal` to my local interface (e.g. wifi interface) using: ``` docker run -d -p 3000:8080 --add-host "host.docker.internal:$(nslookup "$HOST.home" | awk '/^Address: /{ print $2 }')" -v ollama-webui:/app/backend/data --name ollama-webui --restart always ghcr.io/ollama-webui/ollama-webui:main ``` (alternatively replace in `$(...)` to `ip addr show wifi-interface | grep -oP 'inet \K[0-9.]+'`) * Host the ollama server at 0.0.0.0 instead of 127.0.0.1. Instructions here: [ollama docs](https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-linux) **Describe the solution you'd like** Improve documentation for other affected people. **Describe alternatives you've considered** use socat https://stackoverflow.com/a/74979409/11226692
yindo added the documentationgood first issue labels 2026-02-15 17:04:56 -05:00
yindo closed this issue 2026-02-15 17:04:56 -05:00
Author
Owner

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

Hi, Thanks for the suggestion! Feel free edit our troubleshooting.md doc and make a PR!

@tjbck commented on GitHub (Jan 26, 2024): Hi, Thanks for the suggestion! Feel free edit our[ troubleshooting.md doc](https://github.com/ollama-webui/ollama-webui/blob/main/TROUBLESHOOTING.md) and make a PR!
Author
Owner

@jonasbg commented on GitHub (Feb 14, 2024):

How does this work with podman. Another rootless provider?

@jonasbg commented on GitHub (Feb 14, 2024): How does this work with podman. Another rootless provider?
Author
Owner

@GZGavinZhao commented on GitHub (Feb 21, 2024):

Podman works the same, except the --add-host becomes --add-host=host.containers.internal:host-gateway. For example, my command for running Ollama is:

podman run -d -p 3000:8080 --add-host=host.containers.internal:host-gateway -v <ollama-webui-datadir>:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

Note that as mentioned by the OP, with this method the Ollama server must be hosted at 0.0.0.0 instead of the default 127.0.0.1.

@GZGavinZhao commented on GitHub (Feb 21, 2024): Podman works the same, except the `--add-host` becomes `--add-host=host.containers.internal:host-gateway`. For example, my command for running Ollama is: ``` podman run -d -p 3000:8080 --add-host=host.containers.internal:host-gateway -v <ollama-webui-datadir>:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main ``` Note that as mentioned by the OP, with this method the Ollama server must be hosted at `0.0.0.0` instead of the default `127.0.0.1`.
Author
Owner

@ghost commented on GitHub (Feb 23, 2024):

I've been using a Podman rootless configuration for some time. I've submitted pull request open-webui/open-webui#877 to update the README with details. This configuration doesn't require Ollama to listen anywhere but localhost. 🥂

@ghost commented on GitHub (Feb 23, 2024): I've been using a Podman rootless configuration for some time. I've submitted pull request open-webui/open-webui#877 to update the README with details. This configuration doesn't require Ollama to listen anywhere but localhost. 🥂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: open-webui/docs#1