The modern PHP app server
Find a file
2026-02-12 10:58:02 +01:00
.github chore: bump to Go 1.26 (#2178) 2026-02-11 14:55:57 +01:00
caddy chore: prepare release 1.11.2 2026-02-12 10:58:02 +01:00
docs docs: performance updates (#2173) 2026-02-10 11:12:15 +01:00
internal chore: cs improvements 2026-02-11 15:49:39 +01:00
package Add apk repository, update debian repository instructions (#2099) 2026-02-06 11:11:58 +01:00
testdata fix(worker): session leak between requests 2026-02-11 12:12:52 +01: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 delete source/downloads after building in script, add .editorconfig (#2000) 2025-11-20 11:49:09 +01:00
.gitignore attempt to fix create-pr action from translation CI (#2169) 2026-02-07 20:08:58 +01:00
.gitleaksignore run translation even if linter failed (#2145) 2026-01-27 00:02:19 +01: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 chore: make super-linter green (#2051) 2025-12-01 15:52:08 +01:00
alpine.Dockerfile delete source/downloads after building in script, add .editorconfig (#2000) 2025-11-20 11:49:09 +01: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 don't overwrite SPC_CMD_VAR_FRANKENPHP_XCADDY_MODULES unconditionally (#2135) 2026-01-23 20:46:34 +01:00
cgi.go perf: various optimizations (#2175) 2026-02-11 15:21:55 +01:00
cgi_test.go fix: path confusion via unicode casing in CGI path splitting 2026-02-11 11:59:16 +01:00
cgo.go fix(ci): Docker builds 2025-07-17 10:14:18 +02:00
context.go perf: various optimizations (#2175) 2026-02-11 15:21:55 +01:00
CONTRIBUTING.md docs: remove outdated build tags 2026-02-03 14:52:16 +01:00
debugstate.go refactor: extract the state module and make the backoff error instead of panic 2025-12-02 23:10:12 +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 ci: PHP 8.5 (#2006) 2025-11-21 13:54:07 +01:00
embed.go chore: various cleanups 2024-10-23 22:33:58 +02:00
env.go refactor: extract the state module and make the backoff error instead of panic 2025-12-02 23:10:12 +01:00
ext.go fix: segmentation fault when registering multiple extensions (#2112) 2026-01-07 09:21:03 +01:00
frankenphp.c fix(worker): session leak between requests 2026-02-11 12:12:52 +01:00
frankenphp.go perf: various optimizations (#2175) 2026-02-11 15:21:55 +01:00
frankenphp.h fix: segmentation fault when registering multiple extensions (#2112) 2026-01-07 09:21:03 +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 fix(worker): session leak between requests 2026-02-11 12:12:52 +01:00
go.mod chore: bump to Go 1.26 (#2178) 2026-02-11 14:55:57 +01:00
go.sh fix(ci): Docker builds 2025-07-17 10:14:18 +02:00
go.sum chore: bump to Go 1.26 (#2178) 2026-02-11 14:55:57 +01:00
hotreload.go feat: hot reload (#2031) 2025-12-12 14:29:18 +01:00
install.sh Add apk repository, update debian repository instructions (#2099) 2026-02-06 11:11:58 +01:00
LICENSE docs: add license (#24) 2022-10-15 11:21:21 +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
mercure-skip.go feat: hot reload (#2031) 2025-12-12 14:29:18 +01:00
mercure.go fix: update mercure_publish() to use the new GoPackedArray() API 2025-12-13 19:30:22 +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 chore!: update to golangci-lint-action 7 (#1508) 2025-04-17 20:33:22 +02:00
metrics_test.go feat: introduces worker name option, use label on worker metrics instead (#1376) 2025-03-22 12:32:59 +01:00
options.go feat: hot reload (#2031) 2025-12-12 14:29:18 +01:00
phpmainthread.go perf: various optimizations (#2175) 2026-02-11 15:21:55 +01:00
phpmainthread_test.go perf: various optimizations (#2175) 2026-02-11 15:21:55 +01:00
phpthread.go chore: cs improvements 2026-02-11 15:49:39 +01:00
README.md Add apk repository, update debian repository instructions (#2099) 2026-02-06 11:11:58 +01:00
recorder_test.go chore: modernize Go code 2025-08-15 00:22:44 +02:00
release.sh ci: automatically create the Brew formula PR on release 2024-12-20 18:57:00 +01: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 perf: various optimizations (#2175) 2026-02-11 15:21:55 +01:00
scaling_test.go perf: various optimizations (#2175) 2026-02-11 15:21:55 +01:00
SECURITY.md docs: update repository links and sync cn readme (#1711) 2025-07-01 10:29:55 +02:00
static-builder-gnu.Dockerfile ci: verbose logs for StaticPHP (#2074) 2025-12-15 20:13:15 +01:00
static-builder-musl.Dockerfile ci: verbose logs for StaticPHP (#2074) 2025-12-15 20:13:15 +01:00
threadinactive.go refactor: extract the state module and make the backoff error instead of panic 2025-12-02 23:10:12 +01:00
threadregular.go refactor: extract the state module and make the backoff error instead of panic 2025-12-02 23:10:12 +01:00
threadtasks_test.go refactor: extract the state module and make the backoff error instead of panic 2025-12-02 23:10:12 +01:00
threadworker.go refactor: extract the state module and make the backoff error instead of panic 2025-12-02 23:10:12 +01:00
types.c feat(extgen): add support for callable in parameters (#1731) 2025-12-15 12:50:50 +01:00
types.go ci: disable codespell linter (#2153) 2026-01-29 17:23:50 +01:00
types.h feat(extgen): add support for callable in parameters (#1731) 2025-12-15 12:50:50 +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
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: hot reload (#2031) 2025-12-12 14:29:18 +01:00
worker.go perf: various optimizations (#2175) 2026-02-11 15:21:55 +01:00
worker_test.go feat: add support for structured logging with the frankenphp_log() PHP function (#1979) 2025-12-15 16:10:35 +01: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: fix issues and lint with zizmor 2025-08-28 19:16:32 +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, 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

On Windows, use WSL to run FrankenPHP.

Install Script

You can copy this line into your terminal to automatically install an appropriate version for your platform:

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

Standalone Binary

We provide static FrankenPHP binaries for development purposes on Linux and macOS containing PHP 8.4 and most popular PHP extensions.

Download FrankenPHP

Installing extensions: Most common extensions are bundled. It's not possible to install more extensions.

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.4 # 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