Template

Laravel Server

Nginx, PHP-FPM with Laravel's extensions, Composer and Node.js, with optional MariaDB and Redis.

Options

As they appear on the run form, with their defaults.

PHP version

One choice

Installed alongside any other PHP version already on the server.

  • PHP 8.3
  • PHP 8.4

Default: PHP 8.3

Node.js version

One choice

  • Node.js 24 (LTS)
  • Node.js 22 (LTS, maintenance)

Default: Node.js 24 (LTS)

Database server

One choice

  • MariaDB
  • None — the database is elsewhere

Default: MariaDB

Install Redis

On or off

For caching, sessions and queues. Listens on this server only.

Default: On

What you get

A server ready for Laravel applications: Nginx, PHP-FPM with the extensions Laravel requires (BCMath, cURL, Intl, Mbstring, PDO for MySQL and SQLite, XML, Zip, OPcache, and Redis when you choose it), Composer, and Node.js for building front-end assets with Vite. MariaDB and Redis are added if you choose them. The template does not deploy an application, create a database or configure a site.

Choosing the options

PHP versionPHP 8.3 or PHP 8.4. Choose the newest version your Laravel release supports; its upgrade guide states the minimum.

Node.js versionNode.js 24 unless your front-end build needs 22.

Database serverMariaDB installs it on this server. Choose None — the database is elsewhere when the application uses a managed database or another server.

Install Redis — for caching, sessions and queues. It listens on this server only, and PHP's Redis extension is added.

What happens

  1. Update Packages.
  2. Install Nginx.
  3. Install PHP with Laravel's extensions and PHP-FPM.
  4. Install Composer.
  5. Install Node.js.
  6. Install MariaDB, when chosen.
  7. Install Redis, when chosen.

If a step fails, the steps after it are skipped on that server.

After the run

  1. Create the application's database and account (see Install MariaDB).
  2. Deploy the code, then in its folder run composer install --no-dev --optimize-autoloader, npm ci && npm run build, and php artisan migrate --force, with your .env in place.
  3. Add an nginx site whose root is the application's public folder, sending .php requests to PHP-FPM.
  4. Run the scheduler every minute from cron (php artisan schedule:run) and keep queue workers running with a process manager or systemd.
  5. Add monitoring and backups for the site and its database.

Common problems

  • An extension is not available for the chosen PHP version on this distribution — see Install PHP.
  • Composer does not run with the server's PHP — see Install Composer.
  • Node.js needs a newer glibc — see Install Node.js.