Skip to main content

Upgrading to Ubuntu 20.04 (focal fossa)

Ubuntu 20 LTS has reached its end of life

Ubuntu 20 LTS has reached its end of life in April 2025.

We encourage you to upgrade to Ubuntu 22 as soon as possible after upgrading to Ubuntu 20

Overview

This guide explains how to upgrade an existing Ubuntu 18.04 based Cloudron to Ubuntu 20.04. Upgrade to Ubuntu 18 first using this guide if still on Ubuntu 16.

Warning

Cloudron 7.5 is the last version of Cloudron that supports Ubuntu 18.04

!!! warning "Cloudron 9 dropped the support for Ubuntu 20"

Checklist

Before upgrading, please note the following:

  • Cloudron must be on at least version 6.0. Verify this by checking the version in the Settings view. Cloudron releases prior to 6.0 do not support Ubuntu 20.04.
  • Ubuntu must be on version 18.04. Check the output of lsb_release -a to confirm this.
  • The upgrade takes around 1-3 hours based on various factors like network/cpu/disk etc

Pre-flight

Create a server snapshot for quick rollback before starting the upgrade. 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.

Digital Ocean

Digital Ocean droplet upgrades from Ubuntu 18 to Ubuntu 20 often result in a broken droplet with no SSH access. Instead, start with a fresh Ubuntu 22.04 instance and restore.

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.
  • For all packages (nginx, timesyncd, journald, etc.), select N or O to keep your currently-installed version (default).
  • Accept defaults for all questions (e.g., LXD version 4.0).
  • Accept removal of obsolete packages.
  • IMPORTANT: On some VPS, the upgrade uninstalls MySQL 5.7. Allow uninstallation but select the option to not remove MySQL data.
  • If the upgrade fails with "ubuntu-minimal could not be located", replace /etc/apt/sources.list with the original sources.list.

Restart the server after the upgrade completes.

Post upgrade

  • Fix collectd. Add the following line to /etc/default/collectd if it doesn't exist:
LD_PRELOAD=/usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so
  • Install MySQL 8:
bash
systemctl stop box
apt remove mysql-server-5.7 # this is only needed, if it wasn't removed in the upgrade process above. if it asks, then be sure to preserve MySQL data. if it doesn't, it preserves it by default.
apt install mysql-server-8.0
/home/yellowtent/box/setup/start.sh
systemctl start box
reboot

Post upgrade checks

  1. Verify that the output includes Ubuntu 20.04
    Bash
    lsb_release -a
  2. Verify that the output includes active (running)
    Bash
    systemctl status box` will say
  3. Verify that the output includes active (running)
    Bash
    systemctl status collectd
  4. Verify that all the services in the Services view of Cloudron dashboard are running.
Upgrade Successful

If the above steps are all confirmed, you have successfully upgraded your Ubuntu 18 to Ubuntu 20