Forge provides first-class support for applications running Laravel, allowing you to quickly toggle and configure:
To accomplish this, Forge parses the composer.json
and composer.lock
files from your application and inspects for the presence and version of the packages above.
Forge will only show the application panel for Laravel framework installations of version 5.0
or later. In addition, the panel's supported packages must meet the following version requirements:
Dependency | Minimum Version |
---|---|
laravel/framework | 5.0 |
laravel/horizon | 1.0 |
laravel/octane | 1.0 |
laravel/pulse | 1.0 |
laravel/reverb | * |
inertiajs/inertia-laravel | 0.6.6 |
You may quickly enable or disable the Laravel scheduler via the "Laravel Scheduler" toggle. Forge will create the required Scheduler for you.
Scheduler Configuration
Forge will automatically configure the scheduler to run every minute using the site's configured PHP version.
You may quickly enable or disable the Laravel Horizon daemon via the "Laravel Horizon" toggle. Forge will create the required Horizon daemon for you.
If the site's deploy script does not contain the horizon:terminate
command, Forge will automatically append it for you.
If your server is already configured with a daemon that runs Laravel Horizon, Forge will offer to convert the daemon for you. This process links the site's ID and the daemon's ID together, allowing Forge to manage the daemon for you.
You may quickly enable or disable the Laravel Octane daemon via the "Laravel Octane" toggle. Forge will create the required Octane daemon and install Octane dependencies for you.
When enabling the Octane daemon, Forge will ask you to provide the port number you would like to use for the Octane server as well as your Octane server of choice.
If the site's deploy script does not contain the octane:reload
command, Forge will automatically append it for you.
Before Enabling Octane
Before enabling Laravel Octane, you must set the OCTANE_SERVER
environment variable to the Octane server you choose.
If your server is already configured with a daemon that runs Laravel Octane, Forge will offer to convert the daemon for you. This process links the site's ID and the daemon's ID together, allowing Forge to manage the daemon for you.
Determining the correct server type for hosting Laravel Reverb depends on your configuration requirements. You may use the table below to help inform your decision:
Configuration | App Server | Web Server |
---|---|---|
Reverb server alongside Laravel application | ⊙ | |
Dedicated Reverb server | ⊙ | |
Dedicated Reverb server with Pulse | ⊙ | |
Dedicated Reverb server with Pulse (seperate ingest and / or database) | ⊙ |
Once your preferred server has been provisioned, you should add a new site and install your Reverb-enabled Laravel application from your version control provider of choice.
Now, you may quickly enable or disable Laravel Reverb via the "Laravel Reverb" toggle within Forge's application panel. When enabling Reverb, Forge will create the Reverb daemon, install the required dependencies, and configure the server for optimum performance.
Additionally, Forge will prompt for additional information required to setup the server per your requirements.
example.com
, Forge will default Reverb's hostname to ws.example.com
.ev
event loop if required.Reverb Hostname Configuration
Forge ensures the hostname provided during Reverb's installation process is publicly accessible by adding a new server block to your existing site's Nginx configuration. This server block is contained within a new file and is not available to edit from the Forge UI dashboard.
If the site's deploy script does not contain the reverb:restart
command, Forge will automatically append it for you.
If an SSL certificate exists for your site which protects Reverb's configured hostname, Forge will automatically install it when enabling Reverb, ensuring your Reverb server is accessible via secure WebSockets (wss
).
If Reverb is installed before a valid certificate is available, you may request a new certificate for Reverb's configured hostname from your site's "SSL" tab. Forge will automatically configure secure WebSockets for Reverb as soon as the certificate is activated. Forge will also pre-populate the "Domains" SSL form input with Reverb's hostname when requesting a certificate.
After activating SSL on a Reverb-enabled site, you should ensure the following environment variables are properly defined before redeploying your site:
REVERB_PORT=443
REVERB_SCHEME=https
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"
MIX_REVERB_PORT="${REVERB_PORT}"
MIX_REVERB_SCHEME="${REVERB_SCHEME}"
If your server is already configured with a daemon that runs Laravel Reverb, Forge will manage the daemon for you. This process links the site's ID and the daemon's ID together, allowing Forge to manage the daemon on your behalf.
Disabling Reverb
When disabling Reverb, Forge will remove the daemon and ensure the public hostname is no longer accessible. However, any settings Forge updated when enabling Reverb, such as open file and connection limits, will not be reset and any PHP extensions installed will not be removed.
You may quickly enable or disable the Inertia SSR daemon via the "Inertia SSR" toggle. Forge will create the required Inertia SSR daemon for you.
When enabling the Inertia daemon, Forge will ask you to provide a few more details. You may also choose whether Forge should update your deploy script to append the Inertia SSR stop command.
If your server is already configured with a daemon that runs Inertia SSR, Forge will offer to convert the daemon for you. This process links the site's ID and the daemon's ID together, allowing Forge to manage the daemon for you.
You may grant a circle member authority to run arbitrary commands in a site's directory by granting the server:create-schedulers
and server:create-daemons
permissions.