# Laravel Octane with FrankenPHP

> Run Laravel Octane on FrankenPHP in 4 steps: install Octane, set the start command `php artisan octane:start --server=frankenphp`, pick the runtime, deploy.

Laravel Octane with FrankenPHP
-------------------------------

Laravel Octane supercharges your application's performance by serving your application using high-powered application servers. With Octane, your application boots once and stays in memory, serving requests at lightning speed.

FrankenPHP is the recommended server for Laravel Octane on Ploi Cloud, offering an easy setup with excellent performance.

### What is Laravel Octane?

Octane dramatically improves your application's performance by:

- Keeping your application in memory between requests
- Eliminating the overhead of booting Laravel for each request
- Providing significant speed improvements for typical Laravel applications

### Setting up Octane with FrankenPHP

Follow these steps to deploy your Laravel application with Octane and FrankenPHP:

<ol>
<li>Navigate to your application's <strong>Settings</strong> tab</li>
<li>Find the <strong>PHP runtime</strong> section</li>
<li>Select <strong>FrankenPHP (Octane)</strong> as the runtime</li>
<li>Save your settings</li>
</ol>

### Install Laravel Octane

Before deploying, install Laravel Octane in your application and commit the changes to your repository:

<pre><code>composer require laravel/octane
php artisan octane:install --server=frankenphp</code></pre>

### Set the start command

Configure the start command in your application settings:

<ol>
<li>Navigate to your application's <strong>Settings</strong> tab</li>
<li>Find the <strong>Start command</strong> field</li>
<li>Enter the following command:</li>
</ol>

<pre><code>php artisan octane:start --server=frankenphp --host=0.0.0.0 --port=8080</code></pre>

### Deploy your application

After configuring the runtime, build commands, and start command, deploy your application. The deployment will:

<ol>
<li>Build your application with Octane installed</li>
<li>Start your application using the FrankenPHP server</li>
<li>Keep your application running in memory for optimal performance</li>
</ol>

## Frequently asked questions

### Does Laravel Octane support FrankenPHP?

Yes. FrankenPHP is one of three officially supported Octane servers, alongside Swoole and RoadRunner.

### What is the FrankenPHP command for Laravel Octane?

Run `php artisan octane:start --server=frankenphp --host=0.0.0.0 --port=8080`. Set this as the start command in your application settings.

### How do I install Laravel Octane with FrankenPHP?

Run `composer require laravel/octane` then `php artisan octane:install --server=frankenphp`. Commit the changes and redeploy.

### Which Octane server is fastest: Swoole, RoadRunner, or FrankenPHP?

FrankenPHP is the recommended default on Ploi Cloud — it offers the simplest setup and competitive performance with HTTP/2 and HTTPS support out of the box. Swoole is fastest for raw throughput; RoadRunner sits in between.
