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 shTo run Docker without typing sudo each time, add your user to the docker group, then sign out and in again:
sudo usermod -aG docker $USERTest it
docker run hello-world
docker compose versionNext 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
- How to open a port on a Linux serverOpen a port for your app, limit it to your own address and close it again. A short guide to ports and firewalls on a cloud server.
- Why you should snapshot a server before changing itA snapshot saves the whole disk so you can go back if an update goes wrong. How to take one, restore it and switch on nightly backups.
- Linux VPS hosting in the UK