Skip to content

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:

  1. Updating system packages and installing the HWE kernel.

  2. Installing NVIDIA drivers (if hardware is present).

  3. Installing and starting the Ollama service.

  4. Downloading the gemma4:31b language model via Ollama.

  5. Deploying the OpenWebUI container using Docker.

  6. Configuring Nginx to proxy traffic to the application's internal port.

Permissions and Security

  • Configuration files in /root/nginx/ are owned by root with 0644 permissions.

  • The /root/nginx directory has 0755 permissions.

  • 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 host network 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 host network 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:

docker compose up -d
To apply changes in the Nginx configuration without stopping the service:
docker exec nginx-nginx-1 nginx -s reload

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.
question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×