Hexa's Blog

How to install open-webui for llama model on Fedora?

31/12/2024 @ Saigon LLM

This guide is about installing open-webui on fedora.

1. Update python & pip

$ dnf update python -y
$ pip install --upgrade pip

2. Install open-webui guide

  • Create directory /opt/open-webui
$ mkdir /opt/open-webui
$ cd /opt/open-webui
  • change ownership to your user, do not run with root due to security issue.
$ chown nguyenvinhlinh:nguyenvinhlinh -Rv /opt/open-webui/
  • Setup virtual environment (venv) & install open-webui (do not run as root)
$ python -m venv open-webui-env
$ source open-webui-env/bin/activate
$ pip install open-webui

3. Start open-webui server (do not run as root)

$ open-webui serve
  • Server should be available on http://127.0.0.1:8080
  • All data (sqlite, uploads, cache, db) can be found at /opt/open-webui/open-webui-env/lib/python3.12/site-packages/open_webui/data
open-webui on Chrome
open-webui on Chrome

4. Install Ollama software guide

$ curl -fsSL https://ollama.com/install.sh | sh
$ ollama --version

5. Using ollama to pull/download model

$ ollama pull llama3.2

6. Running with systemd service /etc/systemd/system/open-webui.service

[Unit]
Description=Open WebUI (LLAMA)
After=network.target

[Service]
WorkingDirectory=/opt/open-webui
ExecStart=/opt/open-webui/open-webui-env/bin/open-webui serve
User=nguyenvinhlinh
RemainAfterExit=yes
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Enable and start open-webui service

$ systemctl enable open-webui
$ systemctl start  open-webui

References