KVM with web management via Cockpit: Deployment Overview on Server¶
Prerequisites¶
The following conditions must be met for the system to operate correctly:
-
Operating System: Ubuntu.
-
Internet access to obtain Let's Encrypt certificates and install packages.
-
Open ports: 443 (HTTPS) and 80 (HTTP, used temporarily by Certbot).
FQDN of the final panel on hostkey.in domain¶
The following domain name template is used to access the web management interface:
| Parameter | Value |
|---|---|
| Prefix | kvm |
| Domain | hostkey.in |
| Full Template | kvm{Server_ID_from_Invapi}.hostkey.in |
Application Installation Process¶
Deployment includes the installation of the KVM virtualization environment and the Cockpit management panel. Key stages:
-
Installation of system packages (QEMU, Libvirt, Cockpit).
-
Configuration of the network bridge and virtualization services.
-
Obtaining Let's Encrypt SSL certificates to ensure secure access via HTTPS.
-
Integration of certificates into the web management interface (Cockpit).
Access Rights and Security¶
System security is ensured by the following measures:
-
rootuser login to the Cockpit interface is allowed (configured in/etc/cockpit/disallowed-users). -
Certificate file permissions restriction: owner is
root, group iscockpit-ws, permissions are640. -
Use of container runtime mode with restricted access to system resources.
Databases¶
Databases are not used in this configuration.
Docker Containers and Execution¶
A Docker container is used for SSL certificate management:
| Parameter | Value |
|---|---|
| Image Name | jonasal/nginx-certbot:latest |
| Network Mode | host |
| Restart Policy | unless-stopped |
| Environment Variables | [email protected] |
| Volumes | nginx_secrets:/etc/letsencrypt/data/nginx/user_conf.d:/etc/nginx/user_conf.d |
Application Update Instructions¶
Updates are performed via pull and container restarts or by updating system packages through the apt package manager.
Permission Settings¶
The following permissions are set for the Cockpit certificate directory:
-
Directory
/etc/cockpit/ws-certs.d: ownerroot, grouproot, mode0755. -
.crtand.keyfiles: ownerroot, groupcockpit-ws, mode640.
Configuration Files and Data Locations¶
Primary file paths:
-
Nginx configurations (via Docker):
/data/nginx/user_conf.d -
Let's Encrypt certificates:
/etc/letsencrypt/live/{FQDN}/ -
Cockpit certificates:
/etc/cockpit/ws-certs.d/ -
Nginx-Certbot configuration (env):
/data/nginx/nginx-certbot.env
Available Connection Ports¶
| Port | Protocol | Purpose |
|---|---|---|
| 443 | HTTPS | Cockpit web management interface |
| 9090 | TCP | Alternative access port (according to panel tags) |