Keeping Hostctl up to date

How the panel finds and installs new Hostctl releases, turning on automatic installs, and what to do when an update fails.

For server admins: the steps need admin access to the panel or the server.

Hostctl checks for a new release every 6 hours and tells you when one is out. It installs it when you press Update now, or by itself if you turn on automatic installs. An install backs up the panel's own database first and checks the panel's health afterwards.

This covers Hostctl itself. The operating system's packages, and the software Hostctl pins such as Node.js, are kept current separately: see Installing features and keeping server software current.

Installing an update

  1. Open Server → System → Updates. When a release is waiting, the page shows it, with what's new since your version when the notes are available.
  2. Press Update now and confirm.
  3. The output appears below. When it says the update is queued, the panel stops, installs the release, updates its database and starts again. The page reconnects by itself, usually within a minute.
  4. Reload the page and check Last update. Succeeded means every health check passed.

Websites, mail and databases keep running while the panel restarts. Only the panel itself is briefly unavailable.

Check again asks for the newest release straight away instead of waiting for the next check.

Where updates come from

Update source on the Updates page names the branch this server follows. Servers normally follow release, which only moves when a new version is published, so you're never offered work in progress.

When an update is waiting, a badge marks Updates in the menu, and Server → Overview lists "A Hostctl update is available" under Needs attention.

Installing updates automatically

From SSH, turn on automatic installs:

sudo /opt/hostctl/bin/auto-update enable

The server then checks every 30 minutes and installs a new release within about half an hour of its publication, with the same database backup and health checks as Update now. Results still appear under Last update.

Check or undo it with:

sudo /opt/hostctl/bin/auto-update status
sudo /opt/hostctl/bin/auto-update disable

The Updates page doesn't show whether automatic installs are on. Use auto-update status to find out.

A good pattern is to turn this on for a test server and update production by hand once the test server has run the release for a while.

What Last update shows

  • The version and when the install finished.
  • The database backup taken before anything changed. The newest five are kept on the server. "No backup recorded for this update" means this server's setup doesn't take one, so take your own before updating.
  • Health checks: the panel answers, its services are running, the nginx configuration is valid, the installed version is the one expected, and running containers are still running.
  • Old releases removed: Hostctl keeps the running release and a few before it, and removes older ones after a healthy update.

Update now is missing

If the page says Updating from the panel is not enabled, the server is missing the permission the panel needs to start the updater. The notice shows the exact command to restore it. Run that over SSH, then reload the page.

You can also update from SSH at any time:

sudo /opt/hostctl/bin/update

An update failed

Last update names the step that failed. Start there.

Failed during the database backup. Nothing was installed and the panel started again on the version you had. The usual cause is a full disk: free some space, then try again.

The output says "Update failed" and the panel is still running. Fetching or building the release failed, before anything was changed. If the output mentions GitHub, check that the server can reach github.com over HTTPS, then try again.

Installed, checks need attention. The new version is installed, but at least one health check failed. The list shows which service, setting or container to look at.

Failed during installing the release, database migrations or starting the panel. The panel may not come back by itself. From SSH, read what happened:

sudo tail -n 100 /var/lib/hostctl-isolation/update/install.log
sudo systemctl status hostctl

The log from fetching and building the release is in /var/lib/hostctl-isolation/update/build.log. Keep both logs and the backup named under Last update before trying anything else.

Could not check for updates. The page shows why. "Unable to reach GitHub" means the server can't get out to github.com. "Private repository access failed" means the server's update key needs checking by whoever set the server up.