Multithreaded PHP application server for cloud-native infrastructure

One process instead of nginx and PHP-FPM. TLS, Brotli, rate limiting, Prometheus metrics, OpenTelemetry tracing and a per-request profiler are built in, all configured with environment variables. OxPHP works with legacy codebases and modern frameworks alike and is made for Docker and Kubernetes.

v0.13.0evaluation preview
QUICK START

Two lines in a Dockerfile

Copy your application into the image and run it. TLS, compression, rate limiting, metrics, health checks and structured logs are configured with environment variables.

Full Quick Start guide →
Dockerfile
FROM ghcr.io/oxphp/oxphp:0.13.0 COPY --chown=www-data:www-data . /var/www/html/public
$ docker build -t my-app . && docker run -p 80:80 my-app
FEATURES

One process replaces the stack

All features →
01

Persistent PHP workers stay alive across requests, so autoloaders, containers and DB connections initialize once.

02

Each worker handles multiple concurrent requests via PHP 8.4 Fibers; sleeps and awaits yield instead of blocking.

03

Dispatch closures to a dedicated thread pool with all, race and any combinators for true parallel execution.

04

Counters, atomics, channels, maps and pools shared across workers, with microsecond operations instead of Redis round-trips.

05

Prometheus metrics, OpenTelemetry traces and APM auto-instrumentation of PDO, cURL and Redis, with no code changes.

06

Per-request profiles in xhprof, speedscope, pprof and FlameGraph formats, triggered by header, cookie or sampling.

WHY OXPHP

Compared to the alternatives

nginx+FPM
FrankenPHP
RoadRunner
OxPHP
Supported PHP versions
all
8.2+
8.1+
8.4 and 8.5
Language
C
Go + C
Go
Rust + C
TLS 1.3
✓
✓
✓
✓ (rustls)
Persistent worker state
—
✓
✓
✓
Backpressure / HTTP 529
manual
—
—
built-in
Prometheus metrics
plugin
built-in (Caddy admin)
built-in plugin
built-in
Structured JSON logs
via log_format
✓
✓
built-in
WebSocket server
✓ (proxies)
✓ (proxies)
✓ (centrifuge plugin)
—
Reverse proxy / upstream
✓ (full-featured)
✓ (Caddy)
—
—
Native install (non-Docker)
apt/yum/brew/port
brew, static binary
brew, binary
—
Platforms (runtime)
Linux/BSD/Mac
Linux/Mac/Win
Linux/Mac/Win
Linux only (glibc/musl)
License
BSD-2 / PHP License
MIT
MIT
AGPL-3.0
Age / production track record
20+ years
3+ years
7+ years
<1 year

OxPHP is under active development and not yet production-ready, but it is ready for evaluation, staging and early adopters. The full comparison is in the docs.