TurboPanel Docs
Deployment

Upgrade and rollback

Every release is a GitHub Release with its packages as assets. The installer and the daemon both follow a channel — release (the latest promoted release), rc (the current release candidate) or canary (the newest green build of trunk, for a canary environment) — and resolve that channel's manifest.json straight from GitHub. A host keeps following the channel it was installed on, and one with no channel follows release. The control plane and the daemon are separate packages. A managed upgrade installs them in a fixed order. Re-running the installer still moves both on this host.

A run pins the manifest URL and the target commit it resolved when it started. A channel that moves while the rollout is in progress does not change the bytes a later batch installs.

Order

On a self-hosted host the order is fixed:

  1. This host's daemon — the co-located daemon, the one enrolled on the control plane's own machine.
  2. Control plane — the control plane package and the static UI on that same host.
  3. Other servers — every other daemon, in batches.

The servers step does not start until both earlier steps are on the target build. A failed control-plane step fails the run and leaves that gate shut. A trunk channel has no control-plane package, so that step is skipped and the gate needs only the co-located daemon on target.

Diagram will load when scrolled into view

TurboPanel High Availability deploys the control plane itself. Admin → Updates shows that version as Managed by TurboPanel and rolls out daemons only. There is no per-server Update on either edition: the old per-server routes answer 410 updates_automatic.

Mixed versions stay connected the whole time. The version floors do not change, and a daemon below its floor still holds its socket so the update can reach it. See Version compatibility.

First upgrade onto this release

Backup and automatic rollback need a co-located daemon that advertises managed-upgrade-v1. A daemon from before this release does not. Pre-flight names that and gives the recovery command. Take an operator backup of the control-plane database first — this transition cannot use the managed backup yet — then update only the daemon, pinned to one verified manifest. On a host that already runs this control plane, that command refreshes the co-located daemon in socket mode (daemon-colocated-refresh.yml). It does not run the remote-server installer (daemon-install.yml), so daemon.env keeps dialing the local instance socket, shared state and config ownership stay as they are, and the daemon unit still starts after the control plane. The control plane, UI, and database are not replaced. When the new daemon attaches and advertises managed-upgrade-v1, the next automatic check, or Update Now, starts the upgrade.

Terminal
curl -fsSL https://turbopanel.sh \
  | TURBOPANEL_DAEMON_ONLY=1 \
    TURBOPANEL_MANIFEST_URL=https://github.com/TurboPanel/turbopaneld/releases/download/<tag>/manifest.json \
    sh

Replace <tag> with the daemon release you are upgrading to, as listed on the daemon's GitHub Releases (for example v0.1.1). It must be a release that advertises managed-upgrade-v1; v0.1.0 does not.

Updates are automatic

Updates install on their own, on both editions. Each install checks its channel once an hour, at its own minute of the hour (picked once, so many installs never ask the release servers at the same moment). When the check finds something behind (a connected server's daemon, or on self-hosted the control plane or the web interface), no update is running and updates are not paused, it starts an update in the order above. There is no on/off switch and no maintenance window, and no step is retried or cancelled by hand. A superadmin can run that same check at once with Update Now (below).

  • One update at a time. A run never grows: a server added, reconnected or still behind after an update was planned is picked up by the next check after that update ends.
  • Failed servers wait, then try again. A server whose update failed at a build is skipped with retry_later until its wait is over: 1 hour, doubling each time, at most 24 hours. If this host's daemon or the control plane is still waiting, the check starts nothing, because the other servers could not go ahead anyway.
  • Nothing to do starts nothing. A check whose every step would already be on target saves no update, so the history lists real updates only.
  • A development install is the exception. A control plane run from source never checks and never updates on its own, and has no Update Now. A superadmin builds the daemon from the local checkout and pushes it to the connected servers with Build and Push Daemon (Push Daemon when the built daemon is already current) on Admin → Updates.

From the app

Admin → Updates (/admin/updates). An admin or superadmin account.

The Status card reads TurboPanel is up to date, Update Waiting, Updating…, Needs Attention or Updates Paused, says what is waiting, and shows Last Checked and Next Check.

  • Update Now (superadmins, release installs on both editions) runs the hourly check at once: it asks the release servers for the newest build and, when something is behind, starts the update right away, with the same pre-flight, order, gates and retry waits as the scheduled check. It is enabled only when an update is waiting, no update is in progress and updates are not paused; otherwise the line under it says why. It does not move the next scheduled check, runs at most once a minute, and answers Already up to date. when nothing is newer. When the release server cannot be reached it says so and keeps the build it already knew. Each press is recorded in the audit log, and the update history names who started it (Started By).
  • Check Now only looks for new builds and shows them. It never starts an update and does not move the next scheduled check. It runs at most once a minute; sooner, it says how many seconds to wait.
  • Pause All Updates is a switch. Turning it on asks first (Pause All Updates?, then Pause Updates). While it is on, no new update starts. An update already in progress is not stopped: servers it has already started finish, and are tried again if they fail; servers it has not reached yet are skipped (updates_paused), and the update ends there. Update Now is disabled. Check Now still looks for new builds. Turning the switch off starts nothing right away; the next scheduled check, or Update Now, updates whatever is still behind, including the skipped servers. Each pause and resume is recorded in the activity log with who did it.

Versions lists Control Plane, Web Interface and Co-located Daemon: what is installed on disk, what is running now, and the newest build on the channel.

Progress follows the Daemon Step, then the Control Plane Step (the Web Interface Step is installed in the same step), then the other servers. Each step moves through Preparing → Downloading → Writing new files (still running the old version) → Restarting onto the new version → Checking the new version is running → Done. The control plane restarts during its step, so the browser may show a gateway error; the page comes back as TurboPanel is updating and waits until the control plane answers again.

Backup and Rollback shows the backup path and the rollback command for the update that runs next (Copy Backup Path, Copy Rollback Command). Keep the command somewhere safe before the update starts.

Servers Updated at Once is Percent (default 100) or Count, then Apply.

The control plane is Managed by TurboPanel. Connected daemons update on their own.

Connected Daemons filters All, Updating, Needs Attention and Up to Date. Servers Updated at Once is Percent or Count, then Apply.

Only one update runs at a time. The control-plane step is not finished until the daemon has checked the new build, even if the new control plane already answers as the target version, so a second update cannot start on top of one that could still be rolled back.

Batches and offline servers

SettingRangeDefault
Batch Percent1–100100
Batch Count1–10000—

Percent rounds up so a non-empty set of servers always moves at least one server. The next batch starts when every step in the current one is terminal (done, skipped, failed, rolled_back, or needs_attention); a failed step never holds the next batch. On TurboPanel High Availability a large batch drains over several maintenance ticks so one tick does not send it to every server at once.

A server that is offline is handled in one of three ways:

When it went offlineWhat happens
Before the update startedIts step is skipped at once (server_offline). It updates at the next automatic check after it reconnects (within the hour), unless updates are paused.
During the update, before its install was sentIts step waits (waiting) and is sent when the daemon reconnects. After 15 minutes offline it is skipped (server_offline) and updates at the next check after it reconnects, unless updates are paused.
In the middle of its own installIts step is never skipped, because the install may still finish. After the long wait it becomes needs_attention.

This host's daemon and the control plane are never skipped: offline, their step becomes needs_attention, because the other servers depend on them. A step with no progress for 15 minutes is sent again, up to 3 times, then needs_attention. A step that rolled back is tried once more, then needs_attention.

Network failures, older builds and your apps' releases

Short network failures are retried. A DNS hiccup or a GitHub 5xx should not fail a whole update, so the fetches of the manifest and the downloads retry, in two places:

FetchRetriedNot retried
The installer, run.sh (curl)A failed name lookup (curl exit 6) and a refused connection (exit 7): 4 attempts, waiting 2, 4 and 8 seconds. Other transient failures (HTTP 408, 429 and 5xx, timeouts): 3 attempts, 3 seconds apart. A download whose checksum does not match: up to 5 attempts, 3 seconds apart4xx responses other than 408 and 429, and a signature failure
The daemon's update readsHTTP 502, 503 and 504; 429, honoring Retry-After up to 10 seconds; resets, timeouts and DNS lookup failures: 4 attempts, waiting 2, 4 and 8 secondsEvery other response, including 4xx, and anything wrong with the body or its signature

When the attempts run out, the last error is shown unchanged. The installer's error message names the URL without its query string, because a signed download link can carry a token.

An older build is refused. The daemon and the control plane refuse a validly signed manifest older than the build they run. For a managed update this shows as a step with downgrade_refused when a server already runs something newer than the target; a server is never downgraded. To have the daemon on one host accept an older signed build deliberately, set TURBOPANEL_ALLOW_DOWNGRADE=1 in the daemon's environment (it lifts the daemon's check only, not the control plane's).

Secrets after rolling a daemon back. Once a server's daemon registers its sealing key, the control plane seals every secret it sends to that server, so only that daemon can open it. A daemon build from before sealed secrets cannot open them, so after you roll a server back to such a build, every deploy there fails when it reads its secrets. To recover:

  1. Open Admin → Access → Control Plane Identity and find the server under Sealed Secrets. You need to be the superadmin.
  2. Choose Clear Sealing Key, type the server name, and confirm. You may be asked to sign in again first.
  3. The server now gets its secrets unsealed. When you update it to a current build again, its daemon registers its key again when it connects, and its secrets are sealed again.

The control plane refuses to clear the key while a daemon that opens sealed secrets is connected to that server. Each clear is recorded in the audit log.

A rollback to a build with sealed secrets needs no clear

Clearing the key is only for a server rolled back to a build from before sealed secrets. A server rolled back to a build that already has sealed secrets keeps its sealing key and registers it again when it connects, so its secrets keep working.

A restarted control plane is never installed over twice. If the control-plane step restarts and the daemon then reports nothing for TURBOPANEL_UPGRADE_VERIFY_TIMEOUT_MINUTES (20 by default), the step ends as needs_attention with verify_timeout and the run finishes, so the next update can start. The step says whether the control plane is running the target build. Check the daemon log on that host; the next automatic check tries again once that step's wait is over.

Updating the daemon does not make old releases roll-back-able

Rolling an app back to an earlier source release uses a record the daemon wrote on that server when it published the release. A release published before the daemon wrote records (a daemon that predates release records) has none, and an update does not create it: that release cannot be rolled back until you redeploy it. Releases published afterwards are unaffected. See Releases and rollback.

Pre-flight, backup, and .prev

Before anything is swapped, the host checks:

CodeMeaning
preflight_diskNot enough free space, or the free-space check itself failed. A daemon install needs 512 MiB on /opt/turbopanel, 128 MiB on the state directory, and 256 MiB on the temp directory. A control-plane install needs 1 GiB on the install root and 1 GiB on the backup directory.
preflight_manifestThe pinned manifest could not be fetched, verified, or matched to targetCommit.
preflight_trustAutomatic-update TLS could not be established (public trust or the Platform CA). The daemon does not skip verification.
preflight_backupturbopanel-database is not running, so the control-plane dump cannot be taken.
preflight_in_progressAnother install is already running on that host.

The control-plane step also requires the co-located daemon to advertise managed-upgrade-v1. Without it, pre-flight stops and names the installer command above.

The automatic backup is written before the control-plane package swap, at:

Text
<backup dir>/panel/<upgrade id>/

The backup directory defaults to /backup (TURBOPANEL_BACKUP_DIR moves it). Each attempt keeps a pg_dump -Fc of the control-plane database, a tarball of /etc/turbopanel, and meta.json (including the migration-history fingerprint). The newest three attempts are kept.

One previous generation stays beside the new files, by rename:

PackagePrevious generation
Daemon/opt/turbopanel/bin/turbopaneld.prev, turbopaneld.js.prev on hosts that run the JS runtime, /opt/turbopanel/share/orchestration.prev
Control plane/opt/turbopanel/bin/turbopanel.prev, /opt/turbopanel/lib/libduckdb.so.prev, /opt/turbopanel/share/ui.prev

Automatic rollback

After the control plane restarts, the daemon polls GET /api/health on the control plane socket until version and revision.commit match the pinned manifest. It waits up to 10 minutes by default, because a small host can take several minutes to start the new build and apply migrations, and a rollback is worse than waiting. TURBOPANEL_UPDATE_HEALTH_TIMEOUT_SECONDS (30 to 3600, in the daemon's environment, /etc/turbopanel/daemon.env) changes the wait; an unset or out-of-range value keeps 10 minutes. A timeout or a mismatch restores the .prev generation. The database is restored from the dump only when the migration fingerprint changed. A healthy restore reports rolled_back with health_timeout, health_mismatch, or restart_failed. A restore that does not come back reports failed / recovery_required and includes the backup path plus the commands below.

A daemon self-update arms an update guard for about 10 minutes. If the new build never connects (for example it keeps crashing), the guard's deadline timer restores the daemon .prev files and restarts turbopaneld. Detail: Refresh a stuck daemon.

Recovery command

Run as root on the control-plane host, with the id of the update that failed: the last part of that update's page address in the update history (/admin/updates/runs/<id>), which is also its folder under <backup dir>/panel/. Before a control-plane update starts, Backup and Rollback on Admin → Updates shows the same command with the next update's id filled in (Copy Rollback Command):

Terminal
sudo -n /opt/turbopanel/share/orchestration/scripts/tp-orchestrate playbook -i localhost, -c local \
  -e turbopanel_upgrade_id=<upgrade id> \
  instance-rollback.yml

That restores the .prev builds and, when the migration fingerprint changed, the database dump under /backup/panel/<upgrade id>/. The helper is the installed absolute path, so it runs when the control plane is stopped and tp-orchestrate is not on PATH. To reinstall one pinned control-plane manifest instead:

Terminal
sudo -n /opt/turbopanel/share/orchestration/scripts/tp-orchestrate update-instance \
  --channel release \
  --manifest-url https://github.com/TurboPanel/turbopanel/releases/download/v0.1.0/manifest.json \
  --no-start

--manifest-url on that verb is the control-plane pin (TURBOPANEL_INSTANCE_MANIFEST_URL). It does not change the daemon pin (TURBOPANEL_MANIFEST_URL).

Pin a package by hand

The same pins work from the installer. Each package keeps its own pin; a later channel install that does not name a pin clears it.

Pin the control plane on its own host. TURBOPANEL_INSTANCE=1 marks the run as a control-plane install; without it, a run that names a pin is read as a daemon enrolment and stops asking for TURBOPANEL_LICENSE:

Terminal
curl -fsSL https://turbopanel.sh \
  | TURBOPANEL_INSTANCE=1 \
    TURBOPANEL_INSTANCE_MANIFEST_URL=https://github.com/TurboPanel/turbopanel/releases/download/v0.1.0/manifest.json sh

Pin a remote server's daemon. On a server enrolled with a self-hosted control plane, also pass TURBOPANEL_HOST with that control plane's URL, as in Refresh a stuck daemon; without it the server is enrolled with the TurboPanel High Availability control plane:

Terminal
curl -fsSL https://turbopanel.sh \
  | TURBOPANEL_LICENSE=<license> \
    TURBOPANEL_HOST=<control plane URL> \
    TURBOPANEL_MANIFEST_URL=https://github.com/TurboPanel/turbopaneld/releases/download/v0.1.0/manifest.json sh

Pins accept release manifests only. Each package's pin must be a manifest.json or manifest-<version>.json under its own repository's GitHub Releases (https://github.com/TurboPanel/<repo>/releases/download/<tag>/… or …/releases/latest/download/…). The installer and the root helper refuse anything else, including a URL with .., a percent-encoded character, a port or a query string. A TURBOPANEL_*_MANIFEST_URL pin in daemon.env that does not match is ignored, as if unset.

The control plane checks migration history at every boot and refuses to serve a database migrated by a newer release than the binary (database was migrated by files this build does not ship). Roll the database back with the binary, or move the binary forward.

The daemon refuses a control-plane target below MIN_SUPPORTED_INSTANCE_VERSION (today 0.1.22; only the target's base X.Y.Z is compared, so a 0.1.22-canary build passes). A target it cannot parse is allowed. Daemon self-update does not consult that floor.

History

Finished runs stay for 365 days, and at least the newest 50. Successful steps (done, skipped) are pruned after TURBOPANEL_UPGRADE_STEP_RETENTION_DAYS (default 14). Failed steps (failed, rolled_back, needs_attention) stay 90 days. The run row keeps its summary after the steps are gone. See Control plane configuration.

Edit on GitHub

Last updated on

On this page