These Angie and NGINX Docker images run the same web server builds that deb.myguard.nl publishes as Debian and Ubuntu packages: HTTP/3, ModSecurity with the OWASP Core Rule Set, Brotli, Zstd and over 100 dynamic modules, with PHP-FPM if you want it. They are rebuilt every day. You pull an image, start it with docker compose up -d, and you run the binaries this site runs on.

This page is for anyone who hosts websites or PHP applications in containers and wants a hardened web server without having to write their own Dockerfile. It covers which image tag to pull, how to start it, how the container divides its work between three Linux users and how to enable HTTP/3. No previous experience with containers needed. For the other images (MariaDB, Valkey, the mail stack) see the Docker images overview.

What these images actually are

Most public NGINX or Angie images ship the plain upstream binary with upstream defaults. These images install the angie-full or nginx-full package from the deb.myguard.nl APT repository with the same patches, dynamic modules and OpenSSL build. This is the same thing apt install gives you on a Debian or Ubuntu server using this repository.

It comes with HTTP/3, QUIC, kTLS, ModSecurity v3 with OWASP Core Rule Set, Brotli and Zstd compression. These images are rebuilt every day, so you get package and security updates without having to do anything.

Which Angie and NGINX Docker images to pull

All tags follow the same pattern. A tag without a prefix is built on Ubuntu 26.04 (resolute), the same tag with a deb- prefix is built on Debian 13 (trixie). The latest tag contains no PHP, and php8.5 and its siblings contain one version of PHP-FPM. The multi tag contains all supported versions of PHP-FPM in one image.

PHP 5.6, 7.4, 8.0, 8.2, 8.4, 8.5 and 8.6 are available. The tags below are built for amd64 and arm64, so you can use the same tag on an x86 server and on an ARM machine. Older PHP 8.3, 8.1 and 7.2 tags are still listed on Docker Hub, but they are no longer rebuilt and are amd64 only. The examples use the Debian tags; remove deb- to get the Ubuntu tags.

eilandert/nginx:deb-latest    # NGINX, no PHP — for static / reverse-proxy
eilandert/nginx:deb-php8.6    # NGINX + PHP-FPM 8.6
eilandert/nginx:deb-php8.5    # NGINX + PHP-FPM 8.5
eilandert/nginx:deb-php8.4
eilandert/nginx:deb-php8.2
eilandert/nginx:deb-php8.0
eilandert/nginx:deb-php7.4
eilandert/nginx:deb-php5.6    # yes, still here for the truly stuck
eilandert/nginx:deb-multi     # 5.6 / 7.4 / 8.0 / 8.2 / 8.4 / 8.5 / 8.6 in one image

eilandert/angie:deb-latest    # Angie — drop-in replacement for NGINX
eilandert/angie:deb-php8.5
eilandert/angie:deb-multi

eilandert/php-fpm:deb-8.5     # PHP-FPM only (use behind your own proxy)
eilandert/php-fpm:deb-multi
eilandert/apache-phpfpm:deb-8.5   # Apache + PHP-FPM if you must
eilandert/angie-cms:latest        # Angie + PHP 8.5 + the entire CMS toolbox

All images with PHP contain Composer, WP-CLI, nullmailer, jemalloc and mimalloc. PHP packages are fetched from Ondřej Surý’s PHP archive, which is mirrored on deb.myguard.nl to avoid build failures when Launchpad is unavailable.

A five-minute docker-compose example

Mount the config directories to empty local paths. On first start the container copies the package defaults into them, so you get a working configuration without hunting for sample files. If /etc/angie already contains an angie.conf, the container keeps your configuration.

services:
  angie:
    container_name: angie
    image: eilandert/angie:deb-php8.5
    stop_grace_period: 3s
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"     # UDP for HTTP/3 QUIC
    restart: always
    volumes:
      - /etc/letsencrypt:/etc/letsencrypt:rw
      - ./angie/config:/etc/angie:rw
      - ./angie/php:/etc/php:rw
      - ./angie/log:/var/log/angie:rw
      - ./angie/modsecurity:/etc/modsecurity:rw
      - ./angie/nullmailer:/etc/nullmailer:rw
      - ./cache/angie:/var/cache/angie:rw
      - ./sites:/var/www:rw
    environment:
      - MALLOC=jemalloc
      - TZ=Europe/Amsterdam
      - PHP85=YES          # for :deb-multi only
      - NGX_MODULES=mod-http-modsecurity,mod-http-brotli,mod-http-headers-more-filter,mod-http-zstd

Run docker compose up -d and you have Angie with HTTP/3, ModSecurity, Brotli and Zstd. Before Angie starts, the container runs angie -t. A broken configuration stops the container with the exact error, instead of a silent restart loop. A loopback-only healthcheck on port 8181 checks that the server answers, and on PHP images that PHP-FPM answers a real request, so docker ps shows when the site is ready, not only when the container started.

Daily, the container rotates its TLS session-ticket key and reloads Angie, also picking up renewed Let’s Encrypt certificates. It tests the configuration before reloading and skips the reload if the test fails, so a typo in a mounted file won’t take down the running server. The compose file in the GitHub repository drops all Linux capabilities except those needed by the master process. See the Docker hardening guide.

Meet the users: phpfpm, www-data, and agent

This section deserves a slow read. Many WordPress hacks go further than they need to because the web server and PHP both run as www-data. The images with PHP divide the work between three Linux accounts, each with one job.

  • www-data: the web server. Angie, NGINX or Apache workers run as this user. It reads your site’s files and talks to the PHP-FPM socket, and nothing more.
  • phpfpm (uid 1500): the PHP workers. Your code runs here. phpfpm has no login shell and is not a member of the www-data group. If a plugin is exploited, the attacker is stuck as phpfpm, with no group membership that leads anywhere dangerous. This public pool also runs with a disable_functions list, open_basedir and Snuffleupagus rules.
  • agent (uid 1501): the operator account. It has a bash shell, a home directory, the supplementary groups www-data and sudo, and a passwordless entry in /etc/sudoers.d/10-agent. A human operator, or a maintenance agent, uses it through docker exec. A second PHP-FPM pool runs as agent on its own socket for trusted tasks such as WP-CLI; the phpfpm workers cannot reach that socket.

The sudo binary itself is locked down: mode 4750, owned root:sudo. Only root and members of the sudo group can execute it. The web server (www-data) and the PHP workers (phpfpm) are not in the sudo group, so for them sudo cannot run at all.

Only agent is in that group, and only agent has a sudoers entry. That is defence in depth: the file permission and the sudoers rule both have to allow it, and they only agree for agent.

Diagram of the three Linux users in the Angie and NGINX images with PHP. www-data runs the web server workers, can read the site in /var/www and connect to the PHP-FPM sockets. phpfpm, uid 1500, runs the public PHP-FPM pool, owns and can write the site, has no login shell, is not in the www-data group and is limited by disable_functions, open_basedir and Snuffleupagus. agent, uid 1501, is the operator account used through docker exec, with groups www-data and sudo, passwordless sudo and its own PHP-FPM pool for WP-CLI. The sudo binary, mode 4750 owned root:sudo, is blocked for www-data and phpfpm and allowed for agent.
Who can do what in the images with PHP, checked against the Dockerfiles in November 2026.

The /home/agent/.ssh directory is pre-created with mode 0700 and owner agent:agent, so keys you place there for outbound Git or rsync cannot end up world-readable by accident.

The CMS image: angie-cms

The eilandert/angie-cms:latest image is Angie with PHP-FPM 8.5 plus a complete toolbox for WordPress, Drupal and similar sites in one container. The CMS image article covers it in more depth. As of November 2026, the published image stops at start-up with its default settings because its Angie config test fails. The article shows the error and how to open a maintenance shell anyway.

Its daily build has also failed since 21 November 2026, so latest still holds the image built that day.

On top of the Angie and PHP-FPM 8.5 base it adds:

  • WP-CLI with doctor-command pre-installed, a useful WordPress diagnostic tool that few people know about.
  • Drush for Drupal sites: installed via Composer to /opt/drush and added to $PATH.
  • Composer with COMPOSER_HOME pointing at /var/www/.composer.
  • Image optimisation tools: jpegoptim, optipng, pngquant, gifsicle, webp, plus libvips42 and php-vips for fast image processing.
  • ImageMagick with a hardened policy that disables the coders with a history of exploits (PS, EPS, PDF, XPS, MSL, URL: the ImageTragick family). Resource caps stop an oversized upload from exhausting memory.
  • Backup tooling: a built-in cms-backup script that saves the database, wp-content and a sanitised wp-config.php (secrets stripped) under /var/www/_backups/. restic and rclone handle off-site copies.
  • wp-cron via a real cron daemon: every minute, each /var/www/*/ document root with a wp-config.php gets its due events run as phpfpm.
  • Admin shell tools: git, patch, mariadb-client, rsync, openssh-client, goaccess for log reports, jq, mc, nano, less.
  • PHP tuned for CMS workloads: memory_limit=512M, upload_max_filesize=64M, opcache.jit=tracing and a large realpath cache.
  • Angie tuned for CMS workloads: client_max_body_size 64m, fastcgi_read_timeout 300s, gzip on, server tokens off. Ready-made WordPress and Drupal site snippets ship at /etc/angie/snippets/wordpress.conf and drupal.conf.

One more detail: at start-up the container writes /root/.my.cnf from your $DB_HOST, $DB_USER and $DB_PASS environment variables. When you run docker exec -it cms bash and type mysql, you are connected without typing credentials.

Selecting modules at runtime

Set the NGX_MODULES environment variable to a comma-separated list. No custom Dockerfile, no rebuild when you forgot Brotli. All modules from the Angie and NGINX module pages are available: more than 100 modules (113 Angie and 114 NGINX module packages at the time of writing):

NGX_MODULES=mod-http-modsecurity,mod-http-geoip2,mod-http-brotli,mod-http-zstd,mod-http-lua,mod-http-headers-more-filter

If you don’t set NGX_MODULES, every module except the three Lua modules loads at boot (see the FAQ below). That’s fine for testing, but on a production server you should only load what you use, as each module costs memory and start-up time.

HTTP/3, QUIC, and the small luxuries

Publish UDP port 443 in your compose file and HTTP/3 works. The OpenSSL build in the image supports QUIC and the server is compiled with HTTP/3, so a few lines in the server block are enough to enable it and advertise it through Alt-Svc:

server {
    listen 443 ssl;
    listen 443 quic reuseport;
    http3 on;
    add_header Alt-Svc 'h3=":443"; ma=86400';
}

Build speed: BuildKit cache mounts everywhere

This matters only if you build the images yourself. Every Dockerfile starts with # syntax=docker/dockerfile:1.7 and uses --mount=type=cache for the apt archive and list caches. Once the cache is warm, a rebuild skips downloading packages again, which makes the apt step much faster when you change a Dockerfile and rebuild repeatedly.

FAQ

Why a separate phpfpm user instead of just using www-data?

Because the web server and the PHP code face different risks. The web server handles HTTP, which is a narrow job. PHP runs whatever code is installed, including a plugin someone added in a hurry.

Separate Linux accounts mean a remote code execution bug in a plugin does not inherit the web server’s access. It is the same reason you do not run your database as root.

Can I still bind-mount my site files and have permissions work?

Yes. /var/www is pre-created as phpfpm:www-data with mode 2750. The setgid bit means every file created there inherits the www-data group, so static assets stay readable by Angie. If you mount from the host, run chown -R 1500:33 ./sites on the host before mounting (uid 1500 is phpfpm, gid 33 is www-data on Debian and Ubuntu).

What happens if I don’t set NGX_MODULES?

Every module loads, except three: mod-http-lua, mod-http-lua-upstream and mod-stream-lua are switched off because they need extra configuration to start cleanly. The container prints a warning that asks you to set NGX_MODULES. To keep all modules, the Lua ones included, and silence the warning, run touch /etc/angie/modules-enabled/.quiet.

How do I update? Do I have to rebuild?

Run docker pull eilandert/angie:deb-php8.5 and then docker compose up -d. The images are rebuilt daily with the latest packages and security fixes, so you never rebuild anything yourself. Tools such as Watchtower or Diun can watch the registry and do this for you.

Where do logs go?

Angie writes its access and error logs to /var/log/angie (NGINX to /var/log/nginx), which is why the compose example mounts that directory. PHP errors and PHP-FPM slowlog go to stderr (via catch_workers_output=yes and slowlog=/proc/self/fd/2), so docker logs shows slow or failing PHP requests in real time without entering the container.

Is it safe to give the agent user passwordless sudo?

Inside the container, yes, by design. The container’s exposure is the network and your code, not the operator who can already run docker exec. What matters is that the sudo path stays out of reach of PHP and the web server. The binary is owned root:sudo with mode 4750, so neither www-data nor phpfpm can execute it, and only agent has a sudoers entry.

Further reading