{"id":900335,"date":"2026-08-20T13:01:20","date_gmt":"2026-08-20T17:01:20","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/?p=900335"},"modified":"2026-08-20T13:03:12","modified_gmt":"2026-08-20T17:03:12","slug":"install-docker-almalinux-ubuntu","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/","title":{"rendered":"How to Install Docker on AlmaLinux 9 and Ubuntu 24.04"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Docker publishes its own package repositories, and installing from them gets you the current release of Docker Engine and keeps it updated from the same source. This guide shows you how to install Docker on AlmaLinux 9 and Ubuntu 24.04. You end up with Docker Engine, the Docker command-line interface (CLI), and Docker Compose in one pass. By the end, the Docker service will be running and ready to pull your first container.<\/p>\n\n\n\n<p class=\"alert alert-success wp-block-paragraph\"><strong>Skip the installation:<\/strong> Docker-Ready VPS plans ship with Docker Engine and Docker Compose preinstalled. Select <strong>Docker-Ready<\/strong> under Control Panel Options when you configure any <a href=\"https:\/\/www.inmotionhosting.com\/vps-hosting\">VPS plan<\/a> (it is a free selection) and choose AlmaLinux 9 or Ubuntu 24.04 as the operating system. On a Docker-Ready server, you can jump straight to the<strong> Verify the Docker Installation section<\/strong>; verification, the non-root user setup, and the support limitations in this guide still apply.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A VPS or Dedicated Server with root Secure Shell (SSH) access.<\/li>\n\n\n\n<li>AlmaLinux 9 or Ubuntu 24.04 installed on the server.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to Install Docker on AlmaLinux 9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">AlmaLinux is binary compatible with Red Hat Enterprise Linux (RHEL), so you install Docker on AlmaLinux 9 from Docker&#8217;s own repository, following the steps in Docker&#8217;s <a href=\"https:\/\/docs.docker.com\/engine\/install\/centos\/\">CentOS installation guide<\/a>. Connect over SSH as root, then run the following commands in order.<\/p>\n\n\n\n<p class=\"alert alert-info wp-block-paragraph\"><strong>Note:<\/strong> Docker publishes per-distribution install instructions for CentOS, RHEL, Fedora, Debian, Ubuntu, and Raspberry Pi OS, but not for AlmaLinux. Docker&#8217;s documentation states that it &#8220;doesn&#8217;t test or verify installation on distribution derivatives,&#8221; so treat the steps below as Docker&#8217;s CentOS path applied to AlmaLinux 9.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Add Docker&#8217;s Repository<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">First, install the <code>dnf-plugins-core<\/code> package. It adds the <code>config-manager<\/code> command you need to register a new repository.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">dnf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-y<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">dnf-plugins-core<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Next, add Docker&#8217;s repository. The repository file uses your release version, so it resolves to Docker&#8217;s Enterprise Linux 9 packages on AlmaLinux 9.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">dnf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">config-manager<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--add-repo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Install Docker Engine and Compose<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Install Docker Engine, the CLI, containerd, and the Buildx and Compose plugins together.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">dnf<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker-ce<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker-ce-cli<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">containerd.io<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker-buildx-plugin<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker-compose-plugin<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Start the Docker Service<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Enable the Docker service so it starts on boot, and start it immediately with the same command.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">enable<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--now<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">How to Install Docker on Ubuntu 24.04<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ubuntu packages Docker in its <code>universe<\/code> repository under the name <code>docker.io<\/code>, on Ubuntu&#8217;s own version scheme. To get Docker Engine from Docker instead, install Docker on Ubuntu 24.04 from Docker&#8217;s apt repository, following Docker&#8217;s <a href=\"https:\/\/docs.docker.com\/engine\/install\/ubuntu\/\">official Ubuntu installation guide<\/a>. Docker lists Ubuntu 24.04 as a supported release under the codename <code>noble<\/code>, which shows up in the repository line below.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Install Prerequisite Packages<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Update your package index and install the tools Docker&#8217;s setup needs to fetch and verify packages over Hypertext Transfer Protocol Secure (HTTPS).<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">apt-get<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">update<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">apt-get<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">ca-certificates<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">curl<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Add Docker&#8217;s GPG Key<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create the keyring directory and download Docker&#8217;s GNU Privacy Guard (GPG) key into it. The apt package manager uses this key to verify that packages actually came from Docker.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-m<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">0755<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-d<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/etc\/apt\/keyrings<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">curl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-fsSL<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">https:\/\/download.docker.com\/linux\/ubuntu\/gpg<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-o<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/etc\/apt\/keyrings\/docker.asc<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">chmod<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">a+r<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/etc\/apt\/keyrings\/docker.asc<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Add Docker&#8217;s Repository<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add the Docker repository for the <code>noble<\/code> release, then refresh your package index so apt sees the new source.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #79B8FF\">echo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #E1E4E8\">  <\/span><span style=\"color: #9ECBFF\">&quot;deb &#91;arch=$(<\/span><span style=\"color: #B392F0\">dpkg<\/span><span style=\"color: #9ECBFF\"> <\/span><span style=\"color: #79B8FF\">--print-architecture<\/span><span style=\"color: #9ECBFF\">) signed-by=\/etc\/apt\/keyrings\/docker.asc&#93; https:\/\/download.docker.com\/linux\/ubuntu <\/span><span style=\"color: #79B8FF\">\\<\/span><\/span>\n<span class=\"line\"><span style=\"color: #9ECBFF\">  noble stable&quot;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">|<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">tee<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/etc\/apt\/sources.list.d\/docker.list<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">&gt;<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">\/dev\/null<\/span><\/span>\n<span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">apt-get<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">update<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Install Docker Engine and Compose<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Install Docker Engine, the CLI, containerd, and the Buildx and Compose plugins together.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">apt-get<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">install<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker-ce<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker-ce-cli<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">containerd.io<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker-buildx-plugin<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker-compose-plugin<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Start the Docker Service<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Enable the Docker service so it starts on boot, and start it immediately with the same command.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">systemctl<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">enable<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--now<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Verify the Docker Installation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Confirm Docker is installed correctly before you build or pull anything. Check the Docker CLI version:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">--version<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Check that Docker Compose is available:<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">compose<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">version<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"alert alert-info wp-block-paragraph\"><strong>Note:<\/strong> Modern Docker installs Compose as a plugin, invoked as <code>docker compose<\/code> with a space. The older standalone <code>docker-compose<\/code> binary (with a hyphen) is not part of this install, and you do not need it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Run the standard test container to confirm Docker can pull an image and start a container end to end.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">run<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">hello-world<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">A short message starting with <code>Hello from Docker!<\/code> confirms your installation is working. With Docker verified, set up a non-root account so you are not typing <code>sudo<\/code> before every command.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Allow a Non-Root User to Run Docker<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">By default, only root and members of the <code>docker<\/code> group can run Docker commands. Add your working user to that group so you can run <code>docker<\/code> without <code>sudo<\/code> on every command.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono-NL.ttf\" style=\"font-size:clamp(16px, 1rem, 24px);font-family:Code-Pro-JetBrains-Mono-NL,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:clamp(26px, 1.625rem, 39px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><pre class=\"shiki github-dark\" style=\"background-color: #24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #B392F0\">sudo<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">usermod<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #79B8FF\">-aG<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #9ECBFF\">docker<\/span><span style=\"color: #E1E4E8\"> <\/span><span style=\"color: #F97583\">&lt;<\/span><span style=\"color: #9ECBFF\">usernam<\/span><span style=\"color: #E1E4E8\">e<\/span><span style=\"color: #F97583\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>&lt;username&gt;<\/code> with the account you want to grant access to. Log out and log back in (or start a new SSH session) for the group change to take effect.<\/p>\n\n\n\n<p class=\"alert alert-danger wp-block-paragraph\"><strong>Warning:<\/strong> Membership in the <code>docker<\/code> group grants root-level privileges on the host. A user in that group can mount the host filesystem into a container and read or modify any file root can. Only add accounts you would trust with root SSH access.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Docker Support Limitations and Scope<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Docker on a VPS or Dedicated Server is a self-managed configuration. Know these limits before you build on it:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Root SSH access is required to install Docker, since every install command in this guide runs as root.<\/li>\n\n\n\n<li>InMotion Hosting Technical Support does not troubleshoot Docker-specific issues, such as container configuration, Dockerfile errors, or orchestration. For advanced Docker help, contact the <a href=\"https:\/\/www.inmotionhosting.com\/solutions\">InMotion Solutions<\/a> team.<\/li>\n\n\n\n<li>Docker-Ready VPS servers are self-managed and do not include a control panel such as cPanel or Control Web Panel.<\/li>\n\n\n\n<li>Kernel changes are not supported on a Docker-Ready VPS. This includes custom kernels and additional kernel modules.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Permission denied while connecting to the Docker daemon<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This error means your current shell session doesn&#8217;t yet reflect the new group membership. Log out and log back in (or start a new SSH session) after you run <code>usermod -aG docker<\/code>, then run <code>docker ps<\/code> again. If the error persists, confirm the username you added matches the account you are logged in as.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Repository or GPG key errors during installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A <code>NO_PUBKEY<\/code> error or a 404 response during <code>apt-get update<\/code> usually points at the keyring file or the repository line. Confirm <code>\/etc\/apt\/keyrings\/docker.asc<\/code> exists, re-run the <code>curl<\/code> command from the GPG key step, then check <code>\/etc\/apt\/sources.list.d\/docker.list<\/code> against the repository line in Step 3.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cannot connect to the Docker daemon after installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This error means the Docker service is not running. Check its status with <code>sudo systemctl status docker<\/code>. If the output shows <code>inactive<\/code> or <code>failed<\/code>, start the service with <code>sudo systemctl enable --now docker<\/code> and review the output for the underlying error.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You now have Docker Engine and Docker Compose running on AlmaLinux 9 or Ubuntu 24.04, straight from Docker&#8217;s official repositories, with a non-root user ready to run containers. From here, learn how to pull images, start containers, and manage them day-to-day in <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/working-with-docker-ultimate-guide\/\">Working with Docker Containers<\/a>, or read <a href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/what-is-docker\/\">What is Docker?<\/a> for a refresher on the concepts behind images, containers, and volumes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Docker publishes its own package repositories, and installing from them gets you the current release of Docker Engine and keeps it updated from the same source. This guide shows you how to install Docker on AlmaLinux 9 and Ubuntu 24.04. You end up with Docker Engine, the Docker command-line interface (CLI), and Docker Compose in<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57032,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_ayudawp_aiss_exclude":false,"_ayudawp_aiss_exclude_summary":false,"_ayudawp_aiss_summary":"AlmaLinux is binary compatible with Red Hat Enterprise Linux (RHEL), so you install Docker on AlmaLinux 9 from Docker's own repository, following the steps in Docker's CentOS installation guide. To get Docker Engine from Docker instead, install Docker on Ubuntu 24.04 from Docker's apt repository, following Docker's official Ubuntu installation guide. You now have Docker Engine and Docker Compose running on AlmaLinux 9 or Ubuntu 24.04, straight from Docker's official repositories, with a non-root user ready to run containers.","_ayudawp_aiss_summary_provider":"extractive","_ayudawp_aiss_summary_hash":"51629d59e6ba1c0051ed19f00eee53846e63a1c9","_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4360],"tags":[],"class_list":["post-900335","post","type-post","status-publish","format-standard","hentry","category-software"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install Docker on AlmaLinux 9 and Ubuntu 24.04<\/title>\n<meta name=\"description\" content=\"Install Docker Engine and Docker Compose on AlmaLinux 9 or Ubuntu 24.04 using Docker&#039;s official repositories, step by step.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Docker on AlmaLinux 9 and Ubuntu 24.04\" \/>\n<meta property=\"og:description\" content=\"Install Docker Engine and Docker Compose on AlmaLinux 9 or Ubuntu 24.04 using Docker&#039;s official repositories, step by step.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-20T17:01:20+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-20T17:03:12+00:00\" \/>\n<meta name=\"author\" content=\"Derrell\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Derrell\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/edu\\\/software\\\/install-docker-almalinux-ubuntu\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/edu\\\/software\\\/install-docker-almalinux-ubuntu\\\/\"},\"author\":{\"name\":\"Derrell\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/person\\\/0736f70b4077032374f89709cdc255b7\"},\"headline\":\"How to Install Docker on AlmaLinux 9 and Ubuntu 24.04\",\"datePublished\":\"2026-08-20T17:01:20+00:00\",\"dateModified\":\"2026-08-20T17:03:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/edu\\\/software\\\/install-docker-almalinux-ubuntu\\\/\"},\"wordCount\":1049,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#organization\"},\"articleSection\":[\"Software\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/edu\\\/software\\\/install-docker-almalinux-ubuntu\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/edu\\\/software\\\/install-docker-almalinux-ubuntu\\\/\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/edu\\\/software\\\/install-docker-almalinux-ubuntu\\\/\",\"name\":\"How to Install Docker on AlmaLinux 9 and Ubuntu 24.04\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#website\"},\"datePublished\":\"2026-08-20T17:01:20+00:00\",\"dateModified\":\"2026-08-20T17:03:12+00:00\",\"description\":\"Install Docker Engine and Docker Compose on AlmaLinux 9 or Ubuntu 24.04 using Docker's official repositories, step by step.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/edu\\\/software\\\/install-docker-almalinux-ubuntu\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/edu\\\/software\\\/install-docker-almalinux-ubuntu\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/edu\\\/software\\\/install-docker-almalinux-ubuntu\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install Docker on AlmaLinux 9 and Ubuntu 24.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/wp-content\\\/uploads\\\/2023\\\/02\\\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/inmotionhosting\\\/\",\"https:\\\/\\\/x.com\\\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/#\\\/schema\\\/person\\\/0736f70b4077032374f89709cdc255b7\",\"name\":\"Derrell\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/derrell-willis\"],\"url\":\"https:\\\/\\\/www.inmotionhosting.com\\\/support\\\/author\\\/derrellw\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Docker on AlmaLinux 9 and Ubuntu 24.04","description":"Install Docker Engine and Docker Compose on AlmaLinux 9 or Ubuntu 24.04 using Docker's official repositories, step by step.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Docker on AlmaLinux 9 and Ubuntu 24.04","og_description":"Install Docker Engine and Docker Compose on AlmaLinux 9 or Ubuntu 24.04 using Docker's official repositories, step by step.","og_url":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2026-08-20T17:01:20+00:00","article_modified_time":"2026-08-20T17:03:12+00:00","author":"Derrell","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Derrell","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/"},"author":{"name":"Derrell","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/0736f70b4077032374f89709cdc255b7"},"headline":"How to Install Docker on AlmaLinux 9 and Ubuntu 24.04","datePublished":"2026-08-20T17:01:20+00:00","dateModified":"2026-08-20T17:03:12+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/"},"wordCount":1049,"commentCount":0,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"articleSection":["Software"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/","url":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/","name":"How to Install Docker on AlmaLinux 9 and Ubuntu 24.04","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"datePublished":"2026-08-20T17:01:20+00:00","dateModified":"2026-08-20T17:03:12+00:00","description":"Install Docker Engine and Docker Compose on AlmaLinux 9 or Ubuntu 24.04 using Docker's official repositories, step by step.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/install-docker-almalinux-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Install Docker on AlmaLinux 9 and Ubuntu 24.04"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/0736f70b4077032374f89709cdc255b7","name":"Derrell","sameAs":["https:\/\/www.linkedin.com\/in\/derrell-willis"],"url":"https:\/\/www.inmotionhosting.com\/support\/author\/derrellw\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"primary_category":{"id":4360,"name":"Software","slug":"software","link":"https:\/\/www.inmotionhosting.com\/support\/edu\/software\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/900335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57032"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=900335"}],"version-history":[{"count":3,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/900335\/revisions"}],"predecessor-version":[{"id":900338,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/900335\/revisions\/900338"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=900335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=900335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=900335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}