Skip to content

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:

  1. System Preparation: The system updates the APT cache and installs necessary base utilities including wget, curl, ca-certificates, tar, and unzip.

  2. Docker Installation: Docker is installed to manage the Nginx-Certbot container used for SSL management.

  3. MariaDB Setup: A corporate MariaDB image (docker-srv.hostkey.com/docker-anonymous/bitnami/mariadb:latest) is pulled and prepared as the database backend.

  4. 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:

  5. Standard installation mode.

  6. Nginx as the web server.

  7. Unattended upgrades enabled.

  8. Mail, DNS, and FTP services are excluded from this specific minimal setup.

  9. 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-data user 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 0755 to 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:

  • [email protected]

  • 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 mysql to set the admin password in the dbispconfig.sys_user table using an MD5 hash.

  • Nginx Vhost Setup: A custom Nginx virtual host (000-ispconfig.vhost) is created and symlinked to sites-enabled to ensure the panel is reachable via the FQDN on port 8080.

Application Update Instructions

To update the main ISPConfig application, follow these steps:

  1. Manual Re-run: The installation can be updated by re-running the autoinstaller script located in /tmp/ispconfig-ai/.

  2. Docker Components: If updating the Nginx-Certbot container, execute:

    cd /root/nginx && docker compose pull && docker compose up -d
    

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:

    systemctl restart nginx
    

  • Starting/Restarting PHP-FPM (8.3):

    systemctl restart php8.3-fpm
    

  • Managing Docker Container:

    cd /root/nginx && docker compose up -d
    

Proxy Servers

The system uses a dual-layer Nginx setup:

  1. Host Nginx: Acts as the primary entry point, handling SSL termination via Certbot and proxying requests to the internal service.

  2. Internal Service: The ISPConfig panel runs on port 8080 using PHP-FPM via a Unix socket for high performance.

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×