ServerHandbook live check: run log ------------------------------------------------------------------------------ Article https://serverhandbook.com/kb/install-docker-ubuntu Check scripts/live/checks/install-docker-ubuntu.mjs (sha256 847f760b1a7108c3023ac4fed85909c40d2c142006c145dbf9377827085cd8dd) Ran at 2026-11-18T10:55:07Z (286 s) Result PASS, all 30 claims held Tested on System Ubuntu 26.04.1 LTS Kernel 7.0.0-30-generic Package docker-ce 5:29.10.0-1~ubuntu.26.04~resolute Package docker-ce-cli 5:29.10.0-1~ubuntu.26.04~resolute Package containerd.io 2.4.2-4~ubuntu.26.04~resolute Package docker-buildx-plugin 0.39.0-1~ubuntu.26.04~resolute Package docker-compose-plugin 5.8.0-1~ubuntu.26.04~resolute Package ufw 0.36.2-9build1 Setup A fresh Ubuntu 26.04 server (a rented cloud server, the provider’s stock image) with ufw on and only SSH allowed, as the ufw article leaves it, reached over SSH as a sudo user. The “other machine” is a second computer on its own network address (192.0.2.2), joined to the server by a virtual cable, so its requests pass through the server’s real firewall. Every version above was read from the server at run time. Passwords used on the throwaway test server are shown as [password]. How we test: https://serverhandbook.com/how-we-test ------------------------------------------------------------------------------ What the steps changed on the server (recorded before the first step and after the last) Packages added (7) containerd.io 2.4.2-4~ubuntu.26.04~resolute docker-buildx-plugin 0.39.0-1~ubuntu.26.04~resolute docker-ce 5:29.10.0-1~ubuntu.26.04~resolute docker-ce-cli 5:29.10.0-1~ubuntu.26.04~resolute docker-ce-rootless-extras 5:29.10.0-1~ubuntu.26.04~resolute docker-compose-plugin 5.8.0-1~ubuntu.26.04~resolute pigz 2.8-1build1 Packages upgraded (4) ca-certificates 20260601~26.04.1 -> 20260816ubuntu0.26.04.2 curl 8.18.0-1ubuntu2.4 -> 8.18.0-1ubuntu2.8 libcurl3t64-gnutls 8.18.0-1ubuntu2.4 -> 8.18.0-1ubuntu2.8 libcurl4t64 8.18.0-1ubuntu2.4 -> 8.18.0-1ubuntu2.8 Packages removed (0) Services enabled at boot (2) containerd.service docker.service Services disabled (0) Listening sockets opened (1) tcp 127.0.0.1:8080 docker-proxy Listening sockets closed (0) Files added in /etc (23) /etc/apt/keyrings/docker.asc /etc/apt/sources.list.d/docker.sources /etc/containerd/config.toml /etc/default/docker /etc/init.d/docker /etc/rc0.d/K01docker /etc/rc1.d/K01docker /etc/rc2.d/S01docker /etc/rc3.d/S01docker /etc/rc4.d/S01docker /etc/rc5.d/S01docker /etc/rc6.d/K01docker /etc/ssl/certs/36c6b318.0 /etc/ssl/certs/422cf4bf.0 /etc/ssl/certs/9cd9d94b.0 /etc/ssl/certs/SECOM_TLS_ECC_Root_CA_2024.pem /etc/ssl/certs/SECOM_TLS_RSA_Root_CA_2024.pem /etc/ssl/certs/Telia_EC_TLS_Root_CA_v3.pem /etc/ssl/certs/Telia_RSA_TLS_Root_CA_v3.pem /etc/ssl/certs/faf4fe6b.0 /etc/systemd/system/multi-user.target.wants/containerd.service /etc/systemd/system/multi-user.target.wants/docker.service /etc/systemd/system/sockets.target.wants/docker.socket Files changed in /etc (7) /etc/ca-certificates.conf /etc/ca-certificates.conf.dpkg-old /etc/group /etc/group- /etc/gshadow /etc/gshadow- /etc/ssl/certs/ca-certificates.crt Files removed from /etc (10) /etc/ssl/certs/14bc7599.0 /etc/ssl/certs/616816f6.0 /etc/ssl/certs/6b99d060.0 /etc/ssl/certs/Atos_TrustedRoot_2011.pem /etc/ssl/certs/Entrust_Root_Certification_Authority.pem /etc/ssl/certs/SecureSign_Root_CA12.pem /etc/ssl/certs/ca6e4ad9.0 /etc/ssl/certs/e36a6752.0 /etc/ssl/certs/ePKI_Root_Certification_Authority.pem /etc/ssl/certs/emSign_ECC_Root_CA_-_G3.pem Disk used on / (includes logs written during the run): +706.5 MB ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Audit: nmap ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Claims (30), each with what the run saw ------------------------------------------------------------------------------ 1. ok a bare Ubuntu 26.04 server box (web-server) starts 2. ok a fresh server has none of the conflicting packages: apt removes nothing | dpkg: no packages found matching docker.io | dpkg: no packages found matching docker-compose | dpkg: no packages found matching docker-compose-v2 | dpkg: no packages found matching docker-doc | dpkg: no packages found matching podman-docker | dpkg: no packages found matching containerd | dpkg: no packages found matching runc | Summary: | Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0 3. ok apt update fetches the package lists | rror.hetzner.com/ubuntu/security resolute-security/multiverse Translation-en [3,728 B] | Get:46 https://mirror.hetzner.com/ubuntu/security resolute-security/multiverse amd64 c-n-f Metadata [120 B] | Fetched 30.1 MB in 4s (7,483 kB/s) | 158 packages can be upgraded. Run 'apt list --upgradable' to see them. 4. ok curl is already on the stock image; apt only updates it and ca-certificates, nothing new is installed | Upgrading: | ca-certificates curl libcurl3t64-gnutls libcurl4t64 | | Summary: | Upgrading: 4, Installing: 0, Removing: 0, Not Upgrading: 154 | Download size: 1,262 kB | Space needed: 15.4 kB / 36.5 GB available | | Get:1 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main amd64 ca-certificates all 20260816ubuntu0.26.04.2 [138 kB] | Get:2 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main amd64 curl amd64 8.18.0-1ubuntu2.8 [273 kB] | Get:3 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main amd64 libcurl4t64 amd64 8.18.0-1ubuntu2.8 [430 kB] | Get:4 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main amd64 libcurl3t64-gnutls amd64 8.18.0-1ubuntu2.8 [421 kB] | Fetched 1,262 kB in 0s (2,903 kB/s) | Preconfiguring packages ... | | (Reading database… 52119 files and directories currently installed.) | Preparing to unpack …/ca-certificates_20260816ubuntu0.26.04.2_all.deb… | Unpacking ca-certificates (20260816ubuntu0.26.04.2) over (20260601~26.04.1)… | Preparing to unpack …/curl_8.18.0-1ubuntu2.8_amd64.deb… | Unpacking curl (8.18.0-1ubuntu2.8) over (8.18.0-1ubuntu2.4)… | Preparing to unpack …/libcurl4t64_8.18.0-1ubuntu2.8_amd64.deb… | Unpacking libcurl4t64:amd64 (8.18.0-1ubuntu2.8) over (8.18.0-1ubuntu2.4)… | Preparing to unpack …/libcurl3t64-gnutls_8.18.0-1ubuntu2.8_amd64.deb… | Unpacking libcurl3t64-gnutls:amd64 (8.18.0-1ubuntu2.8) over (8.18.0-1ubuntu2.4)… | Setting up libcurl4t64:amd64 (8.18.0-1ubuntu2.8)… | Setting up libcurl3t64-gnutls:amd64 (8.18.0-1ubuntu2.8)… | Setting up ca-certificates (20260816ubuntu0.26.04.2)… | Updating certificates in /etc/ssl/certs... | rehash: warning: skipping ca-certificates.crt, it does not contain exactly one certificate or CRL | 4 added, 5 removed; done. | Running hooks in /etc/ca-certificates/update.d... | done. | Setting up curl (8.18.0-1ubuntu2.8)… | Processing triggers for man-db (2.13.1-1build1)… | Processing triggers for libc-bin (2.43-2ubuntu2.3)… | | Scanning processes... | Scanning candidates... | Scanning linux images... | | Running kernel seems to be up-to-date. | | Restarting services... | systemctl restart packagekit.service | | No containers need to be restarted. | | No user sessions are running outdated binaries. | | No VM guests are running outdated hypervisor (qemu) binaries on this host. 5. ok the key downloads to /etc/apt/keyrings/docker.asc (no output) 6. ok the key is Docker Release (CE deb), fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 | gpg: directory '/home/deploy/.gnupg' created | gpg: keybox '/home/deploy/.gnupg/pubring.kbx' created | gpg: /home/deploy/.gnupg/trustdb.gpg: trustdb created | pub rsa4096 2017-02-22 [SCEA] | 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 | uid Docker Release (CE deb) | sub rsa4096 2017-02-22 [S] 7. ok docker.sources is written for resolute, amd64 | Types: deb | URIs: https://download.docker.com/linux/ubuntu | Suites: resolute | Components: stable | Architectures: amd64 | Signed-By: /etc/apt/keyrings/docker.asc 8. ok apt update now reads download.docker.com resolute/stable | Get:1 https://download.docker.com/linux/ubuntu resolute InRelease [32.5 kB] | Get:2 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages [34.5 kB] | Hit:3 https://mirror.hetzner.com/ubuntu/packages resolute InRelease | Hit:4 https://mirror.hetzner.com/ubuntu/packages resolute-updates InRelease | Hit:5 https://mirror.hetzner.com/ubuntu/packages resolute-backports InRelease | Hit:6 https://mirror.hetzner.com/ubuntu/security resolute-security InRelease | Fetched 67.0 kB in 0s (185 kB/s) | 154 packages can be upgraded. Run 'apt list --upgradable' to see them. 9. ok apt-cache policy: docker-ce from download.docker.com, docker.io from the Ubuntu archive | docker-ce: | Installed: (none) | Candidate: 5:29.10.0-1~ubuntu.26.04~resolute | Version table: | 5:29.10.0-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.9.3-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.9.2-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.9.1-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.9.0-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.8.2-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.8.1-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.8.0-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.7.2-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.7.1-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.7.0-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.6.2-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.6.1-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.6.0-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.5.3-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.5.2-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.5.1-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.5.0-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.4.3-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.4.2-2~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.4.2-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.4.1-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.4.0-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | 5:29.3.1-1~ubuntu.26.04~resolute 500 | 500 https://download.docker.com/linux/ubuntu resolute/stable amd64 Packages | docker.io: | Installed: (none) | Candidate: 29.1.3-0ubuntu4.1 | Version table: | 29.1.3-0ubuntu4.1 500 | 500 https://mirror.hetzner.com/ubuntu/packages resolute-updates/universe amd64 Packages | 500 https://mirror.hetzner.com/ubuntu/security resolute-security/universe amd64 Packages | 29.1.3-0ubuntu4 500 | 500 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 Packages 10. ok the five packages install | Preparing to unpack …/5-docker-ce-rootless-extras_5%3a29.10.0-1~ubuntu.26.04~resolute_amd64.deb… | Unpacking docker-ce-rootless-extras (5:29.10.0-1~ubuntu.26.04~resolute)… | Selecting previously unselected package docker-compose-plugin. | Preparing to unpack …/6-docker-compose-plugin_5.8.0-1~ubuntu.26.04~resolute_amd64.deb… | Unpacking docker-compose-plugin (5.8.0-1~ubuntu.26.04~resolute)… | Setting up docker-buildx-plugin (0.39.0-1~ubuntu.26.04~resolute)… | Setting up containerd.io (2.4.2-4~ubuntu.26.04~resolute)… | Created symlink '/etc/systemd/system/multi-user.target.wants/containerd.service' → '/usr/lib/systemd/system/containerd.service'. | Setting up docker-compose-plugin (5.8.0-1~ubuntu.26.04~resolute)… | Setting up docker-ce-cli (5:29.10.0-1~ubuntu.26.04~resolute)… | Setting up pigz (2.8-1build1)… | Setting up docker-ce-rootless-extras (5:29.10.0-1~ubuntu.26.04~resolute)… | Setting up docker-ce (5:29.10.0-1~ubuntu.26.04~resolute)… | Created symlink '/etc/systemd/system/multi-user.target.wants/docker.service' → '/usr/lib/systemd/system/docker.service'. | Created symlink '/etc/systemd/system/sockets.target.wants/docker.socket' → '/usr/lib/systemd/system/docker.socket'. | Processing triggers for man-db (2.13.1-1build1)… | | Scanning processes... | Scanning linux images... | | Running kernel seems to be up-to-date. | | No services need to be restarted. | | No containers need to be restarted. | | No user sessions are running outdated binaries. | | No VM guests are running outdated hypervisor (qemu) binaries on this host. 11. ok docker.service is enabled and active (running) | ● docker.service - Docker Application Container Engine | Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; preset: enabled) | Active: active (running) since Wed 2026-11-18 10:57:30 UTC; 8s ago | Invocation: 488c223631e5493993dc66fd74345d1f | TriggeredBy: ● docker.socket | Docs: https://docs.docker.com | Main PID: 8243 (dockerd) | Tasks: 9 | Memory: 28.8M (peak: 29.1M) | CPU: 1.197s | CGroup: /system.slice/docker.service | └─[0;38:5:245m8243 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock 12. ok docker version: Client and Server: Docker Engine - Community | Client: Docker Engine - Community | Version: 29.10.0 | API version: 1.57 | Go version: go1.27.4 | Git commit: fdd4b8e | Built: Mon Nov 16 11:01:05 2026 | OS/Arch: linux/amd64 | Context: default | | Server: Docker Engine - Community | Engine: | Version: 29.10.0 | API version: 1.57 (minimum version 1.40) | Go version: go1.27.4 | Git commit: 06db173 | Built: Mon Nov 16 11:01:32 2026 | OS/Arch: linux/amd64 | Experimental: false | containerd: | Version: v2.4.2 | GitCommit: b7a25261e029d68978bbf290df0a62fc819b3c51 | runc: | Version: 1.5.3 | GitCommit: v1.5.3-0-g46365c62 | docker-init: | Version: 0.19.0 | GitCommit: de40ad0 13. ok sudo docker run hello-world pulls the image and prints "Hello from Docker!" | Unable to find image 'hello-world:latest' locally | latest: Pulling from library/hello-world | | 4f55086f7dd0: Pull complete | Digest: sha256:1e4c05b897a751332ce85c7e9449da2d93514ea2dea6dbb0e2753c9e949b2bfa | Status: Downloaded newer image for hello-world:latest | | Hello from Docker! | This message shows that your installation appears to be working correctly. | | To generate this message, Docker took the following steps: | 1. The Docker client contacted the Docker daemon. | 2. The Docker daemon pulled the "hello-world" image from the Docker Hub. | (amd64) | 3. The Docker daemon created a new container from that image which runs the | executable that produces the output you are currently reading. | 4. The Docker daemon streamed that output to the Docker client, which sent it | to your terminal. | | To try something more ambitious, you can run an Ubuntu container with: | $ docker run -it ubuntu bash | | Share images, automate workflows, and more with a free Docker ID: | https://hub.docker.com/ | | For more examples and ideas, visit: | https://docs.docker.com/get-started/ 14. ok docker compose version prints the plugin version (v5.x at the time of the run) | Docker Compose version v5.8.0 15. ok docker ps without sudo: permission denied while trying to connect to the docker API at unix:///var/run/docker.sock | permission denied while trying to connect to the docker API at unix:///var/run/docker.sock 16. ok ufw allows OpenSSH only | Status: active | | To Action From | -- ------ ---- | OpenSSH ALLOW Anywhere | OpenSSH (v6) ALLOW Anywhere (v6) 17. ok an nginx container starts with -p 8080:80 | Unable to find image 'nginx:alpine' locally | alpine: Pulling from library/nginx | | da90db506dd5: Pulling fs layer | 881fc932939e: Pulling fs layer | e011f124249b: Pulling fs layer | 1abafee971b9: Pulling fs layer | c7dfd64eeb02: Pulling fs layer | a746bd1dc828: Pulling fs layer | b9c6ee6a30f8: Pulling fs layer | 881fc932939e: Extracting 1 s | 881fc932939e: Extracting 1 s | Digest: sha256:fed7e14be83cbd2661a75cdc5b872d936cf155d46c327084d30b8df19ae88d72 | Status: Downloaded newer image for nginx:alpine | 1ac1496d5a7b6a7e9f6039a8d0a17fb16a5cc44d2017e58ea3c42cd2390ca886 18. ok from another machine: 200, although ufw has no rule for 8080 | 200 19. ok Docker's own DNAT rule sends port 8080 to the container | -A DOCKER ! -i docker0 -p tcp -m tcp --dport 8080 -j DNAT --to-destination 172.17.0.2:80 20. ok the container is replaced (rm -f prints its name) by one published on 127.0.0.1 only | web | 668eb4eaa47ba6f98a644b1379347afa98bd34f6c5a03b0531002a797040fb22 21. ok from another machine now: no answer, ufw drops it (curl: (28) Connection timed out) | curl: (28) Connection timed out after 5002 milliseconds | 000 22. ok on the server itself it still answers 200 (for a reverse proxy in front) | 200 23. ok docker ps shows 127.0.0.1:8080->80/tcp | web 127.0.0.1:8080->80/tcp 24. ok (Docker is running at the end of the steps) | active 25. ok (Docker starts at boot) | enabled 26. ok (tested on) the box reports its OS, kernel and the version of 6 package(s) | PRETTY_NAME="Ubuntu 26.04.1 LTS" | VIRT=none | KERNEL=7.0.0-30-generic | PKG containerd.io 2.4.2-4~ubuntu.26.04~resolute | PKG docker-buildx-plugin 0.39.0-1~ubuntu.26.04~resolute | PKG docker-ce 5:29.10.0-1~ubuntu.26.04~resolute | PKG docker-ce-cli 5:29.10.0-1~ubuntu.26.04~resolute | PKG docker-compose-plugin 5.8.0-1~ubuntu.26.04~resolute | PKG ufw 0.36.2-9build1 27. ok undo: apt purge removes the packages | pgrading: 0, Installing: 0, Removing: 6, Not Upgrading: 154 | Freed space: 379 MB | | | (Reading database… 52354 files and directories currently installed.) | Removing docker-ce (5:29.10.0-1~ubuntu.26.04~resolute)… | Removing containerd.io (2.4.2-4~ubuntu.26.04~resolute)… | Removing docker-buildx-plugin (0.39.0-1~ubuntu.26.04~resolute)… | Removing docker-ce-cli (5:29.10.0-1~ubuntu.26.04~resolute)… | Removing docker-ce-rootless-extras (5:29.10.0-1~ubuntu.26.04~resolute)… | Removing docker-compose-plugin (5.8.0-1~ubuntu.26.04~resolute)… | Processing triggers for man-db (2.13.1-1build1)… | (Reading database… 52129 files and directories currently installed.) | Purging configuration files for docker-ce (5:29.10.0-1~ubuntu.26.04~resolute)… | Purging configuration files for containerd.io (2.4.2-4~ubuntu.26.04~resolute)… 28. ok undo: the images and containers are still in /var/lib/docker after the purge | 272K /var/lib/docker | 91M /var/lib/containerd 29. ok undo: the data, the repository and the key are deleted 30. ok undo: the docker command is gone | docker: not installed ------------------------------------------------------------------------------ Commands and what they printed (26) ------------------------------------------------------------------------------ $ sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1) dpkg: no packages found matching docker.io dpkg: no packages found matching docker-compose dpkg: no packages found matching docker-compose-v2 dpkg: no packages found matching docker-doc dpkg: no packages found matching podman-docker dpkg: no packages found matching containerd dpkg: no packages found matching runc Summary: Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0 $ sudo apt update Get:1 https://mirror.hetzner.com/ubuntu/packages resolute InRelease [136 kB] Get:2 https://mirror.hetzner.com/ubuntu/packages resolute-updates InRelease [137 kB] Get:3 https://mirror.hetzner.com/ubuntu/packages resolute-backports InRelease [137 kB] Get:4 https://mirror.hetzner.com/ubuntu/security resolute-security InRelease [137 kB] Get:5 https://mirror.hetzner.com/ubuntu/packages resolute/main amd64 Packages [1,480 kB] Get:6 https://mirror.hetzner.com/ubuntu/packages resolute/main Translation-en [524 kB] Get:7 https://mirror.hetzner.com/ubuntu/packages resolute/main amd64 c-n-f Metadata [32.4 kB] Get:8 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 Packages [16.0 MB] Get:9 https://mirror.hetzner.com/ubuntu/packages resolute/universe Translation-en [6,329 kB] Get:10 https://mirror.hetzner.com/ubuntu/packages resolute/universe amd64 c-n-f Metadata [313 kB] Get:11 https://mirror.hetzner.com/ubuntu/packages resolute/restricted amd64 Packages [152 kB] Get:12 https://mirror.hetzner.com/ubuntu/packages resolute/restricted Translation-en [25.8 kB] Get:13 https://mirror.hetzner.com/ubuntu/packages resolute/restricted amd64 c-n-f Metadata [388 B] Get:14 https://mirror.hetzner.com/ubuntu/packages resolute/multiverse amd64 Packages [290 kB] Get:15 https://mirror.hetzner.com/ubuntu/packages resolute/multiverse Translation-en [127 kB] Get:16 https://mirror.hetzner.com/ubuntu/packages resolute/multiverse amd64 c-n-f Metadata [8,276 B] Get:17 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main amd64 Packages [872 kB] Get:18 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main Translation-en [196 kB] Get:19 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main amd64 c-n-f Metadata [5,756 B] Get:20 https://mirror.hetzner.com/ubuntu/packages resolute-updates/universe amd64 Packages [391 kB] Get:21 https://mirror.hetzner.com/ubuntu/packages resolute-updates/universe Translation-en [123 kB] Get:22 https://mirror.hetzner.com/ubuntu/packages resolute-updates/universe amd64 c-n-f Metadata [4,704 B] Get:23 https://mirror.hetzner.com/ubuntu/packages resolute-updates/restricted amd64 Packages [602 kB] Get:24 https://mirror.hetzner.com/ubuntu/packages resolute-updates/restricted Translation-en [125 kB] Get:25 https://mirror.hetzner.com/ubuntu/packages resolute-updates/restricted amd64 c-n-f Metadata [392 B] Get:26 https://mirror.hetzner.com/ubuntu/packages resolute-updates/multiverse amd64 Packages [21.0 kB] Get:27 https://mirror.hetzner.com/ubuntu/packages resolute-updates/multiverse Translation-en [4,168 B] Get:28 https://mirror.hetzner.com/ubuntu/packages resolute-updates/multiverse amd64 c-n-f Metadata [256 B] Get:29 https://mirror.hetzner.com/ubuntu/packages resolute-backports/main amd64 c-n-f Metadata [112 B] Get:30 https://mirror.hetzner.com/ubuntu/packages resolute-backports/universe amd64 Packages [3,136 B] Get:31 https://mirror.hetzner.com/ubuntu/packages resolute-backports/universe Translation-en [7,988 B] Get:32 https://mirror.hetzner.com/ubuntu/packages resolute-backports/universe amd64 c-n-f Metadata [116 B] Get:33 https://mirror.hetzner.com/ubuntu/packages resolute-backports/restricted amd64 c-n-f Metadata [120 B] Get:34 https://mirror.hetzner.com/ubuntu/packages resolute-backports/multiverse amd64 c-n-f Metadata [120 B] Get:35 https://mirror.hetzner.com/ubuntu/security resolute-security/main amd64 Packages [718 kB] Get:36 https://mirror.hetzner.com/ubuntu/security resolute-security/main Translation-en [158 kB] Get:37 https://mirror.hetzner.com/ubuntu/security resolute-security/main amd64 c-n-f Metadata [4,616 B] Get:38 https://mirror.hetzner.com/ubuntu/security resolute-security/universe amd64 Packages [220 kB] Get:39 https://mirror.hetzner.com/ubuntu/security resolute-security/universe Translation-en [72.6 kB] Get:40 https://mirror.hetzner.com/ubuntu/security resolute-security/universe amd64 c-n-f Metadata [3,552 B] Get:41 https://mirror.hetzner.com/ubuntu/security resolute-security/restricted amd64 Packages [586 kB] Get:42 https://mirror.hetzner.com/ubuntu/security resolute-security/restricted Translation-en [122 kB] Get:43 https://mirror.hetzner.com/ubuntu/security resolute-security/restricted amd64 c-n-f Metadata [396 B] Get:44 https://mirror.hetzner.com/ubuntu/security resolute-security/multiverse amd64 Packages [20.0 kB] Get:45 https://mirror.hetzner.com/ubuntu/security resolute-security/multiverse Translation-en [3,728 B] Get:46 https://mirror.hetzner.com/ubuntu/security resolute-security/multiverse amd64 c-n-f Metadata [120 B] Fetched 30.1 MB in 4s (7,483 kB/s) 158 packages can be upgraded. Run 'apt list --upgradable' to see them. $ sudo apt install -y ca-certificates curl Upgrading: ca-certificates curl libcurl3t64-gnutls libcurl4t64 Summary: Upgrading: 4, Installing: 0, Removing: 0, Not Upgrading: 154 Download size: 1,262 kB Space needed: 15.4 kB / 36.5 GB available Get:1 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main amd64 ca-certificates all 20260816ubuntu0.26.04.2 [138 kB] Get:2 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main amd64 curl amd64 8.18.0-1ubuntu2.8 [273 kB] Get:3 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main amd64 libcurl4t64 amd64 8.18.0-1ubuntu2.8 [430 kB] Get:4 https://mirror.hetzner.com/ubuntu/packages resolute-updates/main amd64 libcurl3t64-gnutls amd64 8.18.0-1ubuntu2.8 [421 kB] Fetched 1,262 kB in 0s (2,903 kB/s) Preconfiguring packages ... (Reading database… 52119 files and directories currently installed.) Preparing to unpack …/ca-certificates_20260816ubuntu0.26.04.2_all.deb… Unpacking ca-certificates (20260816ubuntu0.26.04.2) over (20260601~26.04.1)… Preparing to unpack …/curl_8.18.0-1ubuntu2.8_amd64.deb… Unpacking curl (8.18.0-1ubuntu2.8) over (8.18.0-1ubuntu2.4)… Preparing to unpack …/libcurl4t64_8.18.0-1ubuntu2.8_amd64.deb… Unpacking libcurl4t64:amd64 (8.18.0-1ubuntu2.8) over (8.18.0-1ubuntu2.4)… Preparing to unpack …/libcurl3t64-gnutls_8.18.0-1ubuntu2.8_amd64.deb… Unpacking libcurl3t64-gnutls:amd64 (8.18.0-1ubuntu2.8) over (8.18.0-1ubuntu2.4)… Setting up libcurl4t64:amd64 (8.18.0-1ubuntu2.8)… Setting up libcurl3t64-gnutls:amd64 (8.18.0-1ubuntu2.8)… Setting up ca-certificates (20260816ubuntu0.26.04.2)… Updating certificates in /etc/ssl/certs... rehash: warning: skipping ca-certificates.crt, it does not contain exactly one certificate or CRL 4 added, 5 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Setting up curl (8.18.0-1ubuntu2.8)… Processing triggers for man-db (2.13.1-1build1)… Processing triggers for libc-bin (2.43-2ubuntu2.3)… Scanning processes... Scanning candidates... Scanning linux images... Running kernel seems to be up-to-date. Restarting services... systemctl restart packagekit.service No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. $ sudo install -m 0755 -d /etc/apt/keyrings && sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && sudo chmod a+r /etc/apt/keyrings/docker.asc $ gpg --show-keys /etc/apt/keyrings/docker.asc gpg: directory '/home/deploy/.gnupg' created gpg: keybox '/home/deploy/.gnupg/pubring.kbx' created gpg: /home/deploy/.gnupg/trustdb.gpg: trustdb created pub rsa4096 2017-02-22 [SCEA] 9DC858229FC7DD38854AE2D88D81803C0EBFCD88 uid Docker Release (CE deb) sub rsa4096 2017-02-22 [S] $ sudo tee /etc/apt/sources.list.d/docker.sources <80/tcp $ sudo apt purge -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras The following package was automatically installed and is no longer required: pigz Use 'sudo apt autoremove' to remove it. REMOVING: containerd.io* docker-ce* docker-ce-rootless-extras* docker-buildx-plugin* docker-ce-cli* docker-compose-plugin* Summary: Upgrading: 0, Installing: 0, Removing: 6, Not Upgrading: 154 Freed space: 379 MB (Reading database… 52354 files and directories currently installed.) Removing docker-ce (5:29.10.0-1~ubuntu.26.04~resolute)… Removing containerd.io (2.4.2-4~ubuntu.26.04~resolute)… Removing docker-buildx-plugin (0.39.0-1~ubuntu.26.04~resolute)… Removing docker-ce-cli (5:29.10.0-1~ubuntu.26.04~resolute)… Removing docker-ce-rootless-extras (5:29.10.0-1~ubuntu.26.04~resolute)… Removing docker-compose-plugin (5.8.0-1~ubuntu.26.04~resolute)… Processing triggers for man-db (2.13.1-1build1)… (Reading database… 52129 files and directories currently installed.) Purging configuration files for docker-ce (5:29.10.0-1~ubuntu.26.04~resolute)… Purging configuration files for containerd.io (2.4.2-4~ubuntu.26.04~resolute)… $ sudo du -sh /var/lib/docker /var/lib/containerd 272K /var/lib/docker 91M /var/lib/containerd $ sudo rm -rf /var/lib/docker /var/lib/containerd && sudo rm /etc/apt/sources.list.d/docker.sources /etc/apt/keyrings/docker.asc $ command -v docker || echo "docker: not installed" docker: not installed ------------------------------------------------------------------------------ nmap: its full screen before the first step ------------------------------------------------------------------------------ Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-11-18 10:55 UTC Nmap scan report for 203.0.113.10 Host is up, received user-set (0.036s latency). Not shown: 999 filtered tcp ports (no-response) PORT STATE SERVICE REASON 22/tcp open ssh syn-ack Nmap done: 1 IP address (1 host up) scanned in 6.39 seconds ------------------------------------------------------------------------------ nmap: its full screen after the last step ------------------------------------------------------------------------------ Starting Nmap 7.94SVN ( https://nmap.org ) at 2026-11-18 10:59 UTC Nmap scan report for 203.0.113.10 Host is up, received user-set (0.038s latency). Not shown: 999 filtered tcp ports (no-response) PORT STATE SERVICE REASON 22/tcp open ssh syn-ack Nmap done: 1 IP address (1 host up) scanned in 6.77 seconds ------------------------------------------------------------------------------ The check's source (scripts/live/checks/install-docker-ubuntu.mjs) As it ran. ------------------------------------------------------------------------------ /** * KB: install Docker Engine on Ubuntu 26.04 and 24.04 (one check, run once per release: LIVE_BOX_RELEASE) from Docker's own apt repository (docker.sources, deb822), the five * packages, the service, hello-world, docker compose version; what Ubuntu's docker.io would have given instead * (apt-cache policy); the error plain `docker` gives without sudo (pointer to its own article); the trap no top guide * mentions: a port published with `-p 8080:80` is reachable from outside although ufw allows only SSH, and the fix * (`-p 127.0.0.1:8080:80`). Undo (purge + the data folders + the repository). * * Proof standard v2 (2026-11-18): on the rented server, with nmap from a second server on the internet before the first * step and after the last (the container then published on 127.0.0.1 only), so the page shows what the internet sees. * * Runs on a fresh server (the local VM box or the rented server). The "other machine" is a network namespace ON the * box ("app", 192.0.2.2) joined by a virtual cable whose server end is 203.0.113.10, so it reaches the server exactly as * the article shows (`curl http://203.0.113.10:8080`), through the server's real kernel, ufw and Docker's rules. */ import { VPS } from '../box.mjs' import { bareBox, reportBox } from '../lib.mjs' export const meta = { audits: ['nmap'] } // The release this run boots (LIVE_BOX_RELEASE; plan04 §9: the same check runs on 26.04 and 24.04). const RELEASE = process.env.LIVE_BOX_RELEASE || '24.04' const CODENAME = { '24.04': 'noble', '26.04': 'resolute' }[RELEASE] const SERVER = '203.0.113.10' const APP = '192.0.2.2' const SOURCES = `sudo tee /etc/apt/sources.list.d/docker.sources < bareBox(ctx, async ({ sudoUser }) => { const { run, L } = sudoUser() L('sudo true') // ── hidden: the firewall from the ufw article (SSH only), and the other machine's cable ── L('sudo ufw allow OpenSSH >/dev/null && sudo ufw --force enable >/dev/null') L( [ 'sudo ip netns add app', 'sudo ip link add v-app type veth peer name eth0 netns app', `sudo ip addr add ${SERVER} peer ${APP} dev v-app`, 'sudo ip link set v-app up', `sudo ip netns exec app ip addr add ${APP} peer ${SERVER} dev eth0`, 'sudo ip netns exec app ip link set eth0 up', 'sudo ip netns exec app ip link set lo up', ].join(' && '), ) const onApp = (cmd) => `sudo ip netns exec app runuser -u nobody -- ${cmd}` // ── step 1: nothing old in the way ─────────────────────────────────────────────────────── const rm = run( 'sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)', { id: 'remove-old', timeout: 300000 }, ) // apt 2.7 (24.04) says "0 to remove", apt 3 (26.04) "Removing: 0" in its Summary block ctx.check('a fresh server has none of the conflicting packages: apt removes nothing', rm.exit === 0 && /0 to remove|Removing: 0\b/.test(rm.out), rm.out) // ── step 2: Docker's key and repository ────────────────────────────────────────────────── const u1 = run('sudo apt update', { id: 'apt-update-1', timeout: 600000 }) // apt 3 (26.04) no longer prints "Reading package lists... Done" after an update ctx.check('apt update fetches the package lists', u1.exit === 0 && /^Fetched .* in /m.test(u1.out) && !/^(W|E): /m.test(u1.out), u1.out.slice(-300)) const pre = run('sudo apt install -y ca-certificates curl', { id: 'apt-prereq', timeout: 600000 }) // the stock image has curl and ca-certificates; apt either says "already the newest" or upgrades them (Hetzner's image was older than the archive on both releases) ctx.check('curl is already on the stock image; apt only updates it and ca-certificates, nothing new is installed', pre.exit === 0 && /ca-certificates/.test(pre.out) && /curl is already the newest version|\b0 newly installed|Installing: 0\b/.test(pre.out), pre.out) const key = run( 'sudo install -m 0755 -d /etc/apt/keyrings && sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && sudo chmod a+r /etc/apt/keyrings/docker.asc', { id: 'key', timeout: 120000 }, ) ctx.check('the key downloads to /etc/apt/keyrings/docker.asc (no output)', key.exit === 0 && key.out.trim() === '', key.out) const fp = run('gpg --show-keys /etc/apt/keyrings/docker.asc', { id: 'key-fingerprint' }) ctx.check('the key is Docker Release (CE deb), fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88', /9DC858229FC7DD38854AE2D88D81803C0EBFCD88/.test(fp.out.replace(/\s/g, '')) && /Docker Release \(CE deb\)/.test(fp.out), fp.out) const src = run(SOURCES, { id: 'sources' }) ctx.check(`docker.sources is written for ${CODENAME}, amd64`, src.exit === 0 && src.out.includes(`Suites: ${CODENAME}`) && /Architectures: amd64/.test(src.out), src.out) const u2 = run('sudo apt update', { id: 'apt-update-2', timeout: 600000 }) ctx.check(`apt update now reads download.docker.com ${CODENAME}/stable`, u2.exit === 0 && u2.out.includes(`download.docker.com/linux/ubuntu ${CODENAME}`) && !/W: |E: /.test(u2.out), u2.out) const pol = run('apt-cache policy docker-ce docker.io', { id: 'policy' }) ctx.check('apt-cache policy: docker-ce from download.docker.com, docker.io from the Ubuntu archive', /docker-ce:\s+Installed: \(none\)\s+Candidate: 5:\d+/.test(pol.out) && /docker\.io:\s+Installed: \(none\)\s+Candidate: \d/.test(pol.out), pol.out) // ── step 3: install ────────────────────────────────────────────────────────────────────── const inst = run('sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin', { id: 'apt-install', timeout: 900000 }) ctx.check('the five packages install', inst.exit === 0 && /Setting up docker-ce /.test(inst.out) && /Setting up docker-compose-plugin /.test(inst.out), inst.out.slice(-1500)) // ── step 4: check it works ─────────────────────────────────────────────────────────────── const st = run('systemctl status docker --no-pager -n 0', { id: 'status' }) ctx.check('docker.service is enabled and active (running)', /docker\.service; enabled;/.test(st.out) && /Active: active \(running\)/.test(st.out), st.out) const ver = run('sudo docker version', { id: 'version' }) ctx.check('docker version: Client and Server: Docker Engine - Community', /Client: Docker Engine - Community/.test(ver.out) && /Server: Docker Engine - Community/.test(ver.out), ver.out) const hw = run('sudo docker run hello-world', { id: 'hello-world', timeout: 300000 }) ctx.check('sudo docker run hello-world pulls the image and prints "Hello from Docker!"', hw.exit === 0 && /Pull complete/.test(hw.out) && /Hello from Docker!/.test(hw.out), hw.out) const cv = run('docker compose version', { id: 'compose-version' }) ctx.check('docker compose version prints the plugin version (v5.x at the time of the run)', /^Docker Compose version v\d+\.\d+\.\d+/m.test(cv.out), cv.out) // ── without sudo ───────────────────────────────────────────────────────────────────────── const ps = run('docker ps', { id: 'no-sudo' }) ctx.check('docker ps without sudo: permission denied while trying to connect to the docker API at unix:///var/run/docker.sock', ps.exit !== 0 && /permission denied while trying to connect to the docker API at unix:\/\/\/var\/run\/docker\.sock/.test(ps.out), ps.out) // ── the firewall trap ──────────────────────────────────────────────────────────────────── const uf = run('sudo ufw status', { id: 'ufw-status' }) ctx.check('ufw allows OpenSSH only', /OpenSSH\s+ALLOW\s+Anywhere/.test(uf.out) && !/8080/.test(uf.out), uf.out) const web = run('sudo docker run -d --name web -p 8080:80 nginx:alpine', { id: 'run-web', timeout: 300000 }) ctx.check('an nginx container starts with -p 8080:80', web.exit === 0 && /[0-9a-f]{64}/.test(web.out), web.out) L('for i in $(seq 1 20); do curl -s -o /dev/null http://127.0.0.1:8080 && break; sleep 1; done') const CURL = `curl -sS -m 5 -o /dev/null -w '%{http_code}\\n' http://${SERVER}:8080` const o1 = run(onApp(CURL), { show: CURL, id: 'outside-open' }) ctx.check('from another machine: 200, although ufw has no rule for 8080', o1.out.trim() === '200', o1.out) const ipt = run('sudo iptables -t nat -S DOCKER | grep 8080', { id: 'nat-rule' }) ctx.check("Docker's own DNAT rule sends port 8080 to the container", /--dport 8080 -j DNAT --to-destination/.test(ipt.out), ipt.out) const web2 = run('sudo docker rm -f web\nsudo docker run -d --name web -p 127.0.0.1:8080:80 nginx:alpine', { id: 'run-web-local' }) ctx.check('the container is replaced (rm -f prints its name) by one published on 127.0.0.1 only', web2.exit === 0 && /^web$/m.test(web2.out) && /[0-9a-f]{64}/.test(web2.out), web2.out) L('for i in $(seq 1 20); do curl -s -o /dev/null http://127.0.0.1:8080 && break; sleep 1; done') const o2 = run(onApp(CURL), { show: CURL, id: 'outside-closed' }) ctx.check('from another machine now: no answer, ufw drops it (curl: (28) Connection timed out)', /curl: \(28\) Connection timed out/.test(o2.out) && !/^200$/m.test(o2.out), o2.out) const loc = run(`curl -sS -o /dev/null -w '%{http_code}\\n' http://127.0.0.1:8080`, { id: 'local-ok' }) ctx.check('on the server itself it still answers 200 (for a reverse proxy in front)', loc.out.trim() === '200', loc.out) const dps = run('sudo docker ps --format "{{.Names}} {{.Ports}}"', { id: 'ps-ports' }) ctx.check('docker ps shows 127.0.0.1:8080->80/tcp', /web\s+127\.0\.0\.1:8080->80\/tcp/.test(dps.out), dps.out) const act = L('systemctl is-active docker') ctx.check('(Docker is running at the end of the steps)', act === 'active', act, { reader: { cmd: 'systemctl is-active docker', expect: '^active$' } }) const en = L('systemctl is-enabled docker') ctx.check('(Docker starts at boot)', en === 'enabled', en, { reader: { cmd: 'systemctl is-enabled docker', expect: '^enabled$' } }) ctx.stepsDone() // the article's steps end here (the container published on 127.0.0.1 only); the undo follows L('sudo docker rm -f web >/dev/null') reportBox( ctx, L, `A fresh Ubuntu ${RELEASE} server (${VPS ? 'a rented cloud server, the provider’s stock image' : 'Ubuntu’s cloud image'}) with ufw on and only SSH allowed, as the ufw article leaves it, reached over SSH as a sudo user. The “other machine” is a second computer on its own network address (192.0.2.2), joined to the server by a virtual cable, so its requests pass through the server’s real firewall.`, ['docker-ce', 'docker-ce-cli', 'containerd.io', 'docker-buildx-plugin', 'docker-compose-plugin', 'ufw'], ) // ── undo ───────────────────────────────────────────────────────────────────────────────── const pu = run('sudo apt purge -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras', { id: 'undo-purge', timeout: 600000 }) ctx.check('undo: apt purge removes the packages', pu.exit === 0 && /Removing docker-ce /.test(pu.out), pu.out.slice(-800)) const left = run('sudo du -sh /var/lib/docker /var/lib/containerd', { id: 'undo-left' }) ctx.check('undo: the images and containers are still in /var/lib/docker after the purge', /\/var\/lib\/docker/.test(left.out) && !/No such file/.test(left.out), left.out) const del = run('sudo rm -rf /var/lib/docker /var/lib/containerd && sudo rm /etc/apt/sources.list.d/docker.sources /etc/apt/keyrings/docker.asc', { id: 'undo-rm' }) ctx.check('undo: the data, the repository and the key are deleted', del.exit === 0 && del.out.trim() === '', del.out) const gone = run('command -v docker || echo "docker: not installed"', { id: 'undo-check' }) ctx.check('undo: the docker command is gone', /docker: not installed/.test(gone.out), gone.out) }) export default check