A year ago I upgraded ubuntu from 22 to 24 by mistake.
Since then, HestiaCP still works but doesn’t update anymore. Always the same well known error messages:
W: Unable to read /etc/apt/-/ - DirectoryExists (2: No such file or directory)
W: Unable to read /etc/apt/sources.list.d/hestia.list - RealFileExists (2: No such file or directory)
Now, if I reinstall my entire server, I have backups of the HestiaCP user folders, but what about all HestiaCP system configs? Meaning all the domains, emails, SPF, DKIM, DMARC, etc…
Do I have to reconfigure everything again?
After a clean install of HestiaCP on an empty server, will restoring the backup work right away without anything more? Any way to set 100% of its config back to the state it was before reformatting?
All users present, all mailboxes, all DBs, etc…?
Thanks for any help.
Yes, moving from 22.04 to 24.04 got everything screwed.
I have another 24.04 server on which I natively installed HestiaCP and everything’s fine, including auto-updates.
After that, run apt update. If you don’t see any errors, you can run apt full-upgrade. Before upgrading, however, I recommend creating a snapshot of the server (if snapshots are available for your server).
Thanks for your instructions. It looks like the apt sources are recreated.
But then, the apt update seems to work, but the full-upgrade screws everything up.
First, the hestiacp upgrade, the first one shows an error: [ - ] Now applying patches and updates for version v1.9.0... PHP Fatal error: Uncaught Error: Class "Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig" not found in /usr/local/hestia/func/internal/sanitize_html.php:9 Stack trace: #0 {main}
For the full-upgrade, I ran it twice (after restoring the snapshot in between). First I said Y to all replacements, and the second time N to all replacements to keep the config files.
In both cases.
With Y, most of my websites don’t work at all. All certificates are lost.
With N, nothing works at all. No websites. several nginx restart errors during the full-upgrade.
So I’m back to my snapshot.
I did get an email after the full-upgrade telling me that hestia updated to 1.9.8
I’ve migrated systems frequently, and Hestia backup includes a full mail migration, including emails and mailboxes. You can also transfer templates (if any) and firewall settings. Restoring them on the new server is also easy.
Ok but what about all the firewall, certificate template configs, domains, etc.. Does everything follow?
Copying all templates is one thing, but re-attributing them to the correct domains, etc…
I’ll try later the above instructions. My wife currently works on emails, so I can’t shut down the server
Transfer the backup and run it on the new server — your email will be exactly as it was, and the certificates will also be transferred completely. After that, without shutting down the old server, transfer anything that might be missing, such as templates in /usr/local/hestia/data/templates/web/ if you created them, as well as the firewall configuration at /etc/iptables.rules, database settings at /etc/mysql/mariadb.cnf, and so on.
Adding the composer admin user, I have no more errors.
I said N to all upgrades in order to keep all my current nginx, php-fpm configs, etc…
Rebooted.
The server works fine.
Had just a warning message for each of my domains: nginx: [warn] "ssl_stapling" ignored, no OCSP responder URL in the certificate "/home/sjordi/conf/web/[domain].com/ssl/[domain].com.pem"
Then I tried the curl -fsSLm30 ``https://7j.gg/hcpver`` | bash
command.
It looks like nothing has changed
now is MySql screwed in some way?
If I get back in time in the log file, we have that only error message again and again.
It might be the culprit to stop the built-in HestiacCP update process 2026-08-07 01:10:06 v-update-sys-rrd-mysql 'daily' [Error 12]
deb [arch=amd64 signed-by=/usr/share/keyrings/hestia-keyring.gpg] ``https://apt.hestiacp.com/`` noble main
and
Hit:1 ``https://deb.nodesource.com/node_20.x`` nodistro InRelease Hit:2 ``https://apt.hestiacp.com`` noble InRelease Get:4 ``` http://security.ubuntu.com/ubuntu ```` noble-security InRelease [126 kB] Hit:3 https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/ubuntu noble InRelease Hit:5 Index of /ubuntu noble InRelease Hit:6 Index of /ondrej/php/ubuntu noble InRelease Hit:7 Index of /ubuntu noble-updates InRelease Hit:8 Index of /packages/mainline/ubuntu/ noble InRelease Hit:9 Index of /ubuntu noble-backports InRelease Get:10 Index of /ubuntu noble-security/main amd64 Packages [927 kB] Get:11 Index of /ubuntu noble-security/universe amd64 Packages [1200 kB] Fetched 2253 kB in 3s (877 kB/s) Reading package lists… Done Building dependency tree… Done Reading state information… Done 27 packages can be upgraded. Run ‘apt list --upgradable’ to see them.` ``
I did that several times, but this time, it seems to try to update HestiaCP…
It shows some symphony errors, but… here is the output
And the problem is the nginx restart error
Hestia Control Panel Software Update
Version: 1.9.9
=============================================================================
[ ! ] IMPORTANT INFORMATION:
Default configuration files and templates may be modified or replaced
during the upgrade process. You may restore these files from:
Backup directory: /root/hst_backups/100820261608/
Installation log: /root/hst_backups/100820261608/hst-upgrade-100820261608.log
[ * ] Backing up existing templates and configuration files...
[ ! ] Performing system health check before proceeding with installation...
[ ! ] Adding missing variable to hestia.conf: WEB_TERMINAL ('false')
[ ! ] Adding missing variable to hestia.conf: WEB_TERMINAL_PORT ('8085')
[ ! ] Adding missing variable to hestia.conf: SERVER_SMTP_PORT ('')
[ ! ] Adding missing variable to hestia.conf: BACKUP_INCREMENTAL ('no')
[ ! ] Adding missing variable to hestia.conf: ROOT_USER ('admin')
[ ! ] Duplicated keys found repair config
[ * ] Health check complete. Starting upgrade from 1.8.12 to 1.9.9...
[ - ] Now applying patches and updates for version v1.9.0...
PHP Fatal error: Uncaught Error: Class "Symfony\Component\HtmlSanitizer\HtmlSanitizerConfig" not found in /usr/local/hestia/func/internal/sanitize_html.php:9
Stack trace:
#0 {main}
thrown in /usr/local/hestia/func/internal/sanitize_html.php on line 9
info: The user hestiamail' is already a member of hestia-users'.
[ - ] Now applying patches and updates for version v1.9.1...
[ - ] Now applying patches and updates for version v1.9.2...
[ - ] Now applying patches and updates for version v1.9.3...
[ - ] Now applying patches and updates for version v1.9.4...
[ - ] Now applying patches and updates for version v1.9.5...
[ * ] Fixing spamd execution in Exim when reject_spam is off
[ * ] Adding ESMTP to Exim smtp banner
[ - ] Now applying patches and updates for version v1.9.6...
[ - ] Now applying patches and updates for version v1.9.7...
[ - ] Now applying patches and updates for version v1.9.8...
[ * ] Fixing Subsystem sftp config
[ * ] Updating composer for users:
- admin...
[ + ] Fixing phpmyadmin.inc for Nginx
[ - ] Now applying patches and updates for version v1.9.9...
[ ! ] Updating default web domain templates...
[ ! ] Updating default mail domain templates...
[ ! ] Updating default DNS zone templates...
[ ! ] Upgrading File Manager to version 7.14.4...
[ ! ] Upgrading Roundcube to version 1.6.17...
[ ! ] Update Hestia PHP dependencies...
[ * ] Updating Cloudflare IP Ranges for NGINX...
[ * ] Upgrading phpMyAdmin to version 5.2.3...
Installation tasks complete, performing clean-up...
[ * ] Rebuilding user accounts and domains, this may take a few minutes...
- admin...
- sjordi...
[ * ] Restarting services...
Error: nginx restart failed
Upgrade complete! If you encounter any issues or find a bug,
please take a moment to report it to us on GitHub at the URL below:
https://github.com/hestiacp/hestiacp/issues
Read the release notes to learn about new fixes and features:
https://github.com/hestiacp/hestiacp/blob/release/CHANGELOG.md
We hope that you enjoy using this version of Hestia Control Panel,
have a wonderful day!
Sincerely,
The Hestia Control Panel development team
I rebooted the server and checked everything but none of my websites work
All websites are running inside containers so I’m not sure all are affected by the nginx error since they embed their own nginx. But it might be related to all the certificates used in each, linked to all .tpl and.stpl?
Got two emails: nginx: [emerg] unknown directive "proxy_passreverse" in /etc/nginx/conf.d/domains/budget.tiltsoft.com.ssl.conf:19 nginx: configuration file /etc/nginx/nginx.conf test failed
and
srv586445.hstgr.cloud has been upgraded from Hestia Control Panel v1.8.12 to v1.9.9. Installation log: /root/hst_backups/100820261608/hst-upgrade-100820261608.log