Deployment Overview of Ispconfig on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met:
-
Operating System: Ubuntu or Debian.
-
Privileges: Root or sudo access is required for all installation steps.
-
Network/Ports: The following TCP ports must be open in the firewall:
-
22(SSH) -
80(HTTP) -
443(HTTPS) -
8080(ISPConfig Panel)
FQDN of the final panel on the hostkey.in domain¶
The ISPConfig panel is accessible via a specific Fully Qualified Domain Name (FQDN) based on the server ID.
| Parameter | Value |
|---|---|
| Prefix | ispconfig |
| Domain | hostkey.in |
| Full template | ispconfig{Server_ID_from_Invapi}.hostkey.in |
File and Directory Structure¶
The application uses the following directory structure for configuration and data:
-
/usr/local/ispconfig: Main installation directory for ISPConfig. -
/etc/nginx/sites-available/000-ispconfig.vhost: Nginx virtual host configuration for the panel. -
/data/nginx/user_conf.d/: Directory containing custom Nginx user configurations and SSL proxy settings. -
/root/nginx/compose.yml: Docker Compose file for the Nginx-Certbot container.
Application installation process¶
The installation of ISPConfig is performed using a multi-step process involving package management, an automated installer script, and manual configuration adjustments:
-
System Preparation: The system updates the APT cache and installs necessary base utilities including
wget,curl,ca-certificates,tar, andunzip. -
Docker Installation: Docker is installed to manage the Nginx-Certbot container used for SSL management.
-
MariaDB Setup: A corporate MariaDB image (
docker-srv.hostkey.com/docker-anonymous/bitnami/mariadb:latest) is pulled and prepared as the database backend. -
ISPConfig Installation: The application is installed using the official ISPConfig autoinstaller script located at
/tmp/ispconfig-ai/ispconfig.ai.php. The installation is configured with the following parameters: -
Standard installation mode.
-
Nginx as the web server.
-
Unattended upgrades enabled.
-
Mail, DNS, and FTP services are excluded from this specific minimal setup.
-
PHP Configuration: PHP 8.3 FPM is installed to serve the ISPConfig interface via a Unix socket at
/run/php/php8.3-fpm.sock.
Access Rights and Security¶
Security is managed through several layers:
-
Firewall (UFW): The Uncomplicated Firewall (UFW) is enabled with rules allowing traffic on ports 22, 80, 443, and 8080.
-
User Permissions: The
www-datauser is granted read access to the ISPConfig configuration file (/usr/local/ispconfig/interface/lib/config.inc.php) and write permissions for the following directories: -
/usr/local/ispconfig/interface/temp -
/usr/local/ispconfig/interface/lib/classes/IDS/tmp -
Directory Traversal: Specific ISPConfig system directories are set to mode
0755to ensure they are traversable by the web user.
Databases¶
The application uses MariaDB for data storage.
| Component | Detail |
|---|---|
| Database Name | dbispconfig |
| Root User | root |
| ISPConfig User | ispconfig |
| Connection Method | Localhost via socket/TCP |
Docker Containers and Their Deployment¶
The deployment utilizes one primary application-related container to handle SSL certificates:
Nginx-Certbot Container
-
Image:
jonasal/nginx-certbot:latest -
Network Mode:
host -
Volumes:
-
nginx_secrets:/etc/letsencrypt(External volume for SSL certificates) -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d(Host directory for Nginx configurations) -
Environment Variables:
-
Restart Policy:
unless-stopped
Custom Scripts and Additional Setup¶
The deployment includes several automated configuration steps:
-
Nginx Proxy Configuration: A script modifies the Nginx user configuration files to redirect traffic from port 80/443 to the internal ISPConfig service running on
127.0.0.1:8080. -
ISPConfig Password Initialization: An automated SQL command is executed via
mysqlto set the admin password in thedbispconfig.sys_usertable using an MD5 hash. -
Nginx Vhost Setup: A custom Nginx virtual host (
000-ispconfig.vhost) is created and symlinked tosites-enabledto ensure the panel is reachable via the FQDN on port 8080.
Application Update Instructions¶
To update the main ISPConfig application, follow these steps:
-
Manual Re-run: The installation can be updated by re-running the autoinstaller script located in
/tmp/ispconfig-ai/. -
Docker Components: If updating the Nginx-Certbot container, execute:
Location of configuration files and data¶
-
ISPConfig Configuration:
/usr/local/ispconfig/interface/lib/config.inc.php -
Nginx User Configs:
/data/nginx/user_conf.d/ -
Docker Compose (Proxy):
/root/nginx/compose.yml
Available ports for connection¶
| Port | Service | Protocol |
|---|---|---|
| 22 | SSH | TCP |
| 80 | HTTP (Redirect) | TCP |
| 443 | HTTPS (SSL via Proxy) | TCP |
| 8080 | ISPConfig Panel | TCP |
Starting and Stopping the application¶
The management of services is handled via systemd:
-
Starting/Restarting Nginx:
-
Starting/Restarting PHP-FPM (8.3):
-
Managing Docker Container:
Proxy Servers¶
The system uses a dual-layer Nginx setup:
-
Host Nginx: Acts as the primary entry point, handling SSL termination via Certbot and proxying requests to the internal service.
-
Internal Service: The ISPConfig panel runs on port
8080using PHP-FPM via a Unix socket for high performance.