« Open WebUI » : différence entre les versions
De Le Wiki de Lug
Autres actions
Balise : Révoqué |
Balise : Révoqué |
||
| Ligne 161 : | Ligne 161 : | ||
On autorise le plugin a utiliser une IP local pour searxng : | On autorise le plugin a utiliser une IP local pour searxng : | ||
# systemctl edit hermes-gateway.service | # systemctl edit hermes-gateway.service | ||
Ajouter dans la zone d’édition (partie supérieure du fichier) : | Ajouter dans la zone d’édition (partie supérieure du fichier) : | ||
<font color = grey>...</font> | <font color = grey>...</font> | ||
| Ligne 173 : | Ligne 170 : | ||
<font color = grey>### Edits below this comment will be discarded</font> | <font color = grey>### Edits below this comment will be discarded</font> | ||
<font color = grey>...</font> | <font color = grey>...</font> | ||
On redémarre le service : | |||
# systemctl restart hermes-gateway.service | |||
Version du 24 avril 2026 à 23:52
Prérequis
Pour une utilisation de base :
- si Alpine LXC : avec Nesting et keyctl activé (Docker).
- RAM :
- 2 Go → minimum
- 4 Go → recommandé
- 8 Go → confortable
- CPU / vCPU :
- 1 vCPU → suffisant
- 2 vCPU → recommandé
- Espace disque :
- 5 Go → minimum (test uniquement)
- 10 Go → utilisable
- 20 Go → confortable
Installation
- On installe docker (Alpine) :
# apk update && apk upgrade # apk add docker docker-cli-compose curl # rc-update add docker default # rc-service docker start
- On installe le service :
# mkdir -p /opt/openwebui
Le fichier docker-compose :
# vi /opt/openwebui/docker-compose.yml
services:
openwebui:
image: ghcr.io/open-webui/open-webui:main
container_name: openwebui
restart: unless-stopped
ports:
- "3000:8080"
# Pour verrouiller l'écoute sur une seule interface :
# - "IP_SERVEUR:3000:8080"
environment:
- OPENAI_API_BASE_URL=${OPENAI_API_BASE_URL}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- AIOHTTP_CLIENT_TIMEOUT_MODEL_LIST=30
volumes:
- openwebui_data:/app/backend/data
volumes:
openwebui_data:
(Optionnel) Pour connecter automatiquement Hermes :
# vi /opt/openwebui/.env
OPENAI_API_BASE_URL=http://IP_HERMES:8642/v1 OPENAI_API_KEY=maclefsecrete
On crée le conteneur :
# docker compose -f /opt/openwebui/docker-compose.yml --project-directory /opt/openwebui up -d
- Accéder à l'interface :
http://IP_LXC:3000
vhost
server {
listen 80;
listen [::]:80;
server_name openwebui.exemple.net;
return 301 https://$host$request_uri;
}
server {
server_name openwebui.exemple.net;
# protection
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "geolocation=(self), microphone=(self), camera=(self)" always;
add_header Strict-Transport-Security "max-age=31536000" always;
location / {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_read_timeout 3600;
proxy_send_timeout 3600;
proxy_connect_timeout 60;
client_max_body_size 100M;
proxy_pass http://IP_SERVEUR_WEB:3000;
# proxy_pass https://IP_SERVEUR_WEB:PORT; #Alternatif pour redirection sur https
proxy_buffering off; #activer pour désactiver le "buffering"
}
listen [::]:443 ssl; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/openwebui.exemple.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/openwebui.exemple.net/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
}
Mise à jour du conteneur
# docker compose -f /opt/openwebui/docker-compose.yml pull # docker compose -f /opt/openwebui/docker-compose.yml up -d --remove-orphans
Plugins
Si nécessaire installer les dépendances :
# apt update && apt upgrade # apt install git python3-venv
Installation du plugin :
# git clone https://github.com/robbyczgw-cla/hermes-web-search-plus.git ~/.hermes/plugins/web-search-plus
Installation des dépendances Python dans l'environnement Hermes :
# cd ~/.hermes/hermes-agent # source venv/bin/activate # python -m ensurepip --upgrade # python -m pip install --upgrade pip # python -m pip install requests
Configuration du plugin :
# cd ~/.hermes/plugins/web-search-plus # cp .env.template .env # vi ~/.hermes/plugins/web-search-plus/.env
On configure SearXNG :
SEARXNG_INSTANCE_URL=http://IP_SEARXNG:8080
On active le plugin :
# vi ~/.hermes/config.yaml
plugins:
enabled:
- web-search-plus
tools:
enabled:
- web
- web-search-plus
On autorise le plugin a utiliser une IP local pour searxng :
# systemctl edit hermes-gateway.service
Ajouter dans la zone d’édition (partie supérieure du fichier) :
... ### Anything between here and the comment below will become the contents of the drop-in file [Service] Environment="SEARXNG_ALLOW_PRIVATE=1" ### Edits below this comment will be discarded ...
On redémarre le service :
# systemctl restart hermes-gateway.service