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.
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.
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).
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:
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
nginxupgrade failures at the end.
Restart the server after the upgrade completes.
Post upgrade
-
Verify the upgrade:
bashlsb_release -a -
Install missing packages:
bash/home/yellowtent/box/scripts/init-ubuntu.sh -
Fix package configuration:
bash/home/yellowtent/box/setup/start.sh -
Ubuntu 22 uses cgroups v2 by default. Recreate all Docker containers to recognize this change:
bash/home/yellowtent/box/scripts/recreate-containersThis script is part of Cloudron 7.3. For earlier versions, download it here.
Post upgrade checks
-
Verify Ubuntu 22.04 in output:
bashlsb_release -a -
Verify
active (running)status:bashsystemctl status box -
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:
bashsystemctl status collectdThe output should include
active (running).
If all steps above are confirmed, you have successfully upgraded from Ubuntu 20 to Ubuntu 22.