# How to Install Docker on RHEL and Ubuntu
> [!NOTE]
> **WHAT TO EXPECT**
>
> **In this section**, users will learn how to install Docker Engine for either RHEL or Ubuntu. For more detailed instructions, see their respective pages on the Docker documentation site:
>
> - **Ubuntu**:
> - **RHEL**:
> [!WARNING]
> **PLEASE NOTE**
>
> For virtual machines it is **NOT** recommended to install Docker Desktop. Use **Docker Engine** instead.
>
> For bare metal machines that will run swXtch.io software it is still recommended to use Docker Engine, unless there is a full desktop environment with a display server like X11 or Wayland.
> [!TIP]
> **PLEASE NOTE**
>
> There are two ways to get Docker. The official (Docker-CE or Community Edition), maintained and hosted by Docker Inc. and Docker.io, maintained and distributed by the OS (RHEL, Ubuntu, etc).
>
> swXtch.io software works with both. But installing our software using the `--auto_deps` argument will automatically download docker.io.
>
> If docker-ce is needed, then the user must first install that Docker manually, and then install our software.
### Installing Docker-ce on RHEL
1. Run the following command to prepare the repositories for the Docker install:
```shell
sudo dnf config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
cat /etc/yum.repos.d/docker-ce.repo
sudo sed -i 's/$releasever/9/g' /etc/yum.repos.d/docker-ce.repo
cat /etc/yum.repos.d/docker-ce.repo
sudo dnf -y install dnf-plugins-core
```
2. Install Docker-ce:
```shell
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```
3. Continue on to [Enabling Docker](#enabling-docker).
### Installing Docker-ce on Ubuntu
1. Install Docker:
```shell
curl https://get.docker.com/ > dockerinstall && chmod 777 dockerinstall && sudo ./dockerinstall
```
2. Continue on to [Enabling Docker](#enabling-docker).
### Enabling Docker
After installing Docker-ce, run the following commands to enable it on your machine:
```bash
sudo usermod -aG docker $USER
sudo systemctl enable docker
sudo systemctl start docker
```