User Tools

This is an old revision of the document!


Open WebUI

Open WebUI is a web based frontend to LLMs models, and let you run your own private chatbot, or in general AI models.

Installation

To install Open WebUI, of course, you need it's dedicated user, so add user:

useradd -d /data/daemons/openwebui -m openwebui

Open WebUI can be installed on bare metal, without containers, using pip, but due to strict python requirement (3.11 at the time of writing this), this is not recomended (Gentoo has already Python 3.13).

Let's go with the containers way, using of course Podman compose.

From this page, select “docker compose” and

This is the compose file i am using, adapt to your needs:

docker-compose.yaml

Reverse Proxy

Open WebUI can be hosted on subdomain, let's assume you choose ai.mydomain.com.

As usual you want it protected by the Reverse Proxy, so create the ai.conf file:

ai.conf
server {
        server_name ai.mydomain.com;
        listen 443 ssl;
        listen 8443 ssl;
        http2 on;

        access_log /var/log/nginx/ai.mydomain.com_access_log main;
        error_log /var/log/nginx/ai.mydomain.com_error_log info;

        location / { # The trailing / is important!
                proxy_pass        http://127.0.0.1:3080/; # The / is important!
                proxy_set_header  X-Script-Name /;
                proxy_set_header  Host $http_host;
        }

        include com.mydomain/certbot.conf;
}

add this config file to NGINX (see The Reverse Proxy concept for more details) and restart nginx.

Now go with browser to https://ai.mydomain.com to finish setup.

Autostart

To start it, and set it up on boot, as usual follow my indications Using Containers on Gentoo, so link the user-containers init script:

ln -s /etc/init.d/user-containers /etc/init.d/user-containers.openwebui

and create the following config file:

/etc/conf.d/user-containers.openwebui
USER=openwebui
DESCRIPTION="Open web AI interface"

Add the service to the default runlevel and start it now:

rc-update add user-containers.openwebui default
rc-service user-containers.openwebui start