How to install Docker on Ubuntu

Updated 26 October 2026

Docker lets you run software in containers, so an app and everything it needs travel together. There are two ways to install it on an Ubuntu server: one click in the panel, or a few commands by hand.

The one-click way

Open your server, go to the Apps tab and press Install next to Docker. It installs the engine and Compose, and shows Installed when it is ready.

The manual way

Connect to the server over SSH, then run Docker's official install script:

curl -fsSL https://get.docker.com | sudo sh

To run Docker without typing sudo each time, add your user to the docker group, then sign out and in again:

sudo usermod -aG docker $USER

Test it

docker run hello-world
docker compose version

Next steps

  • Install Portainer from the Apps tab for a web page to manage your containers
  • Open the port your container uses on the Networking tab
  • Take a snapshot before a big change

Questions

Does Docker work on Debian, AlmaLinux and Rocky Linux too?

Yes. The Docker app installs on all four systems, and the official script supports them as well.

How much memory do I need?

1 GB runs a few small containers. For several services or a database, choose 2 GB or more.

Keep reading