How To Set Up Canonical Livepatch On Ubuntu 20.04 “Focal Fossa”

Canonical Livepatch was introduced in Ubuntu 16.04. The livepatch option allows you to install kernel updates without a system reboot. It is a great option, and servers must have it enabled to prevent system reboot.

The upcoming Ubuntu 20.04 “Focal Fossa” supports Canonical Livepatch.

Livepatch important for servers

If Ubuntu powers your server, then you should enable Canonical Livepatch. Livepatch will silently install Kernel updates without requiring a system reboot. However, it is also available for Desktop users but is less useful.

The entire purpose of Livepatch is to prevent the system reboot after the kernel updates; the desktop users will anyway restart the computer now and then. So Livepatch can be installed and set up but will rarely be used.

Also, it’s important to note that the Livepatch feature is free for up to 3 devices for personal use. You can set up Livepatch on Desktops, servers, virtual machines, and in the cloud. Organizations will need to pay for the service by subscribing to Ubuntu Advantage.

How to set up Canonical Livepatch in Ubuntu 20.04 “Focal Fossa”

For Ubuntu desktop users

  • Setting up livepatch on Ubuntu desktop is very simple. Open settings and go to Software & updates. Go to Livepatch tab.
Ubuntu 20.04 Livepatch settings
Ubuntu 20.04 Livepatch settings
  • Click the “Sign in” button and enter your Ubuntu credentials. If you do not have Ubuntu account, please create one.
Sign in to set up livepatch
Sign in to set up livepatch
Sign on Ubuntu Account
Sign on Ubuntu Account
  • After signed in, click Continue when the popup shows up confirming you are logged in.
turn on Livepatching in Ubuntu 20.04
turn on Livepatching in Ubuntu 20.04
  • And that is it. The livepatch is set up on your Ubuntu 20.04 Desktop.
Ubuntu livepatch
Ubuntu livepatch

Errors In Ubuntu 20.04 with Livepatch

You may encounter the following error when enabling Livepatch on Ubuntu 20.04 Focal Fossa

Failed to enable Livepatch: cannot enable machine: this machine ID is already enabled with a different key or is non-unique. Either "sudo canonical-livepatch disable" on the other machine, or regenerate a unique /etc/machine-id on this machine with "sudo rm /etc/machine-id /var/lib/dbus/machine-id && sudo systemd-machine-id-setup" server response: Conflicting machine-id
Livepatch error
Livepatch error

To fix the error, type the following commands in the terminal –

cp /etc/machine-id /etc/machine-id.original
cp /var/lib/dbus/machine-id /var/lib/dbus/machine-id.original
nano /etc/machine-id (to remove the existing value)
> Initializing machine ID from D-Bus machine ID.
cat /etc/machine-id

For Ubuntu servers

Setting up Canonical Livepatch service is even easier on Ubuntu servers. Head over to Ubuntu’s Livepatch page and select “Ubuntu user”. Click “Get your livepatch token”.

Canonical Livepatch service token
Canonical Livepatch service token

It will show your livepatch token and the commands to install and enable livepatch service. Now copy the commands one by one and run them on the server.

sudo snap install canonical-livepatch
sudo canonical-livepatch enable UNIQUE_TOKEN

It is done! The livepatch is set up and installed on the server. To check the status, run the following command –

canonical-livepatch status --verbose


MassiveGRID Banner
3 Comments Text
  • I have had Livepatch enabled on my ubuntu 20.04 LTS desktop machine for months.
    Yet, it does nothing.

    It used to work fine on my previous machine (running ubuntu 16.x) but now it does nothing except being on.
    Every other day I get a software update prompt saying I need to update this and that and then insists on rebooting,
    as if I did not have Livepatch at all or it was off.

    Is this anything to do with the mate desktop?

    Please help me fix this.

  • Absolutely NEVER install Canonical Livepatch unless you buy the Pro version. The free version puts you at risk by installing untested patches, YOU ARE THE GUINEA PIG!!! Just run the “canonical-livepatch status” command and you’ll see you are a beta tester without any way to opt out.

  • Leave a Reply

    Your email address will not be published. Required fields are marked *