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 or sudo privileges are required for the installation process.

  • Network Configuration:

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

  • TCP Port 443 is used for external HTTPS traffic via the Nginx proxy.

  • System Optimizations: BBR (Bottleneck Bandwidth and Round-trip propagation time) congestion control and fq queuing discipline are enabled to optimize network performance.

FQDN of the final panel on the hostkey.in domain

The management interface is accessible via a specific subdomain based on the server ID.

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

File and Directory Structure

The following directories are used for configuration and certificate management:

  • /root/nginx: Contains the Docker Compose deployment files for the Nginx proxy.

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

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

  • /etc/letsencrypt: Volume used by the Nginx container to store SSL certificates.

Application installation process

The installation follows a multi-step procedure involving system preparation and script execution:

  1. System Preparation: The OS is updated via apt upgrade, and essential utilities such as curl, wget, gnupg, ca-certificates, and dnsutils are installed.

  2. Script Acquisition: The official HestiaCP installation scripts (hst-install-ubuntu.sh for Ubuntu or hst-install-debian.sh for Debian) are downloaded from the official repository to /root/.

  3. Core Installation: An automated installation script is executed with the following parameters:

  4. Hostname: Set according to the template hestiacp{Server_ID_from_Invapi}.hostkey.in.

  5. Port: Configured to 8083.

  6. User: The default admin user is created (pre-existing admin users are removed prior to installation).

  7. Services Included: Apache, PHP-FPM, VSFTPD, Named, MySQL, Exim, Dovecot, ClamAV, SpamAssassin, IPTables, Fail2Ban, and the API.

  8. Proxy Setup: A Docker-based Nginx container is deployed to handle SSL termination via Certbot.

Access Rights and Security

Security is managed through several layers:

  • Firewall: iptables is installed and configured as part of the HestiaCP suite.

  • Intrusion Prevention: fail2ban is enabled and configured to monitor authentication logs (/var/log/auth.log) to prevent brute-force attacks.

  • System Logging: rsyslog is ensured to be running to provide necessary log data for security monitoring.

Databases

HestiaCP installs and manages its own database environment:

  • Service: MySQL.

  • Management: Managed directly through the HestiaCP control panel interface.

Docker Containers and Their Deployment

The deployment utilizes a Docker container to manage SSL certificates and Nginx proxying.

Nginx Proxy Container

  • Image: jonasal/nginx-certbot:latest

  • Ports: Uses network_mode: host.

  • Volumes:

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

  • /data/nginx/user_conf.d:/etc/nginx/user_conf.d

  • Environment Variables: Managed via an external .env file located at /data/nginx/nginx-certbot.env.

  • Restart Policy: unless-stopped

Application Update Instructions

To update the main HestiaCP application, follow these steps:

  1. Log in to the server via SSH.

  2. Run the system package manager updates and upgrade the installed packages:

    apt update && apt upgrade -y
    

  3. Follow any specific prompts provided by the HestiaCP management tools if applicable.

Location of configuration files and data

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

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

  • HestiaCP System Files: /usr/local/hestia/

Available ports for connection

Service Port Protocol
HestiaCP Panel (Internal) 8083 TCP
HTTPS Proxy (External) 443 TCP

Starting and Stopping the application

The core services are managed via systemd. To manage the Nginx proxy container, use:

  • Start/Restart Container:

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

  • Stop Container:

    cd /root/nginx && docker compose down
    

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