The modern PHP app server
Find a file
2026-06-10 14:20:25 +07:00
.github fix(release): pass GITHUB_TOKEN to the Homebrew bump step (#2466) 2026-06-04 08:28:59 +02:00
caddy chore: update php-server max_header to 16kb to match caddy (#2475) 2026-06-10 14:20:25 +07:00
docs docs: add security model documentation 2026-06-03 22:53:09 +02:00
internal refactor: drop space-to-underscore replacement in header names (#2441) 2026-05-26 11:26:51 +02:00
package Force reload in frankenphp service configuration (#2281) 2026-03-23 19:30:39 +07:00
profiles chore: prepare release 1.12.4 [skip ci] 2026-06-03 22:23:21 +00:00
testdata fix: clear in_save_handler state that blocks the subsequent close handler (#2443) 2026-05-27 07:31:17 +07:00
watcher chore: prepare release 1.12.4 [skip ci] 2026-06-03 22:23:21 +00:00
.clang-format-ignore feat: mercure_publish() PHP function to dispatch Mercure updates (#1927) 2025-11-18 09:59:53 +01:00
.codespellrc ci: disable codespell linter (#2153) 2026-01-29 17:23:50 +01:00
.dockerignore ci: include version in BuildInfo and Prometheus metrics (#1418) 2025-03-19 13:27:28 +01:00
.editorconfig docs: revise bug report template for improved instructions (#2181) 2026-03-09 15:55:51 +01:00
.gitattributes feat: Windows support (#2119) 2026-02-26 12:38:14 +01:00
.gitignore ci: move release flow into a GitHub Actions workflow (#2417) 2026-05-15 11:50:14 +02:00
.gitleaksignore docs: add SEO frontmatter, llms.txt, and code-block hygiene (#2394) 2026-05-06 17:24:49 +02:00
.golangci.yaml ci: minor cleanup (#1619) 2025-05-31 08:01:38 +02:00
.hadolint.yaml ci: add Super-Linter (#323) 2023-12-01 17:26:21 +01:00
.markdown-lint.yaml docs: add SEO frontmatter, llms.txt, and code-block hygiene (#2394) 2026-05-06 17:24:49 +02:00
alpine.Dockerfile build: make UPX packing opt-in via COMPRESS env var (#2429) 2026-05-16 18:03:24 +02:00
app.tar feat: use tar to embed apps (#333) 2023-12-03 19:17:36 +01:00
app_checksum.txt fix: do not extract embedded app on every execution (#488) 2024-01-21 18:13:08 +01:00
build-static.sh build: make UPX packing opt-in via COMPRESS env var (#2429) 2026-05-16 18:03:24 +02:00
cgi.go Merge commit from fork 2026-05-15 12:55:46 +02:00
cgi_test.go Merge commit from fork 2026-05-15 12:55:46 +02:00
cgo.go feat: Windows support (#2119) 2026-02-26 12:38:14 +01:00
cli.go feat: Windows support (#2119) 2026-02-26 12:38:14 +01:00
cli_test.go feat: Windows support (#2119) 2026-02-26 12:38:14 +01:00
context.go docs: warn about underscore header spoofing in NewRequestWithContext (#2460) 2026-06-03 22:49:31 +02:00
CONTRIBUTING.md docs: improve worker docs, and add internals docs (#2334) 2026-05-04 00:55:15 +02:00
debugstate.go feat: add more metrics to the Prometheus endpoint 2026-03-26 11:37:24 +01:00
dev-alpine.Dockerfile chore: bump to Go 1.26 (#2178) 2026-02-11 14:55:57 +01:00
dev.Dockerfile chore: bump to Go 1.26 (#2178) 2026-02-11 14:55:57 +01:00
docker-bake.hcl chore: bump to Go 1.26 (#2178) 2026-02-11 14:55:57 +01:00
Dockerfile build(docker): make e-dant/watcher install robust (#2432) 2026-05-16 17:01:35 +02:00
embed.go feat: allow to customize EmbeddedAppPath 2026-02-18 16:30:18 +01:00
env.go refactor: cleaner cgi string handling 2026-03-04 17:20:24 +01:00
ext.go feat: Windows support (#2119) 2026-02-26 12:38:14 +01:00
frankenphp.c reset headers_sent flags on embed sapi startup 2026-06-03 22:56:31 +02:00
frankenphp.go feat: Add configurable max_requests for PHP threads (#2292) 2026-04-16 14:15:56 +02:00
frankenphp.h feat: cross-platform force-kill primitive for stuck PHP threads (#2365) 2026-05-04 16:38:32 +02:00
frankenphp.ico feat: Windows support (#2119) 2026-02-26 12:38:14 +01:00
frankenphp.png docs: optimize PNG images losslessly: 2 → 1.3 MiB (−36%) (#1623) 2025-06-01 21:47:08 +02:00
frankenphp.stub.php feat: add support for structured logging with the frankenphp_log() PHP function (#1979) 2025-12-15 16:10:35 +01:00
frankenphp_arginfo.h feat: add support for structured logging with the frankenphp_log() PHP function (#1979) 2025-12-15 16:10:35 +01:00
frankenphp_test.go docs: warn about underscore header spoofing in NewRequestWithContext (#2460) 2026-06-03 22:49:31 +02:00
go.mod chore: update Go dependencies (#2462) 2026-06-03 23:04:54 +02:00
go.sh fix(ci): Docker builds 2025-07-17 10:14:18 +02:00
go.sum chore: update Go dependencies (#2462) 2026-06-03 23:04:54 +02:00
hotreload.go feat: hot reload (#2031) 2025-12-12 14:29:18 +01:00
install.ps1 ci: fix Windows asset upload (#2245) 2026-03-07 19:44:08 +01:00
install.sh ci: fix Windows asset upload (#2245) 2026-03-07 19:44:08 +01:00
LICENSE docs: add license (#24) 2022-10-15 11:21:21 +02:00
llms.txt docs: add security model documentation 2026-06-03 22:53:09 +02:00
log_test.go feat: add support for structured logging with the frankenphp_log() PHP function (#1979) 2025-12-15 16:10:35 +01:00
maxrequests_regular_test.go feat: Add configurable max_requests for PHP threads (#2292) 2026-04-16 14:15:56 +02:00
mercure-skip.go feat: hot reload (#2031) 2025-12-12 14:29:18 +01:00
mercure.go feat: Windows support (#2119) 2026-02-26 12:38:14 +01:00
mercure_test.go fix: crash when a string is passed for the topics parameter of the mercure_publish() function (#2021) 2025-11-23 17:03:43 +01:00
metrics.go remove metrics shutdown assignments 2026-06-03 23:00:28 +02:00
metrics_test.go fix(metrics): replace mutex with read-write mutex (#2450) 2026-05-31 11:28:37 +02:00
options.go feat: Add configurable max_requests for PHP threads (#2292) 2026-04-16 14:15:56 +02:00
phpmainthread.go feat: cross-platform force-kill primitive for stuck PHP threads (#2365) 2026-05-04 16:38:32 +02:00
phpmainthread_test.go test: wait for transition goroutines to exit 2026-05-19 10:11:14 +02:00
phpthread.go feat: cross-platform force-kill primitive for stuck PHP threads (#2365) 2026-05-04 16:38:32 +02:00
README.md docs: Add WoltLab Suite Example 2026-05-16 12:00:34 +02:00
recorder_test.go chore: modernize Go code 2025-08-15 00:22:44 +02:00
release.sh ci: harden release workflow inputs and tag detection (#2430) 2026-06-03 22:58:01 +02:00
reload_test.sh ci: upgrade to super-linter 6 (#952) 2024-08-04 14:05:54 +02:00
requestoptions.go perf: various optimizations (#2175) 2026-02-11 15:21:55 +01:00
requestoptions_test.go fix: race condition introduced in 04fdc0c (#2180) 2026-02-11 13:07:09 +01:00
scaling.go fix: race condition in auto-scaler during Caddy config reload (#2318) 2026-03-28 15:30:12 +01:00
scaling_test.go fix: race condition in auto-scaler during Caddy config reload (#2318) 2026-03-28 15:30:12 +01:00
SECURITY.md docs: add security model documentation 2026-06-03 22:53:09 +02:00
static-builder-gnu.Dockerfile build: make UPX packing opt-in via COMPRESS env var (#2429) 2026-05-16 18:03:24 +02:00
static-builder-musl.Dockerfile build: make UPX packing opt-in via COMPRESS env var (#2429) 2026-05-16 18:03:24 +02:00
threadinactive.go refactor: add drain() seam to threadHandler interface (#2367) 2026-05-04 15:08:14 +02:00
threadregular.go refactor: add drain() seam to threadHandler interface (#2367) 2026-05-04 15:08:14 +02:00
threadtasks_test.go refactor: add drain() seam to threadHandler interface (#2367) 2026-05-04 15:08:14 +02:00
threadworker.go refactor: add drain() seam to threadHandler interface (#2367) 2026-05-04 15:08:14 +02:00
types.c perf: move sandboxed environment to the C side (#2058) 2026-02-26 22:34:54 +01:00
types.go feat: Windows support (#2119) 2026-02-26 12:38:14 +01:00
types.h perf: move sandboxed environment to the C side (#2058) 2026-02-26 22:34:54 +01:00
types_test.go feat: add support for structured logging with the frankenphp_log() PHP function (#1979) 2025-12-15 16:10:35 +01:00
vcpkg.json feat: Windows support (#2119) 2026-02-26 12:38:14 +01:00
watcher-skip.go feat: hot reload (#2031) 2025-12-12 14:29:18 +01:00
watcher.go fix: prevent segfault on early shutdown. (#2120) 2026-01-10 21:40:54 +01:00
watcher_test.go feat: Windows support (#2119) 2026-02-26 12:38:14 +01:00
worker.go feat: cross-platform force-kill primitive for stuck PHP threads (#2365) 2026-05-04 16:38:32 +02:00
worker_internal_test.go feat: cross-platform force-kill primitive for stuck PHP threads (#2365) 2026-05-04 16:38:32 +02:00
worker_test.go feat: Add configurable max_requests for PHP threads (#2292) 2026-04-16 14:15:56 +02:00
workerextension.go refactor: rely on context.Context for log/slog and others (#1969) 2025-11-17 16:32:23 +01:00
workerextension_test.go feat: hot reload (#2031) 2025-12-12 14:29:18 +01:00
zizmor.yaml ci: disable dockerhub GHA env (#2369) 2026-04-24 17:50:56 +02:00
zval.h feat: persistent-zval helpers (deep-copy zval trees across threads) (#2366) 2026-05-04 16:23:22 +02:00
zval_test.go feat: persistent-zval helpers (deep-copy zval trees across threads) (#2366) 2026-05-04 16:23:22 +02:00

FrankenPHP: Modern App Server for PHP

FrankenPHP

FrankenPHP is a modern application server for PHP built on top of the Caddy web server.

FrankenPHP gives superpowers to your PHP apps thanks to its stunning features: Early Hints, worker mode, real-time capabilities, hot reloading, automatic HTTPS, HTTP/2, and HTTP/3 support...

FrankenPHP works with any PHP app and makes your Laravel and Symfony projects faster than ever thanks to their official integrations with the worker mode.

FrankenPHP can also be used as a standalone Go library to embed PHP in any app using net/http.

Learn more on frankenphp.dev and in this slide deck:

Slides

Getting Started

Install Script

On Linux and macOS, copy this line into your terminal to automatically install an appropriate version for your platform:

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

On Windows, run this in PowerShell:

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

Standalone Binary

We provide FrankenPHP binaries for Linux, macOS and Windows containing PHP 8.5.

Linux binaries are statically linked, so they can be used on any Linux distribution without installing any dependency. macOS binaries are also self-contained. They contain most popular PHP extensions. Windows archives contain the official PHP binary for Windows.

Download FrankenPHP

rpm Packages

Our maintainers offer rpm packages for all systems using dnf. To install, run:

sudo dnf install https://rpm.henderkes.com/static-php-1-0.noarch.rpm
sudo dnf module enable php-zts:static-8.5 # 8.2-8.5 available
sudo dnf install frankenphp

Installing extensions: sudo dnf install php-zts-<extension>

For extensions not available by default, use PIE:

sudo dnf install pie-zts
sudo pie-zts install asgrim/example-pie-extension

deb Packages

Our maintainers offer deb packages for all systems using apt. To install, run:

VERSION=85 # 82-85 available
sudo curl https://pkg.henderkes.com/api/packages/${VERSION}/debian/repository.key -o /etc/apt/keyrings/static-php${VERSION}.asc
echo "deb [signed-by=/etc/apt/keyrings/static-php${VERSION}.asc] https://pkg.henderkes.com/api/packages/${VERSION}/debian php-zts main" | sudo tee -a /etc/apt/sources.list.d/static-php${VERSION}.list
sudo apt update
sudo apt install frankenphp

Installing extensions: sudo apt install php-zts-<extension>

For extensions not available by default, use PIE:

sudo apt install pie-zts
sudo pie-zts install asgrim/example-pie-extension

apk Packages

Our maintainers offer apk packages for all systems using apk. To install, run:

VERSION=85 # 82-85 available
echo "https://pkg.henderkes.com/api/packages/${VERSION}/alpine/main/php-zts" | sudo tee -a /etc/apk/repositories
KEYFILE=$(curl -sJOw '%{filename_effective}' https://pkg.henderkes.com/api/packages/${VERSION}/alpine/key)
sudo mv ${KEYFILE} /etc/apk/keys/ &&
sudo apk update &&
sudo apk add frankenphp

Installing extensions: sudo apk add php-zts-<extension>

For extensions not available by default, use PIE:

sudo apk add pie-zts
sudo pie-zts install asgrim/example-pie-extension

Homebrew

FrankenPHP is also available as a Homebrew package for macOS and Linux.

brew install dunglas/frankenphp/frankenphp

Installing extensions: Use PIE.

Usage

To serve the content of the current directory, run:

frankenphp php-server

You can also run command-line scripts with:

frankenphp php-cli /path/to/your/script.php

For the deb and rpm packages, you can also start the systemd service:

sudo systemctl start frankenphp

Docker

Alternatively, Docker images are available:

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

Go to https://localhost, and enjoy!

Tip

Do not attempt to use https://127.0.0.1. Use https://localhost and accept the self-signed certificate. Use the SERVER_NAME environment variable to change the domain to use.

Docs

Examples and Skeletons