Skip to content

Upgrading ​

How to upgrade the MoorCP Shared panel and agents to a new release: upgrading from the panel, the upgrade command on a server, the right order, channels and versions, and update notifications in the panel.

Two ways to upgrade ​

WayWhen to use it
From the panel (Settings › Updates or the banner)The usual way. One click upgrades the panel, then the agents on all servers
The upgrade command on each serverPanels installed before v0.9.0-rc.22, servers the panel cannot reach, or when an upgrade from the panel failed

Customer sites, email, and databases keep running during an upgrade. Only the moorcp-shared and moorcp-agent services are restarted.

Upgrading from the panel ​

When a new release is out, the banner MoorCP vX.Y.Z is available appears at the top of every admin page, with the installed version and its channel.

  1. Click Upgrade in the banner, or open Settings › Updates and click Upgrade to vX.Y.Z.
  2. The confirmation window explains what will happen. Leave Then upgrade the agents on all servers ticked so the agents are upgraded too.
  3. Click Upgrade now.

The banner changes to Upgrading MoorCP to vX.Y.Z…. The admin and client panels are unavailable for about a minute, then the page reconnects by itself.

Click Later to hide the banner for that version in that browser. The panel never upgrades without an admin's click.

INFO

Only admins can start an upgrade.

What happens on the panel server ​

The panel runs as the user moorcp without root privileges, so it does not replace itself:

  1. The panel writes an upgrade request.
  2. The systemd unit moorcp-shared-upgrade.path (root) sees the request and runs moorcp-shared self-upgrade.
  3. self-upgrade verifies the signatures of the release list and SHA256SUMS, and the checksum of that release's install.sh. A version that is not newer, or is not in the signed release list, is refused. The channel and mirror come from /etc/moorcp-shared/release, not from the panel's request.
  4. The installer runs in upgrade mode. The steps are the same as the upgrade command below, including database migrations.
  5. The panel restarts with the new version. About 45 seconds later, the agent upgrade starts if you chose it.

The status and the last 40 lines of the installer log are shown in Settings › Updates, under Last upgrade from the panel. If the upgrade fails, the banner Upgrade to vX.Y.Z failed is shown for 24 hours with the error message.

WARNING

The moorcp-shared-upgrade.path unit is installed by the installer from v0.9.0-rc.22 on. Older panels need one upgrade with the upgrade command. Until then, the Upgrade button shows that command.

Upgrading agents ​

Agents can be upgraded from the panel without logging in to each server:

  • automatically after a panel upgrade, if the agent option is ticked;
  • the Upgrade agents button in the banner, when some servers run an agent older than the panel;
  • the Upgrade N agents button on the Servers card in Settings › Updates, or Upgrade for a single server.

For each server:

  1. The agent downloads the agent binary from the panel. The installer put that binary on the panel from the same release as the panel.
  2. The checksum is compared, and the new binary must report the requested version before it replaces the old one.
  3. The new version is recorded in /etc/moorcp-shared/release, then the agent restarts itself.
  4. The panel waits for a heartbeat with the new version, for up to 3 minutes.

One server is upgraded first as a trial. If it fails, the other servers are not tried (status Stopped: first server failed). If it succeeds, the rest run in parallel, three at a time. Servers that are offline or not enrolled yet are skipped.

INFO

Agents older than v0.9.0-rc.22 cannot be upgraded from the panel yet. Run the upgrade command once on that server. The status of the last rollout is kept in the panel's memory and is lost when the panel restarts.

Upgrade command ​

Run it on the panel server or a hosting server:

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

The installer detects what is installed on that server (panel, agent, or both) and only updates what is there.

  • A panel that is turned off (unit moorcp-shared disabled and not running), for example after the panel moved to another server, is skipped with a warning. Only the agent is upgraded.
  • A panel that is running but whose unit is not enabled is still upgraded, and its unit is enabled so it starts again after a reboot.

Order ​

  1. Upgrade the panel first, from the panel or with upgrade on the panel server.
  2. Then the agent on every server, from the panel or with upgrade on each server.

An upgrade from the panel with the agent option ticked already follows this order. On an all-in-one install, one upgrade updates the panel and the agent together.

What the upgrade does ​

The upgrade uses the channel and mirror recorded at install time in /etc/moorcp-shared/release. If the version is already the latest, the installer prints Already on vX.Y.Z (channel ...) and does nothing (unless you switch channels, see Channels and versions).

If there is a new version (Upgrade vA → vB):

On the panel serverOn a hosting server
The moorcp-shared and moorctl binaries and the admin panel are replacedThe moorcp-agent binary is replaced
The agent downloads on the panel are updatedThe moorcp-agent service is restarted
The moorcp-shared-upgrade.path unit is installed or updated
New settings are added to /etc/moorcp-shared/env if needed
Database migrations run
The moorcp-shared service is restarted, then the health check must pass

Finally, the new version is recorded in /etc/moorcp-shared/release and the installer prints Done: vX.Y.Z.

Channels and versions ​

ChannelContents
stableFinal releases (vX.Y.Z)
rcRelease candidates (vX.Y.Z-rc.N) and also final releases; always points to the latest release

The installer uses stable by default. The first stable release was v0.9.0; the latest at the time of writing is v0.12.5. Use the rc channel only if you want to try release candidates before they become stable.

Messages in English

From v0.9.0-rc.25, the installer prints its messages in English. Older installers printed them in Indonesian. Message details are in Installation problems.

Switching channels ​

The channel is recorded in /etc/moorcp-shared/release and used by every later upgrade, from the command line and from the panel. To switch, run upgrade with --channel on the server:

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

The new channel is recorded even when the installed version is already the latest in it. The installer then prints Already on vX.Y.Z; channel changed to stable and restarts the panel, so Settings › Updates shows the new channel. The panel itself 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 whose release file still records rc from 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)

To stay on release candidates, run upgrade --channel rc on the server yourself. That choice is recorded and is not changed again.

A specific version ​

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

Replace vX.Y.Z with the version you want. Upgrades from the panel always use the recorded channel and only offer newer versions.

WARNING

The upgrade refuses a version older than the installed one, with the message version ... is older than the installed one (...); use --allow-downgrade if this is intended. Add --allow-downgrade only if you really want to downgrade, for example when support asks you to.

Update notifications in the panel ​

The update overview is in Settings › Updates:

SectionContents
MoorCP releaseInstalled version, Latest release, channel, last check time, the upgrade button, and the status of the last upgrade
ServersAgent version of each server (Up to date / Outdated), OS updates, reboot needs, and agent upgrade status
  • The panel checks for releases 1 minute after it starts, then every 30 minutes. Click Check now to check right away.
  • The ed25519 signature of the release list is verified with the key built into the panel, the same as the installer's. A list without a valid signature is refused.
  • Agents check for OS package updates every 6 hours, and also right after you run dnf upgrade yourself.

These conditions also show up as alerts and are sent to your notification channels:

AlertWhen it appears
panel_update_availableThe panel's channel has a release newer than the installed version
agent_outdatedA server's agent version is older than the panel version
os_security_updatesA server has packages with security updates
reboot_requiredThe kernel or core libraries were updated, but the server has not rebooted

Alerts close by themselves once the upgrade or reboot is done. On a server's detail page, the same conditions show as a banner above the tabs, with the command to run.

OS updates ​

OS package updates are not installed automatically, and not from the panel either. To install only security updates on a server:

bash
dnf upgrade --security

Configuring the checks ​

Add these to /etc/moorcp-shared/env on the panel server, then restart moorcp-shared:

VariableEffect
MOORCP_UPDATE_CHANNEL=stable|rcOverrides the channel that is checked
MOORCP_RELEASES_URL=URLOverrides the release mirror
MOORCP_UPDATE_CHECK=offTurns the checks off, for example on servers without internet access

A panel with a custom build (a version that is not vX.Y.Z) is not compared with releases and shows as Custom build. Such a panel is upgraded the same way it was installed, not from the panel.

See also ​

MoorCP Shared, a shared hosting panel for server fleets.