Skip to content

Deployment Overview of HestiaCP on Server

Prerequisites and Basic Requirements

To ensure a successful deployment, the server must meet the following requirements:

  • Operating System: Ubuntu or Debian.

  • Privileges: Root access is required for the installation process.

  • Network Configuration:

  • TCP Port 8083 must be open for the HestiaCP panel access.

  • TCP Port 443 (HTTPS) must be available for web traffic via the proxy.

  • System Optimization: BBR (Bottleneck Bandwidth and Round-trip propagation time) congestion control is enabled to optimize network performance.

FQDN of the final panel on the hostkey.in domain

The management panel is accessible via a specific subdomain template:

Parameter Value
Prefix hestiacp
Domain hostkey.in
Full template hestiacp{Server_ID_from_Invapi}.hostkey.in

File and Directory Structure

The following directories are utilized for configuration and management:

  • /root/nginx: Contains the Docker Compose configuration for the Nginx proxy service.

  • /data/nginx/user_conf.d: Stores custom Nginx configuration files for domain routing.

  • /data/nginx/nginx-certbot.env: Environment file containing settings for Certbot.

  • /usr/local/hestia: The primary installation directory for the HestiaCP application and its binaries (e.g., cron.php).

Application installation process

The installation of HestiaCP is performed using a dedicated installation script tailored to the operating system:

  1. System Preparation:

  2. The package manager cache is updated, and essential utilities are installed (curl, wget, gnupg, apt-transport-https, ca-certificates, dnsutils, gawk, xterm, systemd-timesyncd).

  3. For Debian 12 systems, software-properties-common is also installed.

  4. The admin user and group are removed if they already exist to prevent conflicts.

  5. Script Execution:

  6. An installation script is downloaded from the official HestiaCP repository:

  7. For Ubuntu: hst-install-ubuntu.sh

  8. For Debian: hst-install-debian.sh

  9. The script is executed with the following parameters to configure the environment automatically:

  10. --hostname: Set to hestiacp{Server_ID_from_Invapi}.hostkey.in.

  11. --port: Configured to 8083.

  12. --username: admin.

  13. --apache, --phpfpm, --vsftpd, --named, --mysql, --exim, --dovecot, --clamav, --spamassassin, --iptables, --fail2ban, and --api are all enabled.

  14. Security Configuration:

  15. rsyslog is ensured to be running and enabled to allow fail2ban to monitor authentication logs via /var/log/auth.log.

  16. fail2ban is restarted to apply new logging configurations.

Access Rights and Security

  • Firewall: The installation includes iptables and fail2ban for automated intrusion prevention.

  • User Management: A dedicated admin user is created for panel management.

  • Log Monitoring: The system ensures /var/log/auth.log exists with appropriate permissions (0640) so that security services can monitor login attempts.

Databases

HestiaCP installs and manages its own database environment:

  • Service: MySQL is installed as part of the core stack.

  • Management: Database management is handled through the HestiaCP control panel interface.

Docker Containers and Their Deployment

The deployment includes a dedicated Nginx container managed via Docker Compose to handle SSL certificates and reverse proxying.

Nginx Proxy Container

  • Image: jonasal/nginx-certbot:latest

  • Network Mode: host

  • Restart Policy: unless-stopped

  • Environment Variables:

  • CERTBOT_EMAIL: Set via /data/nginx/nginx-certbot.env.

  • Volumes:

  • nginx_secrets:/etc/letsencrypt (External volume for SSL certificates).

  • /data/nginx/user_conf.d:/etc/nginx/user_conf.d (Mapping of custom Nginx configurations).

Application Update Instructions

To update the HestiaCP application, you must re-run the installation script with the same parameters used during the initial setup:

  1. Locate the installation script in the /root/ directory (hst-install-ubuntu.sh or hst-install-debian.sh).

  2. Execute the script again using the --force flag to apply updates and ensure all components are at their latest versions.

Location of configuration files and data

  • Nginx Proxy Configs: /data/nginx/user_conf.d

  • Docker Compose File: /root/nginx/compose.yml

  • HestiaCP Binaries: /usr/local/hestia/bin/

Available ports for connection

Service Port Protocol
HestiaCP Panel 8083 TCP
Web Traffic (Proxy) 443 TCP (HTTPS)

Starting and Stopping the application

The main application is managed as a collection of system services. Use the following commands:

  • Manage HestiaCP Services: Since HestiaCP integrates multiple services (Apache, MySQL, Exim, etc.), these are typically managed via systemctl.

  • Manage Nginx Proxy Container:

  • To start the proxy: docker compose up -d from within /root/nginx.

  • To stop the proxy: docker compose down from within /root/nginx.

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