Deployment Overview of Ispconfig on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met:
-
Operating System: Ubuntu (specifically Jammy Jellyfish/22.04 is supported) or Debian.
-
Privileges: Root or sudo access is required for all installation steps.
-
Domain Configuration: A valid FQDN must be assigned to the server and correctly mapped in
/etc/hosts. -
Network Ports: The following TCP ports must be open:
-
22(SSH) -
80(HTTP) -
443(HTTPS) -
8080(ISPConfig Interface)
FQDN of the final panel on the hostkey.in domain¶
The ISPConfig interface is accessible via a specific subdomain template:
| Parameter | Value |
|---|---|
| Prefix | ispconfig |
| Domain | hostkey.in |
| Full template | ispconfig{Server_ID}.hostkey.in |
File and Directory Structure¶
The deployment utilizes several specific paths for configuration and data management:
-
ISPConfig Interface:
/usr/local/ispconfig/interface -
Nginx Configuration (User):
/data/nginx/user_conf.d/ -
Nginx Compose Files:
/root/nginx/compose.yml -
Certbot Secrets: Managed via a Docker volume named
nginx_secrets. -
ISPConfig Log File:
/root/ispconfig-ai-run.log
Application Installation Process¶
The installation of ISPConfig is performed using an automated installer script and manual configuration steps:
-
Environment Preparation: The system updates the APT cache, installs base helpers (
wget,curl,ca-certificates, etc.), and ensuresufwis installed and configured. -
Docker Setup: Docker is installed to manage the Nginx-Certbot proxy service.
-
MariaDB Preparation: A corporate MariaDB image (
docker-srv.hostkey.com/docker-anonymous/bitnami/mariadb:latest) is pulled to ensure version consistency. -
ISPConfig Installation: The official ISPConfig autoinstaller script is downloaded and executed with the following parameters:
-
--use-nginx(Nginx is used as the web server). -
--no-roundcube(Roundcube is not installed by default). -
--no-mail,--no-dns,--no-ftp(Minimal installation mode). -
--unattended-upgrades(Enabled for security updates). -
PHP Configuration: PHP 8.1 FPM is installed and configured to serve the ISPConfig interface via a Unix socket (
/run/php/php8.1-fpm.sock). -
Nginx Integration: A custom Nginx vhost is created at
/etc/nginx/sites-available/ispconfig.vhostwhich listens on port8080.
Access Rights and Security¶
Security is managed through several layers:
-
Firewall (UFW): The firewall is enabled with rules specifically allowing traffic on ports 22, 80, 443, and 8080.
-
File Permissions:
-
ISPConfig temporary directories (
/usr/local/ispconfig/interface/tempand/usr/local/ispconfig/interface/lib/classes/IDS/tmp) are owned bywww-datawith0770permissions. -
The configuration file
/usr/local/ispconfig/interface/lib/config.inc.phpis set to0640and owned by thewww-datagroup to allow web server access while restricting other users.
Databases¶
The application uses a MariaDB database for storage:
-
Database Name:
dbispconfig -
Connection Method: Localhost via socket/TCP.
-
Root Password: Defined during installation (defaulting to
admin123). -
Application User: An
ispconfiguser is created with a specific password defined in the configuration files.
Docker Containers and Their Deployment¶
The deployment utilizes one primary application container for SSL management:
Nginx-Certbot Container
-
Image:
jonasal/nginx-certbot:latest -
Network Mode:
host -
Ports: Binds to host ports 80 and 443 via host network mode.
-
Volumes:
-
nginx_secrets:/etc/letsencrypt(Stores SSL certificates). -
/data/nginx/user_conf.d:/etc/nginx/user_conf.d(Provides custom Nginx configurations). -
Environment Variables:
-
CERTBOT_EMAIL: Set to the administrative contact email. -
Restart Policy:
unless-stopped
Custom Scripts and Additional Setup¶
Several actions are performed during deployment that go beyond standard package installation:
-
Hostname Configuration: The system's hostname is explicitly set to the FQDN, and
/etc/hostsis updated to ensure local resolution. -
Nginx Proxy Configuration: A configuration script modifies Nginx user files to include a
proxy_passdirective pointing tohttp://127.0.0.1:8080, allowing the Certbot container to handle SSL termination for the ISPConfig interface. -
Database Password Update: An SQL command is executed immediately after installation to update the ISPConfig admin password in the database.
Application Update Instructions¶
To update the main application:
-
If using Docker components, navigate to
/root/nginxand run: -
For the core ISPConfig installation, follow the official upgrade procedures provided by the ISPConfig documentation.
Location of Configuration Files and Data¶
-
ISPConfig Main Config:
/usr/local/ispconfig/interface/lib/config.inc.php -
Nginx Vhost for ISPConfig:
/etc/nginx/sites-enabled/000-ispconfig.vhost -
Docker Compose (Proxy):
/root/nginx/compose.yml
Available Ports for Connection¶
| Service | Port | Protocol |
|---|---|---|
| SSH | 22 | TCP |
| HTTP | 80 | TCP |
| HTTPS | 443 | TCP |
| ISPConfig Web Interface | 8080 | TCP |
Starting and Stopping the Application¶
-
Restart Nginx:
systemctl reload nginx -
Restart PHP-FPM:
systemctl restart php8.1-fpm -
Manage Proxy Container:
-
Start:
docker compose up -d(inside/root/nginx) -
Stop:
docker compose down(inside/root/nginx)