Deployment Overview of North MiniCode on Server¶
Prerequisites and Basic Requirements¶
To ensure the successful deployment of North MiniCode, the server must meet the following requirements:
-
Operating System: Ubuntu (recommended 22.04 LTS).
-
Privileges: Root or sudo access is required for package installation and service management.
-
Hardware Requirement: An NVIDIA GPU is required for hardware acceleration.
-
Network Ports:
-
443/TCP: External HTTPS traffic. -
8080/TCP: Internal application communication. -
11434/TCP: Ollama API service.
FQDN of the final panel on the hostkey.in domain¶
The application is accessible via a specific subdomain template based on the server ID.
| Parameter | Value |
|---|---|
| Prefix | north-mini |
| Domain | hostkey.in |
| Full template | north-mini{Server_ID}.hostkey.in |
File and Directory Structure¶
The following directories are used for configuration, certificates, and application data:
-
/root/nginx: Contains the Nginx Docker Compose configuration. -
/data/nginx/user_conf.d: Stores Nginx site configuration files. -
/data/nginx/nginx-certbot.env: Environment file for Certbot configurations. -
open-webui(Docker Volume): Persistent storage for Open WebUI application data.
Application Installation Process¶
The installation follows a multi-stage process involving system preparation, driver installation, and container deployment:
-
System Update: The package cache is updated, and the system is upgraded to the latest distributed version.
-
Kernel Update: The
linux-generic-hwe-22.04kernel is installed to ensure hardware compatibility. -
NVIDIA Driver Setup:
-
The system checks for NVIDIA GPU presence via
lspci. -
If a driver is not detected, the recommended NVIDIA drivers are automatically installed using
ubuntu-drivers autoinstall. -
Ollama Installation:
-
Ollama is installed via the official installation script:
curl -fsSL https://ollama.com/install.sh | sh. -
The service is enabled and started via
systemd. -
The specific model
north-mini-code-1.0is pulled automatically. -
Docker Environment: Docker is installed, and the Python Docker module is added to the system.
-
Container Deployment: The Open WebUI container is launched using the host network mode to communicate with the local Ollama service.
Access Rights and Security¶
-
Firewall: Ensure that port
443is open for external HTTPS access. -
Service Isolation: The application runs in a Docker container, isolating the web interface from the core LLM engine (Ollama).
-
SSL/TLS: SSL certificates are managed via Nginx and Certbot to secure all incoming connections on port
443.
Databases¶
The application utilizes local storage for its data:
- Open WebUI Data: Managed within a Docker volume named
open-webuilocated at/app/backend/datainside the container.
Docker Containers and Their Deployment¶
The deployment consists of two primary containers:
Nginx Proxy Container¶
-
Image Name:
jonasal/nginx-certbot:latest -
Ports: Uses host network mode (mapping to port 443 for HTTPS).
-
Volumes:
-
nginx_secrets:/etc/letsencrypt -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d -
Restart Policy:
unless-stopped -
Purpose: Handles SSL termination and proxies traffic to the application on port 8080.
Open WebUI Container¶
-
Image Name:
ghcr.io/open-webui/open-webui:main -
Ports: Uses host network mode (accessing via proxy).
-
Volumes:
-
open-webui:/app/backend/data -
Environment Variables:
-
OLLAMA_BASE_URL:http://127.0.0.1:11434 -
Restart Policy:
always
Custom Scripts and Additional Setup¶
The following setup actions are performed during the installation process:
-
Model Download: The script automatically executes
ollama pull north-mini-code-1.0to ensure the required LLM is available immediately after service startup. -
Nginx Configuration Injection: A configuration file is dynamically updated in
/data/nginx/user_conf.d/to include aproxy_passdirective pointing tohttp://127.0.0.1:8080.
Application Update Instructions¶
To update the main application (Open WebUI), execute the following commands:
Note: This updates the container image while preserving data stored in the open-webui volume.
Location of configuration files and data¶
| Component | Path / Volume |
|---|---|
| Nginx Compose File | /root/nginx/compose.yml |
| Nginx User Configs | /data/nginx/user_conf.d/ |
| Open WebUI Data | open-webui (Docker Volume) |
Available ports for connection¶
-
HTTPS (External):
443 -
Ollama API (Internal):
11434 -
Application Backend (Internal):
8080