# Installing and running Docker on a Linux server

You can install the popular container platform [Docker](https://www.ionos.com/digitalguide/server/know-how/what-is-docker/ "What is Docker?") on a Linux server at any time. It doesn’t matter whether you choose to do it when you set up the server or if the server is already running. As an alternative to the manual installation, many hosting providers offer their customers a simplified one-click installation option.

## What are the requirements for installing Docker on Linux?

If you are a Linux user and want to install Docker, you don’t have to use the GUI application Docker Desktop. Unlike Windows and macOS users, who have to use the GUI to install Docker, Linux users have the option of **installing Docker Engine**. In contrast to the desktop app, Docker Engine consumes significantly fewer resources, with 1 to 2 GB of memory (RAM) being enough for it to run smoothly. Docker Engine is available for the following Linux distributions and architectures:

<table>
  <thead>
    <tr>
      <th></th>
      <th>x86\_64/AMD64</th>
      <th>ARM64/AArch64</th>
      <th>ARM (32-bit)</th>
      <th>s390x</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Ubuntu</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Debian</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>CentOS</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Fedora</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>Raspbian</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>RHEL</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
    <tr>
      <td>SLES</td>
      <td></td>
      <td></td>
      <td></td>
      <td></td>
    </tr>
  </tbody>
</table>

If you are considering using **Docker Desktop** instead, it’s important to keep in mind that it isn’t compatible with the same range of distributions and architectures as Docker Engine. The desktop application currently only supports x86\_64/AMD64 architectures and **Ubuntu, Debian and Fedora**. Additionally, the official documentation states that the following requirements must also be met to install Docker Desktop:

- System must support KVM virtualization
- Emulator QEMU (at least Version 5.2) needs to be installed
- systemd startup process
- Gnome, KDE or MATE desktop environment
- at least 4 GB memory (RAM)

## How to find the right hosting solution for your Docker/Linux server

While it’s possible to install and run Docker on your own Linux server, it is much more convenient to **have a provider host the server** for you. By going with a hosting provider, you’ll benefit from powerful enterprise hardware and a first-class broadband connection. At IONOS, you can choose from three different server hosting models that each offer speeds of up to 400 Mbps:

- Cloud servers: With a cloud server from IONOS, you can host your Docker/Linux server on virtualized resources in the cloud. Performance can be scaled based on your computing needs, and the price is determined by usage, right down to the minute.
- vServer (VPS): vServers from IONOS also use virtualized hardware, however, unlike cloud servers, only one host system is used. Another difference between the two is that you pay a fixed monthly price with vServers.
- Dedicated servers: With dedicated servers from IONOS, you server runs on hardware that hasn’t been virtualized. You receive a clearly defined server setup and only pay for the resources you use. Prices for this server model are calculated to the minute.

### Use cases and suitable IONOS server plans

When it comes to hosting options, you have a lot to choose from, both in terms of providers and server plans. While **Docker Engine** consumes fewer resources than**Docker Desktop**, there are other factors you’ll need to consider when determining how much **CPU, memory and storage** you’ll need for your server. For example, you’ll also need to think about other activities you’ll be using the server for. Below we have summarized three different use cases with a server recommendation for each one.

<table>
  <thead>
    <tr>
      <th>Use cases for a Docker/Linux server</th>
      <th>Recommended IONOS server plan</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Server application development and testing; occasionally online</td>
      <td>[Cloud Server XL](https://www.ionos.com/server-configurator?__sendingdata=1&amp;cart.action=add-bundle&amp;cart.bundle=tariff-ngcs-unlimited-fix-xl-bundle&amp;packageselection=cloud%2Fcloud-server&amp;ac=OM.US.USo50K361685T7073a "Cloud Server XL from IONOS")</td>
    </tr>
    <tr>
      <td>Deployment server for one or more applications; permanently online</td>
      <td>[VPS Linux L](https://www.ionos.com/server-configurator?__sendingdata=1&amp;cart.action=add-bundle&amp;cart.bundle=tariff-core-vps-linux-l-bundle&amp;packageselection=server%2Fvps&amp;ac=OM.US.USo50K361685T7073a "VPS Linux L from IONOS")</td>
    </tr>
    <tr>
      <td>Server for deploying virtual environments</td>
      <td>[VPS Linux XL](https://www.ionos.com/server-configurator?__sendingdata=1&amp;cart.action=add-bundle&amp;cart.bundle=tariff-core-vps-linux-xl-bundle&amp;packageselection=server%2Fvps&amp;ac=OM.US.USo50K361685T7073a "VPS Linux XL from IONOS")</td>
    </tr>
  </tbody>
</table>

Tip Planning to make extensive use of your hosting environment and looking for a long-term solution? With a [dedicated server](https://www.ionos.com/servers/dedicated-servers "Dedicated server with Windows or Linux – IONOS") from IONOS, you’ll have access to unlimited traffic, cloud functionality, and powerful **enterprise hardware with state-of-the art processors**.

## How to manually install Docker on Linux

Once your Linux server is set up and you are ready to install Docker, you can use the following tutorial to help you. It covers the most important steps for carrying out **a manual installation via the terminal**.

Note The instructions below show how to install Docker Engine. You can find instructions on how to install Docker Desktop on Linux in the [official Docker documentation](https://docs.docker.com/desktop/install/linux-install/ "Docker Documentation: Install Docker Desktop on Linux").

### Step 1: Set up the Docker repository

If you are installing Docker Engine for the first time on your server, you’ll need to begin by setting up the Docker repository. You can then use this directory to install Docker on Linux and update the platform later on. The exact process for preparing the directory depends on the Linux distribution you are using.

#### Ubuntu, Debian und Raspbian

With Ubuntu, Debian and Raspbian, you can use the package manager *apt*. In order to update the manager and allow **HTTPS connections** for the repository, start with the following commands:

```bash
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
```

Afterwards, add the official GPG key for Docker. In the URL of the second command, Debian users should replace `ubuntu` with `debian`. Likewise, Raspbian users should replace it with `raspbian`:

```bash
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
```

In the following step, you are going to set up the repository. Just as in the code snippet above, if you are using Debian, you’ll need to replace `ubuntu` with `debian`, and if you are using Raspbian, with `raspbian`:

```bash
echo \
    "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
    "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
    sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
```

#### CentOS

With CentOS, you can set up the repository with the *yum-config-manager* tool. Use the following commands to install the manager and the repository:

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
```

#### Fedora

To set up the repository on Fedora, you‘ll need the *dnf-plugins-core* package. You can use this package to manage DNF repositories. Use the following two commands to install the package and set up the directory.

```bash
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
```

### Step 2: Install Docker Engine, containerd und Docker Compose

After you’ve finished preparing the repository, it’s time to install the container platform. In addition to Docker Engine, you’ll also need the container runtime *containerd* and the orchestration tool *Docker Compose*.

#### Ubuntu, Debian und Raspbian

Use the following command to update the *apt* package index:

```bash
sudo apt-get update
```

You can install the three essential components that make up Docker by entering the following command:

```bash
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

#### CentOS

CentOS users can install Docker on a Linux server using the following terminal command:

```bash
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

You may be asked to **accept the GPG key**. Make sure to check whether the fingerprint matches the following alphanumerical sequence: `060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35`. If it does, it’s okay to accept the key.

#### Fedora

In Fedora, you can install Docker with the following command:

```bash
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

If you are asked to accept the GPG key, make sure that the fingerprint of the key matches the following sequence `060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35`.

### Step 3: Verify success of Docker installation on your Linux system

To check if Docker has successfully been installed on Linux, you can run the `hello-world` container. If it works, you’ll receive a message confirming the success of the installation.

#### Ubuntu, Debian und Raspbian

Run the following command:

```bash
sudo docker run hello-world
```

#### CentOS und Fedora

If you are using CentOS und Fedora, Docker will not automatically start when the installation is finished. You can start the container platform with the following command:

```bash
sudo systemctl start docker
```

To check if the installation was successful, run the `hello-world` image:

```bash
sudo docker run hello-world
```

Tip In other articles in our Digital Guide, we take a closer look at installing Docker on various versions of different Linux distributions. Here are just a few:

- How to install Docker on CentOS 7
- [How to install Docker on Ubuntu 20.04](https://www.ionos.com/digitalguide/server/configuration/install-docker-on-ubuntu-2004/)
- [How to install Docker on Ubuntu 22.04](https://www.ionos.com/digitalguide/server/configuration/install-docker-on-ubuntu-2204/)
- [How to install Docker on Debian 11](https://www.ionos.com/digitalguide/server/configuration/install-docker-on-debian-11/)
- [How to install Docker on Windows 10](https://www.ionos.com/digitalguide/server/configuration/docker-on-windows-10/)

## How to install Docker on Linux systems using the 1-click app from IONOS

With IONOS, you can install Docker on Linux using an image. The installation process can be completed in just one click. It is, however, important to note that the app has been specifically designed for the Linux distribution AlmaLinux. This means that you’ll need to carry out a complete installation or reinstallation of the server you want to use.

Tip Get a [VPS](https://www.ionos.com/servers/vps "Affordable VPS hosting from IONOS") from IONOS and get started with Docker on Linux today.

### Step 1: Sign into Cloud Panel and select your server

Go to the [IONOS Customer Center login page](https://login.ionos.com/ "IONOS customer login page") and sign in using your login credentials. Click on **Server &amp; Cloud** and select the server that you want to host Docker on.

### Step 2: Set up your Docker/Linux server

Once you’re on the server overview page of Cloud Panel, you can start setting up your server. Begin by clicking on **Create** and then select the server model you want to use.

[![Image: Create a Docker/Linux server in IONOS Cloud Panel](https://www.ionos.com/digitalguide/fileadmin/_processed_/a/7/csm_ionos-cloud-panel-create-server_13d0c45e98.webp "Create a Docker/Linux server in IONOS Cloud Panel")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/ionos-cloud-panel-create-server.png) Create a Docker/Linux server in IONOS Cloud Panel Choose a name for your server and select a plan:

[![Image: IONOS Cloud Panel: Different server plans](https://www.ionos.com/digitalguide/fileadmin/_processed_/3/c/csm_ionos-cloud-panel-server-configuration_7cd6b06f62.webp "IONOS Cloud Panel: Different server plans")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/ionos-cloud-panel-server-configuration.png) Select the server configuration for your Docker/Linux server. Scroll down to **Images** and click on **Applications**.

[![Image: IONOS apps in Cloud Panel](https://www.ionos.com/digitalguide/fileadmin/_processed_/9/d/csm_images-ionos-cloud-panel_bd83f14bcf.webp "IONOS apps in Cloud Panel")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/images-ionos-cloud-panel.png) IONOS Cloud Panel: Under Applications, you’ll find Docker and other apps that can be installed with one click. Use the search function to search for the Docker app. Docker should appear in the top left corner. Select the Docker app and then click on **Create** to set up your Docker/Linux server.

[![Image: IONOS Cloud apps: Docker](https://www.ionos.com/digitalguide/fileadmin/_processed_/6/f/csm_cloud-apps-ionos-docker_267fcdde5f.webp "IONOS Cloud apps: Docker")](https://www.ionos.com/digitalguide/fileadmin/DigitalGuide/Screenshots_2023/cloud-apps-ionos-docker.png) IONOS Cloud apps: Select the Docker app by clicking on the box. The bottom half of the box should change to blue. Now, you can begin with the setup.


This is a markdown version of: [https://www.ionos.com/digitalguide/server/know-how/installing-and-running-docker-on-a-linux-server/](https://www.ionos.com/digitalguide/server/know-how/installing-and-running-docker-on-a-linux-server/) for AI/LLM consumption.