Getting Started

Choosing an Image

Choosing an image might be a little intimidating because there are so many options, but this ultimately gives you a ton of flexibility. This guide will help simplify your decision making process on choosing the right image.

Registry: Where images are located

Before diving into the different options available, let's understand where these images come from. The source code is hosted on GitHub with an automated process that builds and uploads images to container registries:

  1. Docker Hub
  2. GitHub Packages

To use these images, you need to specify a certain "tag" for the image you want. For example, the 8.4 version of the fpm-nginx variation is tagged as:

serversideup/php:8.4-fpm-nginx

This image gives you the latest stable patch version of PHP 8.4 running the fpm-nginx variation. Since no registry is specified, it defaults to Docker Hub.

When selecting an image, you'll need to decide on:

  1. PHP version
  2. PHP variation
  3. Base operating system
  4. serversideup/php version (for production environments)

All images are intelligently tagged with the PHP version and variation, allowing you to easily select the right image for your use case.

If you don't specify a variation, it defaults to cli and the latest supported Debian release for that variation.

Our most popular tags include:

⚙️ Variation🚀 Version
cliDebian Based serversideup/php:8.4-cli serversideup/php:8.3-cli serversideup/php:8.2-cli serversideup/php:8.1-cli serversideup/php:8.0-cli serversideup/php:7.4-cli
Alpine Based serversideup/php:8.4-cli-alpine serversideup/php:8.3-cli-alpine serversideup/php:8.2-cli-alpine serversideup/php:8.1-cli-alpine serversideup/php:8.0-cli-alpine serversideup/php:7.4-cli-alpine
fpmDebian Based serversideup/php:8.4-fpm serversideup/php:8.3-fpm serversideup/php:8.2-fpm serversideup/php:8.1-fpm serversideup/php:8.0-fpm serversideup/php:7.4-fpm
Alpine Based serversideup/php:8.4-fpm-alpine serversideup/php:8.3-fpm-alpine serversideup/php:8.2-fpm-alpine serversideup/php:8.1-fpm-alpine serversideup/php:8.0-fpm-alpine serversideup/php:7.4-fpm-alpine
fpm-apacheDebian Based serversideup/php:8.4-fpm-apache serversideup/php:8.3-fpm-apache serversideup/php:8.2-fpm-apache serversideup/php:8.1-fpm-apache serversideup/php:8.0-fpm-apache serversideup/php:7.4-fpm-apache
fpm-nginxDebian Based serversideup/php:8.4-fpm-nginx serversideup/php:8.3-fpm-nginx serversideup/php:8.2-fpm-nginx serversideup/php:8.1-fpm-nginx serversideup/php:8.0-fpm-nginx serversideup/php:7.4-fpm-nginx
Alpine Based serversideup/php:8.4-fpm-nginx-alpine serversideup/php:8.3-fpm-nginx-alpine serversideup/php:8.2-fpm-nginx-alpine serversideup/php:8.1-fpm-nginx-alpine serversideup/php:8.0-fpm-nginx-alpine serversideup/php:7.4-fpm-nginx-alpine
frankenphpDebian Based serversideup/php:8.4-frankenphp serversideup/php:8.3-frankenphp
Alpine Based
⚠️ Some users are experiencing known performance issues with FrankenPHP on Alpine. Consider using the Debian version.
serversideup/php:8.4-frankenphp-alpine serversideup/php:8.3-frankenphp-alpine
unit (deprecated)NGINX stopped supporting NGINX Unit and archived the project. NGINX Unit will eventually be removed from our project. Learn more →

The full tag schema

Our tagging process is quite flexible, and it can become quite complex, but don't worry -- we've spent a ton of time applying sensible defaults to give you the best experience.

The full tag schema is as follows:

{{registry-url}}/serversideup/php:{{release-prefix}}-{{php-version}}-{{variation-name}}-{{operating-system}}-v{{github-release-version}}

Here's what each part means:

OptionDefaultOther Options
{{registry-url}}
Which registry to pull images from.
''
(Docker Hub)
ghcr.io (GitHub Packages)
{{release-prefix}}
The prefix of the release.
'' (stable)beta (beta releases)
{{php-version}}
The version of PHP to use.
Latest stable PHP minor version (ie. 8.5)8.4
8.3
8.2
8.1
8.0
7.4
(you can also specify the full version number, ie. 8.4.1)
{{variation-name}}
The name of the variation to use.
clifpm
fpm-apache
fpm-nginx
frankenphp
unit (deprecated)
{{operating-system}}
The operating system to use.
debianalpine
bullseye
bookworm
trixie
{{github-release-version}}
The version of the GitHub release to use.
(latest stable release)See our GitHub Releases for specific versions.

PHP version

There are many factors to consider when choosing the right PHP version. Best practices include:

  1. Choose the latest PHP version (as your dependencies allow)
  2. Choose a PHP version that is receiving active and security support by PHP

If you need help understanding what's new in each PHP version, check out the official PHP changelog. This will give you a detailed overview of the changes and improvements in each version.

PHP variation

Choose from several variations to suit your needs. Each variation is optimized for specific use cases.

VariationDescription
cliMinimal image for running PHP from the command line only. No web server included.
fpmRuns PHP-FPM without a web server. Ideal for microservices architectures where you need a dedicated PHP backend.
fpm-apacheCombines PHP-FPM with Apache as a reverse proxy. Ideal for running WordPress with Docker.
fpm-nginxCombines PHP-FPM with NGINX as a reverse proxy. This is the traditional setup widely adopted for modern PHP applications, including Laravel.
frankenphpModern application server built on Caddy that runs everything in a single process. Ideal for Laravel/Symfony applications with worker mode support, automatic HTTPS, and HTTP/2 and HTTP/3 protocols.
unit
(deprecated)
Uses NGINX Unit as a modern application server that runs everything in a single process. Consider migrating to FrankenPHP for a modern alternative.

CLI

The CLI variation is a minimal image designed for running PHP from the command line only. It does not include a web server. Use this variation when you need a disposable and repeatable method for easily running PHP scripts from your terminal.

Learn more about the CLI variation

FPM

The FPM (Fast Process Manager) variation runs PHP-FPM without a web server. This variation is ideal for microservices architectures where you need a dedicated PHP backend.

Use this variation when you already have a separate proxy or load balancer handling static content and routing PHP requests to your FPM container. This is commonly used in larger-scale deployments.

Learn more about the FPM variation

FPM-Apache

The FPM-Apache variation combines PHP-FPM with Apache as a reverse proxy. Apache serves static content directly and forwards PHP requests to PHP-FPM for processing.

This is an excellent choice for WordPress sites and applications that specifically require Apache features or .htaccess support.

Learn more about the FPM-Apache variation

FPM-NGINX

The FPM-NGINX variation combines PHP-FPM with NGINX as a reverse proxy. This is the traditional setup that has been widely adopted for modern PHP applications, including many Laravel deployments.

NGINX serves static files efficiently and proxies PHP requests to PHP-FPM, providing excellent performance and flexibility.

Learn more about the FPM-NGINX variation

FrankenPHP

The FrankenPHP variation is a modern application server built on top of the Caddy web server. It runs everything in a single process, eliminating the complexity of managing PHP-FPM and a separate web server.

Use this variation for Laravel or Symfony applications that can benefit from worker mode, automatic HTTPS, and modern protocols like HTTP/2 and HTTP/3. This is the recommended variation for new projects seeking cutting-edge performance.

Learn more about the FrankenPHP variation

Unit (deprecated)

In October 2025, NGINX stopped supporting NGINX Unit and archived the project. NGINX Unit will eventually be removed from our project. See the official announcement →

The Unit variation uses NGINX Unit as an application server that runs everything in a single process. Since NGINX Unit is no longer maintained, consider migrating to FrankenPHP for a single-process alternative.

Operating System

Choosing an operating system comes down to a few preferences, but ultimately you need to make sure your dependencies are available for the operating system you choose.

Operating SystemDescription
debian (default)Debian is a popular Linux distribution that is known for its stability and reliability. It is the default operating system for our images.
alpineAlpine is a lightweight Linux distribution that is known for its small size and low resource usage.

Debian

Debian is a popular Linux distribution that is known for its stability and compatibility. It is the default operating system for our images.

Alpine

Alpine is a lightweight Linux distribution that is known for its small size and low resource usage. If you're an advanced user, Alpine may be an excellent choice for you.

Specific versions

Not all operating systems are available for all image variations and PHP versions. Double check Docker Hub and GitHub Packages for the most accurate list of available tags.

We also support specific versions of operating systems. So this means that you can choose versions like:

  • bookworm
  • trixie
  • alpine3.16
  • alpine3.17
  • alpine3.18
  • alpine3.19
  • alpine3.20
  • alpine3.21
  • alpine3.22