Skip to main content

Upgrading to Ubuntu 22.04

Overview

This guide explains how to upgrade an existing Ubuntu 20.04 based Cloudron to Ubuntu 22.04 (jammy jellyfish). Upgrade to Ubuntu 20 first using this guide if still on Ubuntu 18.

End of support

Cloudron 9 dropped the support for Ubuntu 20]

Checklist

Before upgrading:

  • Cloudron must be on at least version 7.2. Verify this by checking the version in the Settings view. Cloudron releases prior to 7.2.0 do not support Ubuntu 22.04.
  • Ubuntu must be on version 20.04. Check with lsb_release -a.
  • The upgrade takes 1-3 hours depending on network, CPU, and disk speed.
Upgrade fails with Full text search feature

A bug in Cloudron 7.2 prevents the mail server from starting on Ubuntu 22 when Full text search is enabled. Wait for Cloudron 7.3 before upgrading.

Pre-flight

Create a server snapshot for quick rollback before starting. If your VPS lacks snapshotting, create a full Cloudron backup first (Backups → Create Backup now).

Highly recommend taking server snapshot

A server snapshot saves trouble if the server fails to start after the upgrade. If your VPS provider lacks snapshots, keep backups outside your server. In some cases, Ubuntu fails to boot entirely, locking your data and backups inside the server disk.

Upgrading

Run the upgrade:

bash
dpkg --configure -a
apt update
apt upgrade
do-release-upgrade

Upgrade notes:

  • Accept running an additional SSH daemon at port 1022.
  • Choose 'yes' to restart services without asking.
  • For all packages (mime, nginx, timesyncd, logrotate, journald, etc.), select N or O to keep your currently-installed version (default).
  • Ignore any nginx upgrade failures at the end.

Restart the server after the upgrade completes.

Post upgrade

  1. Verify the upgrade:

    bash
    lsb_release -a
  2. Install missing packages:

    bash
    /home/yellowtent/box/scripts/init-ubuntu.sh
  3. Fix package configuration:

    bash
    /home/yellowtent/box/setup/start.sh
  4. Ubuntu 22 uses cgroups v2 by default. Recreate all Docker containers to recognize this change:

    bash
    /home/yellowtent/box/scripts/recreate-containers

    This script is part of Cloudron 7.3. For earlier versions, download it here.

Post upgrade checks

  1. Verify Ubuntu 22.04 in output:

    bash
    lsb_release -a
  2. Verify active (running) status:

    bash
    systemctl status box
  3. Verify that all the services in the Services view of Cloudron dashboard are running.

    collectd was removed in Cloudron 9. If you an older version, also run the following command:

    bash
    systemctl status collectd

    The output should include active (running).

Upgrade Successful

If all steps above are confirmed, you have successfully upgraded from Ubuntu 20 to Ubuntu 22.