Skip to main content

Installer Open WebUI sur Fedora sans Docker

Objectif : installer Open WebUI en natif sur Fedora, avec la version de Node.js qu'il supporte.

Open WebUI — Installation sur Fedora (natif, sans Docker)

Prérequis — Node 22 via nvm

Fedora installe Node 24 par défaut — incompatible avec Open WebUI qui supporte <=22.x.

# Installer nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc

# Installer et activer Node 22
nvm install 22
nvm use 22
nvm alias default 22

# Vérifier
node --version   # doit afficher v22.x.x
npm --version

Cloner Open WebUI

sudo git clone https://github.com/open-webui/open-webui.git /opt/open-webui
sudo chown -R $USER:$USER /opt/open-webui
cd /opt/open-webui

Build du frontend

cd /opt/open-webui
npm install
npm run build

Environnement Python 3.11

Ne pas utiliser Python 3.12, 3.13 ou 3.14 — incompatibles avec les dépendances d'Open WebUI.

# Installer Python 3.11
sudo dnf install -y python3.11 python3.11-devel

# Créer le venv avec Python 3.11 explicitement
cd /opt/open-webui
python3.11 -m venv venv
source venv/bin/activate

# Vérifier la version
python3 --version   # doit afficher Python 3.11.x

# Installer les dépendances via pyproject.toml
pip install --upgrade pip
pip install -e ".[hf]"

Configuration

cp .env.example .env
nano .env
# URL Ollama — utiliser l'IP réseau si Ollama écoute sur l'IP (pas localhost)
OLLAMA_BASE_URL=http://192.168.2.150:11434

PORT=3000
DATA_DIR=/opt/data/open-webui
WEBUI_SECRET_KEY=REMPLACER_PAR_CLE_ALEATOIRE
WEBUI_NAME=Cortana

Générer la clé secrète :

python3 -c "import secrets; print(secrets.token_hex(32))"

Créer le dossier de données :

sudo mkdir -p /opt/data/open-webui
sudo chown -R $USER:$USER /opt/data/open-webui

Test manuel avant le service

cd /opt/open-webui
source venv/bin/activate
python3 -m uvicorn open_webui.main:app --host 0.0.0.0 --port 3000

Ouvrir http://[IP]:3000 — si l'interface apparaît, Ctrl+C et passer au service.

Service systemd

sudo nano /etc/systemd/system/open-webui.service
[Unit]
Description=Open WebUI
After=network.target

[Service]
Type=simple
User=rohba
WorkingDirectory=/opt/open-webui/open-webui
ExecStart=/opt/open-webui/open-webui/venv/bin/uv run open-webui serve --host 192.168.2.150 --port 8080
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Remplacer TON_USER par ton nom d'utilisateur (ex: rohba)
Le module s'appelle open_webui.main:app — pas backend.main:app

sudo systemctl daemon-reload
sudo systemctl enable --now open-webui
sudo systemctl status open-webui

Vérification

# Logs en temps réel
sudo journalctl -fu open-webui

# Si erreur "No module named uvicorn"
source /opt/open-webui/venv/bin/activate
pip install uvicorn
sudo systemctl restart open-webui

Premier accès — Configuration admin

Ouvrir http://[IP]:3000

  1. Créer un compte → premier compte = Admin automatiquement
  2. Admin Panel → Connexions → URL Ollama : http://192.168.2.150:11434 → vérifier
  3. Admin Panel → Settings → General → Enable New Sign Ups → OFF
  4. Admin Panel → Modèles → cortana:latest → éditer
    • Section Outils intégrés → tout décocher
    • Section Capacités → décocher Outils intégrés
    • Enregistrer & Mettre à jour
  5. Admin Panel → Settings → Models → cortana comme modèle par défaut
  6. Settings → Personalization → Memory → ON
  7. Interface utilisateur → Context Compaction → ON

Mise à jour d'Open WebUI

cd /opt/open-webui
sudo systemctl stop open-webui
git pull
source venv/bin/activate
npm install && npm run build
pip install -e ".[hf]"
sudo systemctl start open-webui