cross-posted from: https://lemmy.world/post/28493612
Open WebUI lets you download and run large language models (LLMs) on your device using Ollama.
Install Ollama
See this guide: https://lemmy.world/post/27013201
Install Docker (recommended Open WebUI installation method)
- Open
Console
, type the following command and press return. This may ask for your password but not show you typing it.
sudo pacman -S docker
- Enable the Docker service [on-device and runs in the background] to start with your device and start it now.
sudo systemctl enable --now docker
- Allow your current user to use Docker.
sudo usermod -aG docker $(whoami)
- Log out and log in again, for the previous command to take effect.
Install Open WebUI on Docker
- Check whether your device has an NVIDIA GPU.
- Use only one of the following commands.
Your device has an NVIDIA GPU:
docker run -d -p 3000:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:cuda
Your device has no NVIDIA GPU:
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
Configure Ollama access
- Edit the Ollama service file. This uses the text editor set in the
$SYSTEMD_EDITOR
environment variable.
sudo systemctl edit ollama.service
- Add the following, save and exit.
[Service] Environment="OLLAMA_HOST=0.0.0.0"
- Restart the Ollama service.
sudo systemctl restart ollama
Get automatic updates for Open WebUI (not models, Ollama or Docker)
- Create a new service file to get updates using Watchtower once everytime Docker starts.
sudoedit /etc/systemd/system/watchtower-open-webui.service
- Add the following, save and exit.
[Unit] Description=Watchtower Open WebUI After=docker.service Requires=docker.service [Service] Type=oneshot ExecStart=/usr/bin/docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui RemainAfterExit=true [Install] WantedBy=multi-user.target
- Enable this new service to start with your device and start it now.
sudo systemctl enable --now watchtower-open-webui
- (Optional) Get updates at regular intervals after Docker has started.
docker run --rm --volume /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --run-once open-webui
Use Open WebUI
- Open
localhost:3000
in a web browser.- Create an on-device Open WebUI account as shown.
Take a Look at ComfyUI
Sure, thanks!