Your cart is currently empty!
How to Install FrankenPHP App Server in Ubuntu 24.04
FrankenPHP is a modern, high-performance PHP application server and reverse proxy built with Caddy. It supports features like automatic HTTPS, HTTP/3, worker mode, and native support for Symfony and Laravel. If you’re running Ubuntu 24.04 and want to try FrankenPHP, here’s how to set it up.
Prerequisites
- Ubuntu 24.04 (fresh install or existing server)
- Root or sudo access
- Basic terminal knowledge
Step 1: Update Your System
Before installing anything, make sure your system packages are up-to-date:
sudo apt update && sudo apt upgrade -yStep 2: Install Required Dependencies
FrankenPHP is built on top of Caddy, so we’ll start by installing xcaddy to build a custom Caddy with FrankenPHP.
sudo apt install -y curl git build-essential php php-cliInstall xcaddy:
curl -sfL https://github.com/caddyserver/xcaddy/releases/latest/download/xcaddy_$(uname -s)_$(uname -m) -o xcaddy
chmod +x xcaddy
sudo mv xcaddy /usr/local/bin/Step 3: Build Caddy with FrankenPHP
Now build a custom version of Caddy with the FrankenPHP module:
xcaddy build --with github.com/dunglas/frankenphp
Move the built binary to a system path:
sudo mv caddy /usr/local/bin/Step 4: Verify Installation
Check if FrankenPHP was included:
caddy list-modules | grep frankenphpYou should see something like: http.handlers.frankenphp
Step 5: Create a Basic FrankenPHP App
Create a simple PHP file:
mkdir -p ~/frankenphp-site
cd ~/frankenphp-site
echo "<?php phpinfo();" > index.phpStep 6: Create a Caddyfile
FrankenPHP uses Caddy’s config file format. Create a Caddyfile:
nano ~/frankenphp-site/CaddyfilePaste the following:
:8080
root * .
php_fastcgi localhost:9000
file_serverOptional: Replace
php_fastcgiwithfrankenphpfor native execution.
Example:
:8080
root * .
frankenphp
file_serverStep 7: Run FrankenPHP
From the project directory:
caddy run --config CaddyfileVisit https://localhost:8080 (or your server IP) in your browser. You should see the PHP info page.
Final Tips
- Use
systemdto run FrankenPHP as a service for production. - Secure your server with HTTPS using Caddy’s built-in features.
- Refer to the FrankenPHP documentation for advanced use cases.
Conclusion
FrankenPHP is fast, flexible, and easy to deploy. With Ubuntu 24.04 and just a few commands, you can have a powerful PHP app server up and running in no time.
Let me know in the comments if you ran into any issues—or if you’re using FrankenPHP in production!

Tech enthusiast and content creator passionate about making technology simple for everyone. I share practical tips, guides, and reviews on the latest in computers, software, and gadgets. Let’s explore the digital world together!
