Serve Shlink using FrankenPHP

Starting with v4.6.0, it is possible to use FrankenPHP to serve Shlink, using its worker mode.

Installing FrankenPHP binary

The first thing you need to do is getting the official binary:

Terminal window
curl https://frankenphp.dev/install.sh | sh
mv frankenphp /usr/local/bin/

Running Shlink with FrankenPHP

Now, you can run the following command:

Terminal window
frankenphp php-server --worker /path/to/shlink/bin/frankenphp-worker.php

Where /path/to/shlink is the directory where you downloaded Shlink. The frankenphp-worker.php script is provided by Shlink.

FrankenPHP supports many other configuration options. Take a look at their documentation to customize it for your needs.