HestiaCP is an actively developed fork of popular VestaCP, whos development somewhat stalled in the last little while.
There’s a couple of steps we can take to make our crispy fresh HestiaCP install even crispier!
Depending on your needs, you can make a full install and then remove unnecessary packages, or you can opt to not include it in the installation in the first place:
Install options
First, we need to download the installation script:
wget https://raw.githubusercontent.com/hestiacp/hestiacp/release/install/hst-install.sh
No we can add additional parameters to install only what we need
(-h lists all available options or use the Install string generator):
bash hst-install.sh -h
Installing without Bind and with Multi-PHP support:
bash hst-install.sh -k no -o yes
You can of course customise your installer, depending on your specific server use case (for DNS cluster, there is no use of vsftp/apache/nginx and so on).
Add host domain SSL certificate (Lets Encrypt)
To add Lets Encrypt certificate host domain certificate, set the hostname in the GUI or with CLI command:
v-change-sys-hostname server.domain.com
Then run CLI command to add certificate to host domain. There are some prerequisites:
- Hostame must be valid FQDN with DNS pointing to the server.
- Owner (or admin) account must be valid and not suspended as the script checks if any Hestia user already owns the hostname as a web domain. If none is found, it defaults to admin user.
v-add-letsencrypt-host
Set host domain SSL certificate (any cert)
To set or update host domain certificate to any cert you are already using for a specific hostname (domain), run the following command in CLI. Useful for paid or wildcard SSL certificates or sharing a main website domain with the panel.
Options: USER HOSTNAME
v-update-host-certificate admin domain.com
Restore user or only specific domain
Restoring complete user data from a HestiaCP (or VestaCP) backup:
Options: USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]
v-restore-user admin admin.2020-07-10.tar
We can also restore only a specific domain, database, or any other part of the user data from the backup tar file. Let’s say we just want to restore domain.com and its respectful database admin_domaindb, while saving the log file to restore.log:
Options: USER BACKUP [WEB] [DNS] [MAIL] [DB] [CRON] [UDIR] [NOTIFY]
v-restore-user admin admin.2020-07-10.tar 'domain.com' 'no' 'no' 'admin_domaindb' 'no' 'no' yes >> /usr/local/vesta/log/restore.log 2>&1
Change domain name (not alias)
To change the domain name (not just the alias):
Options: USER DOMAIN NEW_DOMAIN [RESTART]
v-change-web-domain-name user domain.com newdomain.com yes
Change domain owner
To move domain to another user (change the owner of the domain):
Options: DOMAIN USER
v-change-domain-owner domain.com newuser
Change DB owner
To move database to another user (change the owner of the database):
Options: DATABASE USER
v-change-database-owner db_name newuser
Get the DKIM public key
Run the following command to get the DKIM public key:
Options: USER DOMAIN [FORMAT]
v-list-mail-domain-dkim user maildomain.com
Use the public key in TXT record in your DNS:
mail._domainkey IN TXT "v=DKIM1; k=rsa; p=<your_public_key>"