Boost Your PHP Apps with FrankenPHP: Fast Deployment via Docker and Binaries

This guide introduces FrankenPHP—a modern PHP application server built on Caddy—detailing its key features, Docker deployment, standalone binary usage, command‑line script execution, and how to mount local directories for custom PHP projects.

Open Source Tech Hub
Open Source Tech Hub
Open Source Tech Hub
Boost Your PHP Apps with FrankenPHP: Fast Deployment via Docker and Binaries

FrankenPHP is a modern PHP application server built on the Caddy web server, offering features such as Early Hints, multiple work modes, real‑time capabilities, automatic HTTPS, and support for HTTP/2 and HTTP/3.

FrankenPHP overview diagram
FrankenPHP overview diagram

Running with Docker

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

After the container starts, open https://localhost in a browser; the displayed page confirms the server is running.

Docker container output screenshot
Docker container output screenshot

Static binary releases

If Docker is not preferred, standalone FrankenPHP binaries for Linux and macOS are provided, bundling PHP 8.3 and common extensions. They can be downloaded from the GitHub releases page. ./frankenphp php-server This command serves the current directory as a PHP application.

Command‑line script execution

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

Mounting a local directory for custom scripts

docker run -v e:/GitHub/tinywan-frankenphp:/app/public \
    -p 80:80 -p 443:443 -p 443:443/udp \
    dunglas/frankenphp

Access the application at https://localhost/public/index.php to run your custom PHP code.

Mounted directory example screenshot
Mounted directory example screenshot
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DockerPHPWeb serverCaddyFrankenPHP
Open Source Tech Hub
Written by

Open Source Tech Hub

Sharing cutting-edge internet technologies and practical AI resources.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.