Gemma4-31b: OpenWebUI Deployment Overview on Server¶
Prerequisites¶
The following system parameters and network settings are required for the application to function correctly:
-
Operating System: Ubuntu (version 22.04 with HWE kernel installed is recommended).
-
Drivers: Presence of an NVIDIA GPU and installed NVIDIA drivers.
-
Ports:
-
8080— internal application port. -
443— external port for HTTPS access.
-
FQDN of the final panel on hostkey.in domain¶
The following domain name template is used to access the interface:
| Parameter | Value |
|---|---|
| Prefix | gemma31b |
| Domain | hostkey.in |
| Full Template | gemma31b{Server_ID_from_Invapi}.hostkey.in |
File and Directory Structure¶
Main configuration files and data are located at the following paths:
-
/root/nginx/compose.yml— Docker Compose configuration file for the proxy server. -
/data/nginx/user_conf.d/— directory containing Nginx configuration files. -
/data/nginx/nginx-certbot.env— environment variables file for Certbot.
Application Installation Process¶
Deployment includes the following stages:
-
Updating system packages and installing the HWE kernel.
-
Installing NVIDIA drivers (if hardware is present).
-
Installing and starting the Ollama service.
-
Downloading the
gemma4:31blanguage model via Ollama. -
Deploying the OpenWebUI container using Docker.
-
Configuring Nginx to proxy traffic to the application's internal port.
Permissions and Security¶
-
Configuration files in
/root/nginx/are owned byrootwith0644permissions. -
The
/root/nginxdirectory has0755permissions. -
The application runs within an isolated Docker container.
Databases¶
In this configuration, no database is used; application data is stored in a named Docker volume.
Docker Containers and Execution¶
OpenWebUI¶
-
Image Name:
ghcr.io/open-webui/open-webui:main -
Ports: Uses
hostnetwork mode. -
Volumes:
open-webui:/app/backend/data -
Environment Variables:
OLLAMA_BASE_URL=http://127.0.0.1:11434
-
Restart Policy:
always
Nginx (Certbot)¶
-
Image Name:
jonasal/nginx-certbot:latest -
Ports: Uses
hostnetwork mode. -
Volumes:
-
nginx_secrets:/etc/letsencrypt -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d
-
-
Restart Policy:
unless-stopped
Application Update Instructions¶
Updates are performed via pull and container restarts. To update the proxy server, use the command:
Permission Settings¶
The /root/nginx directory is owned by user root and group root.
Location of Configuration Files and Data¶
-
OpenWebUI Data: Stored in Docker volume
open-webui. -
Nginx Configuration: Management files are located in
/data/nginx/user_conf.d/.
Available Connection Ports¶
443(HTTPS) — primary port for browser access.