Skip to content
FossShelf
Home / Categories / For Backend Engineers

Frankenphp

PHP app server with automatic HTTPS, HTTP/3, and worker mode.

Replaces Litespeed Web Server

11.54K starsMITreviewed 31 Oct 2026last commit 14 Nov 2026
Screenshot of Frankenphp

Who it's for

PHP teams migrating from Nginx and PHP-FPM

Teams running a traditional Nginx plus PHP-FPM stack who want to reduce the number of services they operate will find FrankenPHP a direct replacement. Its classic mode serves PHP files without requiring worker-mode changes, making migration incremental. A migration guide from Nginx and PHP-FPM is available in the official docs.

Teams with complex Nginx configurations, custom modules, or mod_rewrite rules that do not map directly to Caddy will need significant migration testing before switching.

Laravel and Symfony developers optimizing throughput

Developers running Laravel or Symfony in high-traffic environments can enable worker mode through the official framework integrations. FrankenPHP's benchmarks show approximately 3.5x throughput improvement over PHP-FPM on API Platform. Both Laravel and Symfony have first-party documentation for the worker-mode setup.

Applications that rely on per-request process isolation or PHP extensions with known worker-mode incompatibilities should verify compatibility before production deployment.

Teams deploying PHP to Kubernetes or cloud-native infrastructure

FrankenPHP ships as a Docker image compatible with Kubernetes and all major cloud platforms. A single container image replaces the multi-container setups that pair Nginx with a PHP-FPM sidecar. PHP applications can also be compiled into standalone static binaries for environments where a container is too heavy.

Teams using managed PHP hosting where they cannot control the web server layer, such as shared hosting or platform-as-a-service environments with a fixed PHP stack.

Go developers embedding PHP in Go applications

FrankenPHP can be used as a Go library, allowing developers to embed the PHP interpreter directly in any Go application using the standard net/http interface. This opens a path for Go backends that need to call PHP code directly without a separate PHP-FPM process.

Teams that only need PHP as a standalone web application and do not need PHP-Go interoperability.

The problem

Running a PHP application in production means operating multiple independent components: a web server such as Nginx or Apache, PHP-FPM and its process pools, a process manager, and a separate HTTPS renewal daemon. Each component has its own configuration, restart behavior, and failure mode. When one misbehaves, diagnosing the interaction between them takes time. PHP's request-per-process model adds overhead at scale. Every request bootstraps the full framework, including autoloading, dependency injection container setup, and configuration parsing. At high traffic, that startup cost accumulates and becomes a significant fraction of total response time. Partial mitigations such as opcode caching and preloading help, but they do not eliminate framework initialization overhead.

How it works

Worker Mode for Persistent Application State

FrankenPHP's worker mode boots the PHP application once and keeps it in memory, ready to handle incoming requests in milliseconds. According to FrankenPHP's benchmarks, this delivers approximately 3.5x more throughput than standard PHP-FPM on API Platform applications. Symfony, API Platform, and Laravel all have official worker-mode integrations.

Automatic HTTPS with HTTP/2 and HTTP/3 Support

FrankenPHP automatically generates and renews TLS certificates via Let's Encrypt or ZeroSSL without any additional configuration. It natively supports HTTP/1.1, HTTP/2, and HTTP/3 (QUIC), serving traffic over all three protocol versions from the same binary.

103 Early Hints for Faster Page Load

FrankenPHP is the only PHP SAPI with native support for the 103 Early Hints HTTP status code, according to its own documentation. Early Hints allow the browser to start loading linked resources before the server finishes generating the full response. FrankenPHP's website states this can improve page load times by up to 30%.

Built-in Mercure Hub for Real-Time Events

FrankenPHP ships with a built-in Mercure hub that lets PHP applications push events to connected browsers without a separate WebSocket server. Connected browsers receive the payload as a JavaScript event the moment the PHP application sends it.

Single Binary with Cloud-Native Docker Images

FrankenPHP ships as a statically linked binary for Linux, a self-contained binary for macOS, and Windows archives. It is also available as a Docker image compatible with Kubernetes and all modern cloud platforms. PHP applications can be compiled into standalone, self-executable static binaries with no runtime dependency on a separate PHP installation.

Built-in Prometheus Metrics and Structured Logging

FrankenPHP exposes Prometheus-compatible metrics and supports distributed tracing without any additional plugin or sidecar. Its structured logging formats log output for machine-readable ingestion, with no external tooling required.

Features

  • Worker Mode for Persistent Application State
  • Automatic HTTPS with HTTP/2 and HTTP/3 Support
  • 103 Early Hints for Faster Page Load
  • Built-in Mercure Hub for Real-Time Events
  • Single Binary with Cloud-Native Docker Images
  • Built-in Prometheus Metrics and Structured Logging

How to install

Install FrankenPHP with the official install script on Linux or macOS, or deploy it via Docker.

curl https://frankenphp.dev/install.sh | sh

On Windows PowerShell:

irm https://frankenphp.dev/install.ps1 | iex

Via Docker:

docker run -v .:/app/public -p 80:80 -p 443:443 -p 443:443/udp dunglas/frankenphp

Recommended for this setup

Strengths

  • Replaces the Entire Nginx and PHP-FPM Stack: FrankenPHP acts as its own PHP SAPI and bundles everything the traditional Nginx plus PHP-FPM stack provides: HTTP serving, TLS, compression, and PHP execution. Running one binary or one Docker container replaces what previously required multiple coordinated services. The README notes it does not need PHP-FPM and relies instead on its own SAPI built specifically for Go web servers.
  • MIT License with No Per-Server Fees: FrankenPHP is released under the MIT license, meaning it can be run on any number of servers, in any commercial context, without licensing costs. Unlike LiteSpeed Web Server, which requires a paid commercial license for production use, FrankenPHP's entire feature set is available at no cost.
  • Official Framework Integrations: Symfony, API Platform, and Laravel all officially support FrankenPHP's worker mode. Worker-mode performance benefits are available through documented, supported paths rather than custom patches. The README names these three frameworks explicitly as having official integrations.
  • Active Development Since 2022: Created in March 2022, FrankenPHP has accumulated 11,502 GitHub stars and 507 forks. The repository received its most recent commit on October 30, 2026, reflecting continuous active development. Official integrations with three major PHP frameworks confirm ongoing investment in the project's ecosystem.

Trade-offs

  • Worker Mode Requires Application Compatibility Checks: Worker mode requires that applications handle state safely between requests, since the process stays in memory rather than restarting. Applications that rely on global mutable state, per-request file includes, or certain PHP extensions that assume a fresh process may need modifications before they work correctly in worker mode. FrankenPHP's documentation includes a known issues page that lists compatibility considerations.
  • Own SAPI Is Not a Drop-in for All PHP Stacks: FrankenPHP replaces PHP-FPM with its own SAPI implementation. While most PHP extensions and popular frameworks work correctly, setups that depend on PHP-FPM-specific behaviors or uncommon SAPI features may require testing before migration.
  • Caddy Configuration Required for Advanced Setups: FrankenPHP inherits Caddy's configuration model, which differs from Nginx and Apache. Teams familiar with traditional PHP hosting setups will need to learn Caddyfile syntax or the JSON API for anything beyond the basic three-line configuration. The migration guide covers common Nginx and PHP-FPM configurations, but complex setups require reviewing Caddy's documentation as well.

Tech stack

Languages
Go, C, Hack, Shell, Dockerfile, Go Template, HCL, PHP, PowerShell
Frameworks
—
Databases
—
Tooling
—

FAQ

Does FrankenPHP replace PHP-FPM?

Yes. FrankenPHP implements its own PHP SAPI designed specifically for Go web servers, so it does not require PHP-FPM at all. The binary handles PHP execution, HTTP serving, and TLS together in a single process.

Can FrankenPHP run existing Laravel or Symfony applications without changes?

FrankenPHP's classic mode serves PHP files the way traditional servers do, so most existing applications run without modification. Enabling worker mode for the performance benefits does require following the framework's worker-mode integration guide, and applications that rely on global mutable state between requests may need adjustments.

How do I run FrankenPHP with Docker?

Run `docker run -v .:/app/public -p 80:80 -p 443:443 -p 443:443/udp dunglas/frankenphp`, mounting your PHP application's public directory to `/app/public`. The container handles HTTP serving, automatic HTTPS certificate provisioning, and PHP execution without any additional configuration. Go to `https://localhost` after the container starts.

What is 103 Early Hints and why does it matter?

103 Early Hints is an HTTP status code that lets the server tell the browser which resources to start loading before the full response is ready. FrankenPHP is the only PHP SAPI that supports it natively, according to its documentation. FrankenPHP's website cites a potential page load time improvement of up to 30% for applications that use it.

Is FrankenPHP production-ready?

FrankenPHP is in active production use and is officially supported by Symfony, API Platform, and Laravel. The GitHub repository had 11,502 stars and its most recent commit was October 30, 2026. The project lists known issues in its documentation that users should review for their specific setup before deploying to production.

Similar tools

More in Backend Engineers