Deployment Overview of Webmin on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met:
-
Operating System: Debian or Ubuntu (for
aptbased systems) or CentOS, Rocky Linux, or AlmaLinux (foryumbased systems). -
Privileges: Root or sudo access is required for all installation steps.
-
Ports:
-
Port
10000/tcp: Used by Webmin internally. -
Port
443/tcp: External HTTPS access via the reverse proxy.
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 | webmin |
| Domain | hostkey.in |
| Full template | webmin{Server_ID}.hostkey.in |
Application installation process¶
The installation method depends on the operating system of the server:
Debian and Ubuntu Systems¶
-
The system removes any conflicting legacy Docker sources or keys to prevent package manager conflicts.
-
Essential dependencies such as
gnupg2,curl, andwgetare installed viaapt. -
The Webmin GPG key is added to the system's trusted keys.
-
The official Webmin repository is added to the APT sources list.
-
The package manager cache is updated, and any unnecessary dependencies are removed.
-
The
webminpackage is installed viaapt.
RHEL-based Systems (CentOS, Rocky Linux, AlmaLinux)¶
-
A repository installation script is downloaded from the official Webmin GitHub repository to
/tmp/setup-repos.sh. -
The script is executed to configure the necessary repositories.
-
The
webminpackage is installed using theyumpackage manager.
Post-Installation Configuration¶
After the core application is installed, several configuration steps are performed:
-
Webmin's internal SSL is disabled in
/etc/webmin/miniserv.conf. -
The
hostparameter in/etc/webmin/miniserv.confis updated to match the public FQDN of the server. -
The Webmin service is restarted to apply changes.
Access Rights and Security¶
Security is managed through system firewalls:
-
Ubuntu/Debian:
ufwis used to allow incoming traffic on port10000/tcp. -
RHEL/CentOS/Rocky/AlmaLinux:
firewalldis configured to allow incoming traffic on port10000/tcpin the public zone.
Docker Containers and Their Deployment¶
The deployment utilizes a Docker container to handle SSL termination and reverse proxying via Nginx and Certbot.
Nginx-Certbot Container¶
-
Image:
jonasal/nginx-certbot:latest -
Network Mode:
host -
Restart Policy:
unless-stopped -
Environment Variables:
-
CERTBOT_EMAIL:[email protected] -
Volumes:
-
nginx_secrets:/etc/letsencrypt(External volume for SSL certificates) -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d(Configuration directory)
The container is managed using a compose.yml file located in /root/nginx/.
Custom Scripts and Additional Setup¶
Several automated actions are performed to finalize the environment:
-
Repository Cleanup: A script is used during RHEL installation to automate repository setup.
-
Proxy Configuration: The system modifies Nginx configuration files in
/data/nginx/user_conf.d/to ensure thatproxy_passpoints correctly tohttp://127.0.0.1:10000and includes necessary headers (HostandX-Forwarded-Proto) for proper SSL termination. -
Nginx Reload: After configuration changes, the Nginx process inside the container is reloaded using
docker compose exec -T nginx nginx -s reload.
Application Update Instructions¶
To update the Webmin application:
-
On Debian/Ubuntu: Use the package manager to upgrade the installed package:
-
On RHEL-based systems: Use the
yumcommand:
Location of configuration files and data¶
| Component | Path |
|---|---|
| Webmin Configuration | /etc/webmin/ |
| Nginx Compose File | /root/nginx/compose.yml |
| Nginx User Configurations | /data/nginx/user_conf.d/ |
| SSL Certificates (Docker) | nginx_secrets volume |
Available ports for connection¶
-
Internal Webmin Port:
10000(Accessible locally or via proxy). -
External HTTPS Port:
443(Standard web access).