Overview of Deploying Hestiacp on Server¶
The deployment process installs the Hestiacp control panel and configures an Nginx‑Certbot proxy container that automatically obtains and renews TLS certificates.
Below is a concise reference of what the server contains after the installation is finished and how to manage the components.
Prerequisites and Basic Requirements¶
- Operating System – Ubuntu or Debian (any recent release).
- Root access – The installation scripts and Docker commands are run as root.
- Networking – The server must be reachable on the public internet for Let’s Encrypt to validate the domain.
- Hardware – Minimal: 1 CPU, 1 GB RAM, 10 GB disk for the control panel, plus additional space for volumes.
The setup automatically: 1. Enables BBR congestion control (fq qdisc, bbr TCP). 2. Updates the package index and upgrades installed packages. 3. Installs utilities such as curl, wget, gnupg, apt-transport-https, ca-certificates, dnsutils, gawk, xterm, systemd-timesyncd, and software-properties-common on Debian 12.
File and Directory Structure¶
/root
│
├── hst-install-ubuntu.sh # Hestiacp installer for Ubuntu
├── hst-install-debian.sh # Hestiacp installer for Debian
└── nginx
├── compose.yml # Docker Compose configuration
└── (empty, created as needed)
/data/nginx
│
├── nginx-certbot.env # Environment file for the proxy
└── user_conf.d
└── <server_id>.hostkey.in.conf # Custom Nginx configuration files
/usr/local/hestia
└── bin
└── cron.php # Hestiacp cron script
Permissions¶
/root/nginxand/root/nginx/compose.ymlare owned byroot:rootwith modes0755and0644respectively.- Docker volumes (
nginx_secrets) are managed by Docker and contain Let’s Encrypt data in/etc/letsencrypt. - The Hestiacp binaries in
/usr/local/hestiaare owned byrootbut are executed under theadminuser created during installation.
Access Rights and Security¶
- The
adminsystem account is created by the Hestiacp installer. The password is the SSH password supplied to the installer script. - The Hestiacp web interface is exposed on port
8083of the host. Access requires theadmincredentials. - The Nginx‑Certbot container runs with
network_mode: host, meaning it listens on the host’s network stack. It is restricted to internal traffic and is secured by TLS certificates issued by Let’s Encrypt. - Firewall rules and fail2ban are enabled by the Hestiacp installer.
Databases¶
Hestiacp installs and configures a MySQL (MariaDB) instance. The database server listens on the default port 3306 and is protected by a root password set during installation. No external database is required.
Docker Containers and Deployment¶
The deployment uses a single Docker container that serves as a reverse proxy and TLS terminator.
# /root/nginx/compose.yml
volumes:
nginx_secrets:
external: true
services:
nginx:
image: jonasal/nginx-certbot:latest
restart: unless-stopped
environment:
- [email protected]
env_file:
- /data/nginx/nginx-certbot.env
network_mode: host
volumes:
- nginx_secrets:/etc/letsencrypt
- /data/nginx/user_conf.d:/etc/nginx/user_conf.d
- Image –
jonsanal/nginx-certbot:latestprovides Nginx with Certbot. - Environment – The email address for Let’s Encrypt registration is set to
[email protected]. Additional environment variables may be supplied via/data/nginx/nginx-certbot.env. - Volumes – Certificates are stored in the external Docker volume
nginx_secrets. User‑specific Nginx configuration files are mounted from/data/nginx/user_conf.d. - Network –
hostmode allows the container to bind directly to host ports, simplifying access to the web interface.
Starting the Container¶
The command is retried up to five times if the container fails to start.
Stopping the Container¶
Updating the Container¶
- Pull the newest image:
- Restart the services:
The container’s restart: unless-stopped policy ensures it restarts automatically after a reboot unless explicitly stopped.
Proxy Server (Nginx‑Certbot)¶
The Nginx‑Certbot container automatically:
- Requests TLS certificates for the domain
hestiacp<server_id>.hostkey.in. - Configures Nginx to forward HTTP/HTTPS traffic to the Hestiacp web interface on port
8083. - Handles automatic renewal of certificates.
Custom Nginx settings can be placed in /data/nginx/user_conf.d/<server_id>.hostkey.in.conf. For example, adding a custom location block or rewriting rules.
Starting, Stopping, and Updating Hestiacp¶
The Hestiacp control panel itself runs as a set of services (Apache, MySQL, Postfix, Dovecot, etc.) installed directly on the host. The installer script sets up systemd units for each component. These services are managed with standard systemd commands:
# Reload systemd daemon after installing
systemctl daemon-reload
# Start Hestiacp services
systemctl start hestiacp
# Stop Hestiacp services
systemctl stop hestiacp
# Enable at boot
systemctl enable hestiacp
If you need to upgrade Hestiacp, rerun the appropriate installer script (hst-install-ubuntu.sh or hst-install-debian.sh) with the --force flag. The installer will replace binaries, update configuration files, and restart the affected services.
The deployment process leaves the server ready to accept secure HTTP connections on the configured domain, with a fully functional Hestiacp control panel and an automated TLS renewal workflow.