DigitalOcean Droplets are Linux-based virtual machines (VMs) that run on top of virtualized hardware. Each Droplet you create is a new server you can use, either standalone or as part of a larger, cloud-based infrastructure.
To upgrade a Droplet’s kernel to the latest supported version, you need to do three things:
Verify that the Droplet uses internal kernel management.
Upgrade the kernel using a package manager.
Power off the Droplet, then power it back on.
Before you can upgrade your Droplet’s kernel, you need to veirfy that your Droplet is using internal kernel management.
All Droplets created after March 2017 use internal kernels by default, and older Droplets can be configured to support internal kernels with the DigitalOcean GrubLoader kernel.
If you’re not sure whether your Droplet manages its kernels internally, visit its detail page in the control panel and click Kernel in the navigation. If the kernel management page has the following message, your Droplet is set to use internal kernels natively:
The kernel for this Droplet is not managed within the control panel. Instead, you can upgrade the kernel from within the Droplet.
If you see a Select a Kernel menu with a Change button and the following description instead, your Droplet is using legacy external kernel management:
This will update your configuration. Then power off the server from the command line and boot it from the control panel and the new kernel will be active. To revert, simply select ‘Original Kernel’ and follow the same process.
If your Droplet is using legacy kernel management, you can switch to the DigitalOcean GrubLoader kernel to support internal kernels.
Once your Droplet is using internal kernel management, you can upgrade its kernel.
Before upgrading your kernel, you can use the command
uname -ir to get the version of the kernel that your Droplet is currently using and your system’s architecture (32-bit or 64-bit). The output looks similar to
3.13.0-43-generic x86_64. The first section (
3.13.0-43-generic in this example) is your Droplet’s current kernel version and the second is its architecture (
x86_64 in this example, i.e., 64-bit).
If you want to upgrade your Droplet to the latest kernel version, there are two ways to do it:
Update all packages. Applying all available package upgrades to your server pulls in the latest stable kernel if available.
Update kernel only. Targeting only the kernel for update does not modify any other packages on your server.
The commands you need to run for either option depends on your Droplet’s operating system:
|OS||Upgrade all packages||Upgrade kernel only|
Completely powering off the Droplet rather than just rebooting it makes sure it gets the latest virtualization improvements from the hypervisor. Power cycling is necessary for the Droplet to be able to take advantage of all the updates after a kernel upgrade.
To ensure data integrity, shut down your Droplet from the command line with this command:
To power the Droplet on, log in to the control panel. Click the Droplet’s name to go to its detail page, then click the OFF switch to turn the Droplet back on.
After your Droplet boots, you can use
uname -ir again to confirm the new kernel version.