Skip to content

Updates and releases ​

This page is for admins who maintain the panel and hosting servers: release channels, how releases are verified, upgrading from the panel or the command line, a safe upgrade order, rollback considerations, and update notifications in the panel.

Release channels ​

ChannelContentFor
stablevX.Y.Z releasesProduction. Installer default.
rcRelease candidates vX.Y.Z-rc.N, plus every stable releaseEarly testing. The rc channel always points to the newest release.
  • The installer uses stable when --channel is not given. The first stable release was v0.9.0; the latest is v0.12.5.
  • --version vX.Y.Z installs a specific version.
  • The channel chosen at install time is recorded in /etc/moorcp-shared/release and reused by upgrade mode, from the command line and from the panel.

Switching channels ​

Run upgrade with --channel on each server:

bash
curl -fsSL https://get-shared.moorcp.com | sudo bash -s -- upgrade --channel stable

The new channel is recorded even when the installed version is already the latest in that channel. The installer then prints Already on vX.Y.Z; channel changed to stable, and restarts the panel so Settings › Updates shows the new channel. Use --channel rc to follow release candidates again. The panel GUI has no channel switch.

Older installs move to stable ​

Before v0.9.0 there was no stable release, so every install used --channel rc. On the next upgrade, from the command line or from the panel, a server that recorded rc at that time is moved to stable once. The installer prints:

text
==> Channel rc was recorded before stable releases existed; moving this server to the stable channel (run upgrade --channel rc to stay on release candidates)

If you want to stay on release candidates, run upgrade --channel rc yourself on the command line. That choice is recorded and is not changed by later upgrades.

Signed releases ​

The installer verifies every download with openssl, without extra tools:

  1. The release list (index.json) is verified with the ed25519 public key embedded in the installer.
  2. Each version's SHA256SUMS is verified with the same key.
  3. Downloaded archives are checked against SHA256SUMS.

A tampered download is refused ("checksum tidak cocok", checksum mismatch, or "tanda tangan TIDAK cocok", signature does NOT match), and the installer stops before installing anything.

The installer is fetched over HTTPS from https://get-shared.moorcp.com. A per-version copy of the installer (vX.Y.Z/install.sh) is also listed in the signed SHA256SUMS.

The panel also verifies the index.json signature, with the same release key embedded in the panel, every time it checks for a new release. An index without a valid signature is refused.

Manual verification ​

The release public key is inside install.sh (the RELEASE_PUBKEY block). Save that block as release-signing.pub, then:

bash
V=vX.Y.Z
curl -fsSLO https://releases-shared.moorcp.com/$V/SHA256SUMS
curl -fsSLO https://releases-shared.moorcp.com/$V/SHA256SUMS.sig
bash
openssl pkeyutl -verify -pubin -inkey release-signing.pub -rawin \
  -in SHA256SUMS -sigfile <(base64 -d SHA256SUMS.sig)

Signature Verified Successfully means SHA256SUMS is genuine. Then check the archives with sha256sum -c --ignore-missing SHA256SUMS.

Downgrade protection ​

  • Upgrade refuses a version older than the installed one, unless --allow-downgrade is given. This stops a mirror from rolling a server back to a vulnerable release.
  • Versions from arguments, the panel, and the release file are validated to have the form vX.Y.Z[-rc.N].
  • When installing an agent, the panel version is only read over HTTPS.

What upgrade does ​

bash
curl -fsSL https://get-shared.moorcp.com | sudo bash -s -- upgrade

The installer detects the panel and/or agent on that server.

CaseWhat happens
Same version alreadyNo change (Already on …). With a different --channel, only the channel is recorded and the panel restarts
Panel serverBinary and GUI are replaced, agent downloads on the panel are updated, migrate up runs, moorcp-shared restarts, then the installer waits for the health check
Hosting serverThe moorcp-agent binary is replaced, then the service restarts
All-in-oneBoth, panel first
Panel already moved to another server (moorcp-shared unit disabled and not running)The panel on that server is skipped with a warning; only the agent is upgraded
Panel running but its unit not enabledThe panel is still upgraded, and its unit is enabled so it starts again after a reboot

Upgrade is safe to run again. The configuration in /etc/moorcp-shared/env is not overwritten; new settings a release needs are added.

On the panel server, upgrade also installs the moorcp-shared-upgrade.path unit, so the next upgrades can be started from the panel. See Upgrading from the panel.

TIP

When you move the panel to another server, turn the old panel off with systemctl disable --now moorcp-shared. An upgrade on the old server then only replaces the agent, without starting the old panel again.

Upgrading from the panel ​

Starting with release v0.9.0-rc.22, the panel and agents can be upgraded from the admin GUI, without logging in to every server over SSH.

Upgrading the panel ​

  1. Click Upgrade in the new release banner, or open Settings › Updates and click Upgrade to vX.Y.Z. This button is only shown to admins.
  2. In the confirmation, leave Then upgrade the agents on all servers checked if the agents should be updated too.
  3. Click Upgrade now.
  4. Wait. The admin and client panels are unavailable for about a minute; websites, email, and databases keep running. The page reconnects by itself after the panel restarts.
  5. Check the result under Settings › Updates: the status of the last upgrade and the Installer log (last 40 lines).

How it works:

text
panel (user moorcp) ── writes /var/lib/moorcp-shared/upgrade/request.json
        │
moorcp-shared-upgrade.path (systemd) ──► moorcp-shared-upgrade.service (root)
        │   moorcp-shared self-upgrade:
        │   verifies index.json + SHA256SUMS (ed25519) and that release's install.sh
        │   runs the installer in upgrade mode
        │   status + log → /var/lib/moorcp-shared/upgrade-state
        ▼
panel restarts on the new version ──(45 seconds)──► agent upgrade (if chosen)
  • The panel runs as the moorcp user and cannot replace itself, so it only writes a request. A root unit runs the upgrade.
  • The root unit refuses a version that is not newer, a version that is not in the signed index, and an install.sh whose checksum does not match the signed SHA256SUMS.
  • The channel and mirror come from /etc/moorcp-shared/release (owned by root), not from the panel's request.
  • Panels installed before v0.9.0-rc.22 do not have that unit yet. Run one upgrade from the command line; until then, the Upgrade button shows the command.
  • While the panel is locked because the license expired, Settings › Updates cannot be opened. Upgrade with the upgrade command on the server instead. See License.

Upgrading agents ​

Click Upgrade agents in the outdated agent banner, the Upgrade N agents button on the Servers card of Settings › Updates, or Upgrade on a single server's row. Each server then:

  1. downloads the agent binary from the panel's /downloads, which the installer put there from the same release as the panel;
  2. checks the checksum against the sha256 from the panel, and makes sure the new binary reports the requested version before it replaces the old one;
  3. updates VERSION in /etc/moorcp-shared/release, then restarts the agent a few seconds later.

The panel waits for a heartbeat with the new version, at most 3 minutes per server.

Rollout ruleNotes
TrialOne server is upgraded first. If it fails, the other servers are not tried (status Stopped: first server failed).
ParallelIf the first server succeeds, the rest run three at a time
SkippedServers that are offline or not registered yet
Old agentsAgents before v0.9.0-rc.22 cannot be upgraded from the panel yet. Run one upgrade from the command line on that server.
HistoryThe last rollout status is kept in the panel's memory and is lost when the panel restarts

After a panel upgrade from the GUI with the agent option on, the rollout starts automatically once, 45 seconds after the panel is back up.

Through the API ​

EndpointBodyPurpose
POST /v1/updates/panel-upgrade{"version": "", "agents": true}Request a panel upgrade. Empty version = newest release in the channel.
POST /v1/updates/agents-upgrade{"serverIds": []}Upgrade agents. Empty = all outdated agents.
GET /v1/updatesUpdate summary, including upgrade and rollout

Both actions are recorded in the audit log (panel.upgrade, agents.upgrade).

CodeMeaning
501 cp.upgrade_unsupportedThe upgrade helper unit is not installed; upgrade once from the command line
409 cp.upgrade_busyAnother upgrade is in progress
400 cp.upgrade_invalidVersion not newer, no known release yet, the panel runs a custom build, or every agent already runs the target version
501 cp.rollout_unavailableNo target agent version yet, or the agent binaries are missing on the panel server
409 cp.rollout_busyAn agent upgrade or a panel upgrade is in progress
  1. Back up the panel. Open Settings › Panel backup and click Back up now, or run moorcp-shared panel-backup run. Make sure it succeeds.

  2. Read the release notes for the target version in Release notes.

  3. Upgrade the panel server first, from Settings › Updates (see Upgrading from the panel) or on the panel server:

    bash
    curl -fsSL https://get-shared.moorcp.com | sudo bash -s -- upgrade
  4. Check the panel. GET /v1/health shows the new version, the GUI opens, and there are no odd new alerts.

  5. Upgrade the agent on every hosting server. From the panel with Upgrade agents (one server first, then the rest), or one by one with the same command on that server:

    bash
    curl -fsSL https://get-shared.moorcp.com | sudo bash -s -- upgrade
  6. Check every server under Servers: status active and agent version equal to the panel. The agent_outdated alert clears by itself once the agent is updated.

TIP

The panel accepts older agents, so hosting servers do not have to be upgraded at the same time. New features that need a new agent operation answer 501 cp.agent_outdated until that server's agent is updated.

WARNING

Do not upgrade an agent to a version newer than the panel. Always upgrade the panel first. The installer's agent mode also installs the same version as the panel.

Rollback ​

MoorCP has no automatic rollback button for panel upgrades. What you need to know:

  • upgrade runs database migrations forward (migrate up). Installing the old binary with --allow-downgrade does not undo those migrations, so the old binary runs on a newer schema.
  • So the safe way to roll the panel back is to restore the panel backup made before the upgrade, then install the old version. See Panel backup and DR.
  • restore refuses snapshots from a panel version newer than the installed binary (unless --force). A snapshot from before the upgrade matches the old version.
  • For agents, downgrading is simpler because the agent has no database schema. Run upgrade --version vX.Y.Z --allow-downgrade on that hosting server, with a version no older than what the panel needs.
bash
curl -fsSL https://get-shared.moorcp.com | sudo bash -s -- upgrade --version vX.Y.Z --allow-downgrade

DANGER

Restoring a panel backup returns the database to the state when the backup was made. Changes made since then (new accounts, package changes, jobs) are lost from the panel. Roll the panel back as soon as possible after a bad upgrade.

Update notifications ​

The panel tells admins when something needs updating. The checks only read: the panel never upgrades without an admin's click, and OS updates are still run by the admin.

AlertWhen it appearsSeverity
panel_update_availableThe panel's channel has a release newer than the installed versionwarning
agent_outdatedA server's agent version is older than the panel versionwarning
os_security_updatesA server has OS packages with security updateswarning
reboot_requiredThe kernel or core libraries were updated but the server has not rebootedwarning

These alerts go out through notification channels (email, Telegram) and webhooks like any other alert, and close by themselves once the upgrade or reboot is done. Every new release opens a new alert, so the notification is sent again even if the previous release's alert was not handled.

Banners on every admin page ​

BannerButtons
MoorCP vX.Y.Z is availableUpgrade, Later
A panel upgrade is running or failedDetails, to the Updates page
An agent upgrade is running, with the number of servers doneDetails
Servers run an older agent than the panelUpgrade agents, Later

Later hides the banner for that version in that browser only.

The Updates page ​

Settings › Updates summarizes:

  • the installed panel version and the newest release in the channel, with the upgrade button;
  • the status of the last upgrade from the panel and its installer log;
  • each server's agent version, the agent rollout status, and agent upgrade buttons;
  • OS updates and reboot needs per server, with the check time;
  • check errors, for example failing to download repo metadata.

The Check now button checks for releases right away. The same summary is available through GET /v1/updates.

On a server's detail page, banners appear:

  • Reboot required, with a Reboot server button (admins only);
  • N packages have security updates, with the number and sample packages and the dnf upgrade --security command;
  • Agent vX is outdated, with the agent upgrade command.

Check schedule ​

CheckSchedule
MoorCP releases1 minute after the panel starts, then every 30 minutes
Agent versionEvery heartbeat
OS package updates1 minute after the agent starts, every 6 hours, and after the package database changes (for example when an admin runs dnf upgrade by hand)

OS check results older than 36 hours do not raise alerts.

Configuring the release check ​

In /etc/moorcp-shared/env on the panel server:

VariablePurpose
MOORCP_UPDATE_CHANNEL=stable or rcOverrides the channel recorded by the installer
MOORCP_RELEASES_URLOverrides the release mirror
MOORCP_UPDATE_CHECK=offTurns the check off, for example for a panel without internet access

Restart moorcp-shared after changing the env. A panel with a custom build (a version not shaped vX.Y.Z) is not compared with releases.

OS updates ​

The panel does not install OS updates. Run them yourself on every server:

bash
dnf upgrade --security

When reboot_required appears, reboot from the panel with the Reboot required banner or Actions › Reboot server on the server detail page. During the reboot, the server_offline alert is held back so there are no false notifications.

See also ​

MoorCP Shared, a shared hosting panel for server fleets.