Docker CE on Ubuntu 24.04
This image boots Ubuntu 24.04 with Docker Engine, the Compose plugin and Buildx already installed from the Docker package repository, so your first command after SSH login can be docker compose up. The image costs nothing extra; you only pay for the plan, from $3.95 a month.
Image facts
- Image
- Docker CE on Ubuntu 24.04
- Type
- App image (Ubuntu 24.04 with the app set up)
- Architectures
- x86-64 and Arm64 (all four families)
- Price
- Free on every plan
- Login
- root over SSH with your key, or a one-time root password
- Locations
- All 15
What exactly is installed on the Docker CE image?
The server comes up as a regular Ubuntu 24.04 LTS install plus the Docker Community Edition packages: docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin and docker-compose-plugin. The packages are pulled from the official Docker apt repository, not the older docker.io build in the Ubuntu archive, so versions follow the Docker release train.
The Docker service is enabled at boot and the daemon listens only on its local Unix socket at /var/run/docker.sock. Nothing is exposed over TCP, and no containers are running when you first log in. That is deliberate: the image is a clean engine, and the stack you put on it is yours to define.
Compose is the v2 plugin, called as docker compose with a space. Old guides that use the hyphenated docker-compose binary work after you drop the hyphen.
What does the first login look like?
You log in as root over SSH with the key you added in the console, or with the one-time root password shown there. Any details specific to the image are shown in the message of the day, and that is the whole setup: there is no browser step for this image.
A quick check that everything works:
docker version\ndocker compose version\ndocker run --rm hello-worldIf you prefer not to work as root, create a normal user and add it to the docker group with usermod -aG docker youruser. Keep in mind that membership in that group is equal to root access on the host, because any member can start a container that mounts the whole filesystem. Give it only to people you would trust with the root password.
How much RAM and disk does a Docker host need?
The engine itself is light: dockerd and containerd together sit around 100 MB of memory when idle. What you really size for is the sum of your containers plus room for the page cache, so add up the memory each service uses in production and keep a quarter of the plan free.
As a rough guide, a reverse proxy, one web app and a small Postgres fit on 1 vCPU, 2 GB RAM, 40 GB NVMe. A stack of six to ten services (app, worker, Redis, database, proxy, a metrics agent) is comfortable on 2 vCPU, 4 GB RAM, 40 GB NVMe. Build jobs are the hidden cost: docker build for a Node.js or Java project can briefly need 2~3 GB on its own, so either build elsewhere and pull finished images, or pick a plan with spare memory.
Disk fills faster than people expect. Every image version you pull stays in /var/lib/docker until you delete it, and container logs grow without limit by default. Check with docker system df once a week in the first month.
Does ufw protect ports that Docker publishes?
No, not by default, and this is the one security detail every Docker host owner should know. When you publish a port with -p 8080:80 or a ports: entry in Compose, Docker writes its own iptables rules that are evaluated before the ufw chains. A database published as 5432:5432 is reachable from the whole internet even if ufw status says only 22, 80 and 443 are open.
Three habits avoid the problem:
- Publish internal services on the loopback address only:
127.0.0.1:5432:5432. - Do not publish database or cache ports at all; containers on the same Compose network reach each other by service name.
- Put one reverse proxy (Nginx, Caddy or Traefik) in front, publish only 80 and 443, and let it get certificates for your domain.
For rules that must apply to container traffic, use the DOCKER-USER iptables chain, which Docker leaves for you. Our firewall guide covers ufw for the host itself.
How do I back up a Docker server?
Back up the data, not the containers. Images can always be pulled again; what matters is your Compose files, your .env files and the named volumes or bind-mounted folders that hold state.
A practical layout keeps each project in /opt/<project> with its compose.yaml and a data/ folder next to it. Then a nightly job can run a database dump inside the container, for example docker compose exec -T db pg_dump -U app app > /opt/app/dump.sql, and copy the project folder to another machine with rsync or restic.
On top of that, the backup add-on keeps seven daily copies of the whole disk for 20% of the plan price, $0.85 a month on S4. A rollback is requested by support ticket from the console with the server name and the date you want. Disk copies are the safety net for a bad upgrade; file-level copies off the server are what protect you if the server itself is gone.
How do I keep Docker and my containers up to date?
There are two layers, and each has its own command. The engine and the Compose plugin are normal apt packages, so apt update && apt upgrade moves them forward together with the rest of Ubuntu. A Docker Engine upgrade restarts the daemon, which stops running containers for a moment unless you enable "live-restore": true in /etc/docker/daemon.json.
Your applications are updated per project:
cd /opt/app\ndocker compose pull\ndocker compose up -d\ndocker image prune -fPin image tags to a major version (postgres:16, not postgres:latest) so a pull never jumps a database to a release that needs a manual migration. While you are in daemon.json, set a log limit such as "log-opts": {"max-size": "10m", "max-file": "3"}; it stops a chatty container from filling the disk over a few months.
Which plan and city suit a Docker host?
Pick the plan by memory and the city by your users. Shared vCPU plans give the lowest price per GB of RAM ($1.06 a month on S4) and run in the seven European cities. If your users are in the Americas or Asia, the Performance family runs in all 15 locations at one price; note that its included traffic outside Europe is smaller, 1 TB a month on P4.
The Arm plans are worth a look for container stacks: A8 gives 4 vCPU, 8 GB RAM, 80 GB NVMe with a full core per vCPU. The catch is that every image you run must have a linux/arm64 build. Most official images do (Nginx, Postgres, Redis, Node, Python, Go), but check older or niche images before you order.
Outgrowing a plan means ordering a bigger one and moving the project folder across, which with Compose is mostly rsync plus docker compose up -d. The move guide walks through it.
Docker CE on Ubuntu 24.04 questions
Is Docker Desktop or Portainer included?
No. The image has Docker Engine with the Compose and Buildx plugins and nothing else; any management UI is your choice and can run as a container.
Can I run Docker Swarm or a Kubernetes distribution on it?
Swarm mode is part of Docker Engine and works with docker swarm init. Lightweight Kubernetes builds such as k3s can be installed on the image too, but we do not sell a managed Kubernetes service or private networks between servers.
Why did my container port open to the internet when ufw blocks it?
Docker writes iptables rules ahead of ufw for published ports. Bind such ports to 127.0.0.1 or leave them unpublished and reach them over the Compose network.
Can I switch an existing server to the Docker CE image?
Yes, rebuild it from the console with Docker CE. A rebuild wipes the disk and keeps the IP addresses, so copy your data off first.
Does the Arm family run the same Docker image?
Yes, the Docker CE image boots on Arm64 plans as well. Your containers need arm64 builds; multi-arch images pull the right one on their own.
Other images
Ubuntu 24.04 LTS
Ubuntu 22.04 LTS
Debian 13
Debian 12
Rocky Linux 10
Rocky Linux 9
AlmaLinux 10
AlmaLinux 9
CentOS Stream 10
Fedora 43
openSUSE Leap 15.6
WordPress on Ubuntu 24.04
Coolify on Ubuntu 24.04
Nextcloud on Ubuntu 24.04
WireGuard on Ubuntu 24.04
GitLab CE on Ubuntu 24.04
Prometheus and Grafana on Ubuntu 24.04
Start a Docker CE server
Choose Docker CE on Ubuntu 24.04 when you create the server, or rebuild an existing one with it.