Getting Started

Choosing an image

Every tag answers three questions: which PHP, which web server, and which operating system. serversideup/php:8.5-fpm-nginx is PHP 8.5 with NGINX on Debian. Answer the three below, and you have your tag.

Pick the variation that matches how you serve PHP

If you wantUseLearn more
NGINX and PHP-FPM in one container. A common choice for Laravel.fpm-nginxfpm-nginx
One process serving PHP through Caddy, with worker mode, HTTP/2, and HTTP/3.frankenphpfrankenphp
Apache with .htaccess support in front of PHP-FPM, such as for WordPress.fpm-apachefpm-apache
PHP-FPM on port 9000, behind a web server or load balancer you run yourself.fpmfpm
PHP without a server, for scripts, Composer, queue workers, and CI.clicli

A tag that names no variation gets cli. Every variation runs as www-data and takes its settings from environment variables.

The unit variation was removed in v4.1.0 (November 21, 2025) after NGINX archived NGINX Unit. See Unit to move off it.

Use the newest PHP your app supports

Pick the newest PHP version your dependencies support that php.net still supports. The PHP changelog lists what changed in each release.

New PHP patches don't wait on us. We check php.net every hour, and a new patch starts a build right away. The images publish once that build passes its tests.

PHP 8.1 is end of life upstream. We still build it for operating system fixes, but PHP itself gets none. PHP 7.4 and 8.0 are no longer built at all. Their tags still pull, frozen with no updates. See EOL versions and the legacy-modernization path.

Pick Debian or Alpine

Both get the same PHP, the same defaults, and the same release schedule. Choose the one that fits your app.

DebianAlpine
Download size of 8.5-fpm-nginx
C libraryglibcmusl
VariationsAll fiveAll but fpm-apache
Tags-debian (Trixie), -trixie, -bookworm-alpine (newest), -alpine3.22, -alpine3.23, -alpine3.24

Alpine images are much smaller. They pull faster, start new servers sooner, and take less disk on every host. Alpine also ships fewer packages, which leaves less for a vulnerability scanner to flag.

Debian uses glibc, which most prebuilt binaries and PHP extensions expect. Something that works on your laptop or in a typical CI runner is more likely to work unchanged. That's why a tag with no OS gets Debian Trixie.

Before you pick Alpine, check that every extension and package your app needs builds against musl. FrankenPHP has known performance issues on Alpine upstream. -alpine gets the newest Alpine for that PHP version: Alpine 3.24, or Alpine 3.22 for PHP 8.1.

Whichever you choose, stay on a release that still gets security updates. When a release reaches end of life, we stop building it and its tags freeze, as Debian Bullseye and Alpine 3.16 did. Check the Debian and Alpine lifecycles.

Every combination we build

Every image runs on amd64 and arm64, from Docker Hub or GitHub Packages. This matrix shows which PHP versions each variation is built for on each operating system:

Variationbookwormtrixiealpine3.22alpine3.23alpine3.24
cli, fpm, fpm-nginx8.1 to 8.68.1 to 8.68.18.2 to 8.68.2 to 8.6
fpm-apache8.1 to 8.68.1 to 8.6❌❌❌
frankenphp8.3 to 8.68.3 to 8.6❌8.3 to 8.68.3 to 8.6

Every tag reads the same way

{{registry}}/serversideup/php:{{prefix}}-{{php-version}}-{{variation}}-{{os}}-{{release}}

Every part is optional except the repository.

PartDefaultOther values
{{registry}}Docker Hubghcr.io for GitHub Packages
{{prefix}}none (stable)beta
{{php-version}}newest stable minor8.4, 8.1, a major such as 8, or a patch such as 8.4.27
{{variation}}clifpm, fpm-nginx, fpm-apache, frankenphp
{{os}}debian (Trixie)bookworm, trixie, alpine, alpine3.22, alpine3.23, alpine3.24
{{release}}none (floating tag)a GitHub release such as v5.0.5

Floating tags stay patched, pinned tags never change

A tag without a release, such as 8.5-fpm-nginx, floats. We rebuild it with every PHP patch and each week with operating system security fixes.

A tag with a release, such as 8.5-fpm-nginx-v5.0.5, is pinned. It never changes. The upgrade guide explains when to use each.