UFW doesn’t protect a port that Docker publishes. On our Ubuntu 24.04 test server, UFW denied all incoming traffic, yet a WordPress container published on port 8080 still answered a second server, while a plain web server on port 9000 timed out. Docker writes its own NAT rules ahead of UFW’s chains, so the firewall never sees that traffic. Know that before you install Docker and Docker Compose on an internet-facing server; the fix is one line in the Compose file.
The steps install Docker CE and the Compose plugin from Docker’s repository on Ubuntu 24.04 and Debian 13, with a section for Debian 12, then run a WordPress, MariaDB and Redis stack. Every command was re-run on Ubuntu 24.04.5 LTS, Debian 13 and Debian 12 in November 2026 with Docker Engine 29.9.3 and Compose 5.7.1. On Ubuntu 26.04, follow the Docker CE on Ubuntu 26.04 guide instead.
What you need
Docker itself needs very little, so you size the server for the containers you’ll run on it. The stack in this guide took 1.7 GB of images and 245 MB of volumes on a fresh install, and MariaDB sat at about 123 MB of RAM with an empty database. Before you start, you need:
- Ubuntu 24.04 LTS, Debian 13 or Debian 12, 64-bit
- a user with sudo rights
- outbound HTTPS to download.docker.com and Docker Hub
- 5 GB or more free under
/var/lib/dockerfor the example stack
Each lab VM had 2 vCPU and 4 GB of RAM, which is a floor for following along, not a production spec. A real WordPress site’s database and uploads decide the disk, and the PHP worker count decides the RAM. If Docker is new to you and you want the concepts behind images, volumes and networks before you run production on it, the Docker books we recommend cover them in the order you will need them.
Skip the distro Compose packages
Install Compose from Docker’s repository, not from the Ubuntu or Debian archive. The archive packages are a release or more behind, and two of the three releases we tested still offer the old Python Compose v1 under the docker-compose name. This is what apt-cache policy reported on each VM the same day, after Docker’s repo was added:
| Package | Ubuntu 24.04 | Debian 13 | Debian 12 |
|---|---|---|---|
| docker-compose-plugin (Docker repo) | 5.7.1 | 5.7.1 | 5.7.1 |
| docker-ce (Docker repo) | 29.9.3 | 29.9.3 | 29.9.3 |
| docker-compose-v2 (archive) | 2.40.3 | not packaged | not packaged |
| docker-compose (archive) | 1.29.2 (Python v1) | 2.26.1 | 1.29.2 (Python v1) |
| docker.io (archive) | 29.1.3 | 26.1.5 | 20.10.24 |
Ubuntu’s docker-compose-v2 is the closest the archive gets, and it is still a full major release behind Docker’s plugin, as the table shows. The capture below is from the Ubuntu VM with Docker’s plugin already installed, so the plugin shows as installed and the archive build as a candidate only:

Mixing the two does not work either. Both packages ship the same file, so when we installed docker-compose-v2 next to Docker’s plugin, dpkg refused it and left the plugin in place:
dpkg: error processing archive /var/cache/apt/archives/docker-compose-v2_2.40.3+ds1-0ubuntu1~24.04.1_amd64.deb (--unpack):
trying to overwrite '/usr/libexec/docker/cli-plugins/docker-compose', which is also in package docker-compose-plugin 5.7.1-1~ubuntu.24.04~noble
That failure is harmless, because apt rolls it back and apt-get check stayed clean afterwards. The Debian docker-compose package is worse. On Debian 13 a simulated install planned to remove docker-ce and docker-ce-cli to make room for Debian’s own docker-cli, and on Debian 12 the real install did exactly that (shown in the Debian 12 section). So the rule is simple: after Docker’s repo is on a server, never install a package with compose in its name from the archive.
Remove the distro Docker packages
Ubuntu and Debian both ship their own docker.io build (Debian-only readers can also follow the shorter Docker CE on Debian guide), and it conflicts with Docker’s packages because both provide containerd and runc. Remove whatever is installed. The dpkg --get-selections filter means the command only touches packages that exist, so it’s safe on a clean server too:
sudo apt remove -y $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc docker-buildx podman-docker containerd runc 2>/dev/null | cut -f1)
On the Ubuntu box, where we had installed the archive’s docker.io and docker-compose-v2 first to test the migration, apt removed four packages and freed 344 MB. Watch for the warning about docker.socket: the old socket unit is still running when its service goes away, and that leftover breaks the new install a few minutes later:
The following packages will be REMOVED:
containerd docker-compose-v2 docker.io runc
0 upgraded, 0 newly installed, 4 to remove and 8 not upgraded.
After this operation, 344 MB disk space will be freed.
Removing docker-compose-v2 (2.40.3+ds1-0ubuntu1~24.04.1) ...
Removing docker.io (29.1.3-0ubuntu3~24.04.2) ...
'/usr/share/docker.io/contrib/nuke-graph-directory.sh' -> '/var/lib/docker/nuke-graph-directory.sh'
Stopping 'docker.service', but its triggering units are still active:
docker.socket
Removing containerd (2.2.1-0ubuntu1~24.04.4) ...
Removing runc (1.3.4-0ubuntu1~24.04.1) ...
Removing the packages does not delete /var/lib/docker, so volumes and image data from the old install stay on disk. We had no containers on that VM to carry over, so we can’t promise the new engine picks up every old container. Back up any volume you care about before you switch, with a plain tar of its directory if nothing else.
Add Docker’s apt repository
The commands are the same on all three releases except for the repo path, so set it once. Use ubuntu on Ubuntu 24.04 and debian on Debian 13 or 12. Every later command reads this variable, so export it again if you reconnect before finishing:
export DISTRO=ubuntu
Download Docker’s signing key into a dedicated keyring, so apt only trusts it for Docker’s repo and not for every source on the system. The Signed-By line in the source file below points at this exact path, so keep the filename as shown:
sudo apt update
sudo apt install -y ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL "https://download.docker.com/linux/${DISTRO}/gpg" -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
Write the repository as a deb822 .sources file, the format Docker’s install docs use. The suite is read from /etc/os-release, which gave noble on Ubuntu 24.04, trixie on Debian 13 and bookworm on Debian 12, so the same line works on all three:
printf 'Types: deb\nURIs: https://download.docker.com/linux/%s\nSuites: %s\nComponents: stable\nArchitectures: %s\nSigned-By: /etc/apt/keyrings/docker.asc\n' "${DISTRO}" "$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")" "$(dpkg --print-architecture)" | sudo tee /etc/apt/sources.list.d/docker.sources
On Debian 13 the file came out like this. Docker’s docs list only Debian 13 and 12 as supported, so on Debian testing, whose codename is forky, check that Docker publishes a suite for it before you rely on this file:
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: trixie
Components: stable
Architectures: amd64
Signed-By: /etc/apt/keyrings/docker.asc
If you manage Rocky Linux or Fedora hosts as well, the repo setup differs, and our multi-distro Docker install guide covers those package managers side by side.
Install Docker Engine and the Compose plugin
Refresh apt and install the engine, CLI, containerd, Buildx and Compose together. Current Compose ships as a Docker CLI plugin, so you run it as docker compose; there is no separate docker-compose binary to download:
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
What comes along differs by release. Ubuntu 24.04 installed 6 packages, a 102 MB download and 389 MB on disk. Debian 13 installed 18 (114 MB, 445 MB) and Debian 12 installed 19 (119 MB, 488 MB), because apt there also pulled in Git and nftables, plus Perl on Debian 12. That is harmless, and we kept the defaults rather than test a leaner install. The install enables and starts the service, and the hello-world container confirms the engine works end to end:
sudo docker run --rm hello-world
sudo docker compose version
You should see the greeting followed by the plugin version, as on our Debian 13 server. If the greeting appears but the version line does not, the Compose plugin package is missing, so rerun the install line before you go further:

Run docker compose with a space from here on. Scripts that still call docker-compose with a hyphen fail on a plugin-only install, so update them as you move them to this server. For a host where Docker’s apt repo isn’t an option, the Compose install for other Linux distros covers the manual plugin route.
Error: “failed to load listeners: no sockets found via socket activation”
On the Ubuntu VM where we replaced docker.io, the new engine refused to start, as it did in our previous run of this guide. hello-world printed “Cannot connect to the Docker daemon”, both units were failed, and the journal showed dockerd quitting because systemd handed it no socket. It retried, then systemd gave up with “Start request repeated too quickly”:
sudo journalctl -u docker --no-pager -n 60
The old docker.socket stayed up while docker.io was removed and had failed by the time the new package started the service. Our first fix this time skipped reset-failed, and systemctl restart docker failed again, because the start limit was still tripped from the install. Clear the failed state first, then reload and restart the socket before the service:
sudo systemctl reset-failed docker docker.socket
sudo systemctl daemon-reload
sudo systemctl restart docker.socket
sudo systemctl restart docker
Both units then reported active and hello-world ran. The capture has the whole sequence, from the failing daemon to the two active lines:

A clean server never hits this, and neither did the Debian 13 VM. We saw it on Ubuntu after replacing docker.io, but not when the Debian 12 VM went from docker.io back to Docker CE in the next section, so treat it as a risk of any switch rather than a certainty. If you’re migrating several hosts from docker.io, put these four commands in your script straight after the install so none of them stalls.
Install on Debian 12 without losing Docker CE
Debian 12 takes the same commands with DISTRO=debian; the suite resolves to bookworm, Docker’s repo offered the same engine and plugin versions as on Debian 13 (see the table above), and the WordPress stack below came up healthy in 46 seconds. The one trap is Debian’s own docker-compose package, which is still the Python Compose v1. Older guides tell you to install it, and on a server that already runs Docker CE it quietly swaps the engine out:

apt removed docker-ce, its CLI, containerd.io and the rootless extras, then installed Debian’s docker.io. The first time we ran it, the install pulled 40 packages, and the REMOVED list was the only hint of what was happening. Docker was still active afterwards, now on Debian’s far older engine, which makes the downgrade easy to miss until something needs a newer engine feature. If you already did this, remove Debian’s packages and put Docker’s back:
sudo apt remove -y docker-compose docker.io containerd runc
sudo apt install -y docker-ce docker-ce-cli containerd.io
Our Debian 12 VM was back on Docker CE with docker compose working and hello-world running, and the socket problem from the Ubuntu section did not appear. Scripts that call docker-compose with a hyphen are the usual reason people reach for that package; change them to docker compose instead.
Run Docker as your user and rotate logs
Typing sudo for every Compose command gets tedious, so add your account to the docker group. That group is root-equivalent, because its members can start a container that mounts the host’s root filesystem, so only add people you would give sudo to anyway:
sudo usermod -aG docker $USER
newgrp docker
While you are in system config, fix the log default too. Docker’s json-file driver doesn’t rotate by default, so a noisy container eventually fills the disk. The local driver compresses and rotates, and these limits keep at most three 10 MB files per container:
printf '{\n "log-driver": "local",\n "log-opts": {\n "max-size": "10m",\n "max-file": "3"\n }\n}\n' | sudo tee /etc/docker/daemon.json
sudo systemctl restart docker
Confirm the daemon picked it up. Containers created from now on use it, while existing ones keep their old driver until they’re recreated. Recreate an existing stack with docker compose up -d --force-recreate when you want it on the new driver:
docker info --format '{{.LoggingDriver}}'
It printed local on all three VMs. If the daemon fails to restart instead, the JSON has a typo, so run python3 -m json.tool /etc/docker/daemon.json to find the line before you try again.
Write a Docker Compose stack
A real stack shows what Compose is for better than a single nginx container, because it has three services that start in order, talk over private networks and keep data in volumes. This one runs WordPress on Apache with MariaDB and a Redis container ready for an object-cache plugin. Create a project directory. Compose uses its name as the prefix for every container, network and volume, which is why the names below start with stack:
mkdir -p ~/stack && cd ~/stack
Secrets go in a .env file next to the Compose file rather than in the YAML, so you can commit the YAML without leaking passwords. Open it:
vim ~/stack/.env
Add the database credentials, changing both passwords. Avoid # in values, because Compose can read it as the start of a comment:
MYSQL_ROOT_PASSWORD=Db_Root_Pass_2026
MYSQL_DATABASE=wordpress
MYSQL_USER=wpuser
MYSQL_PASSWORD=Wp_User_Pass_2026
WORDPRESS_DB_HOST=mariadb:3306
WORDPRESS_DB_USER=wpuser
WORDPRESS_DB_PASSWORD=Wp_User_Pass_2026
WORDPRESS_DB_NAME=wordpress
Lock the file down to your user, since it holds the root database password. Compose runs as you, so it can still read it.
chmod 600 ~/stack/.env
Now the Compose file. Current Compose looks for compose.yaml first and no longer needs a version: key:
vim ~/stack/compose.yaml
Paste the full file. It’s the exact one we ran on all three servers, so if you trim it, run the validation step below before starting anything.
services:
mariadb:
image: mariadb:11.8
restart: unless-stopped
env_file: .env
volumes:
- db_data:/var/lib/mysql
networks:
- backend
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
redis:
image: redis:8-alpine
restart: unless-stopped
command: redis-server --maxmemory 128mb --maxmemory-policy allkeys-lru
volumes:
- redis_data:/data
networks:
- backend
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
wordpress:
image: wordpress:6-apache
restart: unless-stopped
depends_on:
mariadb:
condition: service_healthy
redis:
condition: service_healthy
env_file: .env
environment:
WORDPRESS_CONFIG_EXTRA: |
define('WP_REDIS_HOST', 'redis');
define('WP_REDIS_PORT', 6379);
ports:
- "8080:80"
volumes:
- wp_data:/var/www/html
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini:ro
networks:
- frontend
- backend
deploy:
resources:
limits:
cpus: "1.0"
memory: 512M
logging:
driver: local
options:
max-size: "10m"
max-file: "3"
volumes:
db_data:
redis_data:
wp_data:
networks:
frontend:
backend:
internal: true
One trade-off in this file: env_file: .env hands every variable in .env to both containers, so MYSQL_ROOT_PASSWORD is also visible inside the WordPress container, for example in docker inspect output. For production, split it into one env file per service, or use environment: with ${VAR} references per service; we didn’t test that variant here.
Most of the file is ordinary service definitions, but four settings decide how the stack behaves when something goes wrong, and you should know what each one buys you before you copy it:
depends_onwithservice_healthy: WordPress waits for InnoDB and Redisinternal: trueonbackend: MariaDB and Redis get no route outdeploy.resources.limits: WordPress capped at one CPU and 512 MBrestart: unless-stopped: the stack returns after a reboot
The health conditions matter most on first boot, because MariaDB takes several seconds to initialise an empty data directory and WordPress would otherwise start against a database that is not listening yet. In the Compose output you can see WordPress wait in Created until both backends report Healthy, and only then start.
The file mounts a small PHP override for upload limits, so create that too. The mount path is relative to compose.yaml, so the file must sit in the same directory:
vim ~/stack/uploads.ini
Add these four settings. They raise WordPress’s upload ceiling, which defaults to 2 MB in the official image and is too small for most theme and plugin zip files.
upload_max_filesize = 64M
post_max_size = 64M
memory_limit = 256M
max_execution_time = 300
Your project directory now holds three files: .env, compose.yaml and uploads.ini. If you want a second example, the Compose on Ubuntu 26.04 guide builds a different stack on the newer LTS.
Start the stack with Docker Compose
Validate the file before you start anything. config --quiet prints nothing on success and names the line on a YAML or schema error, which is quicker than reading a half-started stack’s logs. You get config-ok when it passes.
cd ~/stack
docker compose config --quiet && echo config-ok
Start it detached. --wait makes the command block until every service with a health check reports healthy, and a failing health check shows up as a non-zero exit. WordPress has no health check in this file, so --wait only waits for it to be running, not answering.
docker compose up -d --wait
The first start pulls about 1.7 GB of images. Including those pulls and the wait for health checks, up -d --wait returned in 34 seconds on Ubuntu 24.04, 38 on Debian 13 and 46 on Debian 12. Check the result and hit the site locally, before you involve a browser or DNS:
docker compose ps
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" localhost:8080/
Both backends show (healthy), and WordPress answers with a 302 to its installer, which is what a fresh site should do. On Debian 12 the same curl run straight after up printed 000, with WordPress up for one second, so give Apache a few seconds and retry before you debug anything. Memory came in well under the limits. WordPress used 24 to 46 MB of its 512 MB cap across the three servers, measured soon after it started, so expect more once PHP workers warm up and real traffic arrives:

Do not run the installer yet if you plan to put the site behind a proxy on a domain. WordPress stores the address you install it from as its site URL, so installing on :8080 and moving to a domain later leaves redirects pointing at the old address. Do the loopback bind and proxy from the UFW section first, then install through the final URL. The Redis container does nothing for WordPress until you add an object-cache plugin, such as Redis Object Cache, and point it at the redis host that WORDPRESS_CONFIG_EXTRA already defines; we did not test the plugin in this lab.
If MariaDB stays at health: starting past the 30-second start period, read its log with docker compose logs mariadb. The MariaDB image only applies the .env passwords when it initialises an empty data directory, so editing them later changes nothing until you recreate the db_data volume. Keep a copy of .env with your backups for the same reason, since a restored volume only opens with the password it was created with. On a test box without a domain, open http://10.0.1.50:8080 in a browser, using your server’s address, to finish the WordPress installer before any loopback bind. On a server you will expose, bind and proxy first and install through the domain.
Manage the stack
Every Compose command acts on the whole stack unless you name a service, and Compose finds the project by the directory you are in, so run these from ~/stack or pass the file with -f. These are the ones you’ll use daily:
docker compose logs -f wordpress
docker compose exec redis redis-cli ping
docker compose exec wordpress php -r 'echo ini_get("upload_max_filesize"), PHP_EOL;'
docker compose down
docker compose up -d --wait
The two exec checks confirmed Redis answers and the PHP override is live, returning PONG and 64M. Running down removes the containers and networks but keeps named volumes, so the database survives. After a full down and up cycle, our three volumes were untouched:
DRIVER VOLUME NAME
local stack_db_data
local stack_redis_data
local stack_wp_data
Adding -v to down deletes those volumes and the site with them, so keep that flag for throwaway test stacks. For a longer tour of Compose subcommands, see our guide to managing containers with Docker Compose, and keep the Docker cheat sheet open for the engine commands. Before you change MariaDB’s image tag, dump the database with mariadb-dump first, so you hold a copy that does not depend on the volume.
Keep the database off the network
The internal: true flag on the backend network does more than tidy up. A container attached only to an internal network has no gateway and no external DNS, so a compromised Redis or MariaDB cannot call out. We checked it from inside each container:
docker compose exec redis wget -q -T 5 -O /dev/null http://deb.debian.org/
docker compose exec wordpress curl -s -o /dev/null -w "%{http_code}\n" --max-time 5 http://deb.debian.org/
Redis could not even resolve the name, while WordPress, which also sits on the frontend network, got a 200. That is the internal network doing its job, and all three servers gave the same pair of results:
wget: bad address 'deb.debian.org'
200
Service-to-service names still resolve inside the backend network, which is how WordPress finds mariadb:3306. Put any service that only needs to be reached by other containers on an internal network like this, and give outbound access only to the ones that fetch updates or call APIs.
Stop Docker from bypassing UFW
This is the test behind the intro, and Docker’s own install docs warn about it too. On Ubuntu 24.04 we allowed only OpenSSH and enabled UFW with its default deny-incoming policy. Allow SSH before you enable UFW on a remote server, or the enable step cuts your own session off; if your SSH daemon listens on another port, allow that port number instead of the OpenSSH profile:
sudo ufw allow OpenSSH
sudo ufw --force enable
sudo ufw status verbose
UFW reported only port 22 open. Any port missing from that table should now be unreachable from outside, and that’s exactly what the next test checks:
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip
To Action From
-- ------ ----
22/tcp (OpenSSH) ALLOW IN Anywhere
22/tcp (OpenSSH (v6)) ALLOW IN Anywhere (v6)
From a second server on the same network, with 10.0.1.50 standing in for the Ubuntu host’s address, we tried two ports. A throwaway python3 -m http.server 9000 on the host timed out with 000, so UFW was filtering. The WordPress port still answered with its 302. Docker publishes ports through its own iptables NAT and forward rules, which packets hit before UFW’s input chain:

The fix that works regardless of firewall is to bind the published port to loopback and put a reverse proxy, which UFW does govern, in front. Change the ports line in compose.yaml:
ports:
- "127.0.0.1:8080:80"
Apply it. Compose compares the file with the running containers, so MariaDB and Redis kept running while WordPress restarted with the new binding:
docker compose up -d --wait
docker compose ps wordpress --format "{{.Ports}}"
The port now listens on loopback only, so Docker’s NAT rule matches 127.0.0.1 and a packet arriving on the network interface has nothing to hit:
127.0.0.1:8080->80/tcp
A local curl on the host still got the 302, while the same request from the second server now timed out with 000, the last line of the capture above. To publish the site properly from here, you put the firewall back in charge in three steps:
- Install Nginx or Caddy on the host and proxy it to
127.0.0.1:8080. - Open 80 and 443 in UFW for the proxy with
sudo ufw allow 80,443/tcp, and nothing else. - Repeat the remote
curlon 8080 and confirm it times out.
Every other service you add to the stack gets the same treatment. If a port has no business being public, bind it to loopback in the Compose file, because UFW won’t stop it for you.
Reclaim disk space
Images pile up quietly, because every pull of a new tag leaves the old one on disk. Start by measuring, since the output tells you whether images, volumes or build cache are the problem:
docker system df
On the Debian 13 server images were almost all of it, and the RECLAIMABLE column showed only the 26 kB hello-world image that nothing used. On a fresh host pruning barely helps, but on an older one that column is the first number to check:
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 4 3 1.697GB 25.87kB (0%)
Containers 3 3 86.02kB 0B (0%)
Local Volumes 3 3 244.8MB 0B (0%)
Build Cache 0 0 0B 0B
Remove every image no container uses. Images belonging to running containers are never touched, so the stack’s three stayed. A plain docker image prune without -a reclaimed 0B here, because it only removes dangling layers, not unused tagged images:
docker image prune -a -f
It deleted the leftover hello-world image and reported Total reclaimed space: 36.94kB. On a long-running host that number is usually gigabytes. We’d run it after each round of image updates rather than on a blind cron schedule, and we’d leave docker volume prune out of any automation, because a stopped stack’s volumes look unused and that is your data.
Upgrade or remove Docker Compose
Compose updates arrive through apt like any other package, because the plugin comes from Docker’s repo. To have something to upgrade on the Debian 12 VM, we pinned the previous plugin release first, and apt list --upgradable then offered the current one. Upgrade only the plugin, without touching the engine, with:
sudo apt install -y --only-upgrade docker-compose-plugin
A routine sudo apt upgrade does the same along with everything else. If a Compose release breaks one of your stacks, hold the plugin at the version that works with sudo apt-mark hold docker-compose-plugin, and release it with apt-mark unhold once a fix ships. Removing the plugin takes away the docker compose subcommand and nothing else, which is what the end of this capture shows:

Running containers and volumes stay where they are when the plugin goes. We removed it under the running stack on Debian 12, and all three containers kept running; docker compose ps found them again as soon as the package was back. To remove Docker entirely, purge docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin, docker-compose-plugin and docker-ce-rootless-extras, then delete /var/lib/docker and /var/lib/containerd only once you’re sure no volume in there still matters. Compose’s own changes for each release are on the Compose releases page, which is worth a look before you lift a hold.
Thanks
It’s very useful.
I initially got the following error when I ran “docker version”:
“Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?”
So I ran “sudo systemctl start docker”, then ran “docker version”, and I was able to get the correct system output.