Deploy Laravel to a server you own.

Push to a branch and Serversinc builds one image, runs your migrations, then rolls out the web app, the queue worker and the scheduler together.

dash.serversinc.io/applications
An application detail page with its deployments, status and settings

Serversinc runs the whole Laravel app, not just the web server.

The workers and the database live on your server, at one price that doesn't move with traffic.

Workers next to the web app

Run queue:work and schedule:work as processes of the same application, so every deploy ships them the same code.

Migrations before the swap

The release command runs php artisan migrate once per deploy, before any process changes. If it fails, the old version keeps serving.

MySQL on the same server

Provision MySQL, PostgreSQL or MariaDB from the dashboard and connect the app by name.

Backups to your own bucket

Schedule database backups to S3-compatible storage, so a bad migration is a restore and not a rebuild.

HTTPS on your domain

The proxy on your server issues the certificate and routes the domain to the web process.

Traffic isn't metered

Builds and bandwidth aren't billed. A busy launch costs what a quiet week does.

One image runs every part of the app.

Each process is its own container, built from the same commit.

  • release

    Migrations

    php artisan migrate --force runs in a one-off container before any process changes.

  • web

    The web app

    Nginx and PHP-FPM serve requests. Serversinc waits for /up to answer before it swaps.

  • worker

    The queue

    php artisan queue:work picks up jobs from the database queue.

  • scheduler

    Scheduled tasks

    php artisan schedule:work runs your schedule every minute, with no cron entry on the server.

Deploy Laravel in six steps.

Tested with a fresh Laravel 13 app on PHP 8.4 and MySQL 8.4. The bootstrap/app.php change assumes Laravel 11 or later.

You’ll need a server connected to Serversinc and the Serversinc GitHub App installed on your repository (Settings → Integrations).

Add a Dockerfile

Serversinc builds the Dockerfile at the root of your repository. This one builds your Vite assets with Node, then installs Composer dependencies on the serversideup/php image, which runs Nginx and PHP-FPM on port 8080.

Dockerfile
FROM node:22-alpine AS assets
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM serversideup/php:8.4-fpm-nginx
WORKDIR /var/www/html
ENV PHP_OPCACHE_ENABLE=1
COPY --chown=www-data:www-data composer.json composer.lock ./
RUN composer install --no-dev --no-scripts --no-autoloader --prefer-dist --no-interaction
COPY --chown=www-data:www-data . .
COPY --from=assets --chown=www-data:www-data /app/public/build ./public/build
RUN composer dump-autoload --optimize --no-dev

Keep local files out of the build:

.dockerignore
.git
.env
node_modules
vendor
public/build
public/hot
storage/logs/*
storage/framework/cache/data/*
storage/framework/sessions/*
storage/framework/views/*
database/database.sqlite
Dockerfile

The proxy ends HTTPS and forwards plain HTTP to the container. Trust it, so Laravel builds https:// URLs:

bootstrap/app.php
->withMiddleware(function (Middleware $middleware): void {
$middleware->trustProxies(at: '*');
})

If a scheduled task is a closure, give it a name and run it on one server. The reason is in the FAQ below.

routes/console.php
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Schedule;
Schedule::call(fn () => Cache::forget('stats'))
->name('clear-stats')
->hourly()
->onOneServer();

Commit package-lock.json and composer.lock.

Provision the database

  1. Open Servers, select your server, then the Database tab.
  2. Choose MySQL and version 8.4, then select Provision.
  3. When the instance is ready, select Create database and name it shop.
  4. Under Database users, select Add user, name it shop, and copy the password.
  5. Select Grant access and give the user access to shop.

The instance has its own network. Your app joins it in the next step and reaches MySQL by the instance name.

Create the application

  1. Open Applications, select New application, then GitHub app.
  2. Under Basic details, name it shop, choose the server, the repository and the branch, and set Deploy strategy to Rolling.
  3. Under Labels, add traefik.http.services.shop.loadbalancer.server.port=8080. The health check and the proxy both use this port.
  4. Under Processes, set up three:
ProcessCommandStarts afterReady whenReceives traffic
webblank (image default)NoneHealth check /upOn
workerphp artisan queue:workwebRunning timeOff
schedulerphp artisan schedule:workwebRunning timeOff
  1. Select Create application.

/up is the health route Laravel ships with. The worker and the scheduler start after web, so if a new version fails its health check, they stay on the old version with it.

Connect the database and set variables

  1. On the application’s Networks tab, select Attach network and choose the network named after the MySQL instance.
  2. On Variables, select Paste .env and paste your production values. Mark APP_KEY and DB_PASSWORD as secret.
.env
APP_ENV=production
APP_DEBUG=false
APP_KEY=base64:...
APP_URL=https://shop.example.com
LOG_CHANNEL=stderr
DB_CONNECTION=mysql
DB_HOST=<instance name>
DB_PORT=3306
DB_DATABASE=shop
DB_USERNAME=shop
DB_PASSWORD=<the password you copied>

Generate the key with php artisan key:generate --show. LOG_CHANNEL=stderr sends Laravel’s log to the container output, so you can read it under Logs. All three processes get these variables.

  1. On Settings → Deploy, enter php artisan migrate --force as the Release command and save.
  2. Select Deploy.

The release command runs once in a one-off container from the new image, with the same variables and networks as your processes. When it succeeds, the processes deploy in order. When the deployment shows Completed, open Logs and pick the worker process. You’ll see each job as it runs.

Put it on a domain

  1. Point an A record for shop.example.com at the server’s IP address.
  2. On the application’s Settings, enter shop.example.com under Domain and save. The Labels tab now shows a traefik.http.routers.shop.rule label. The router takes its name from the application.
  3. On Labels, add these three:
Labels
traefik.http.routers.shop.entrypoints=websecure
traefik.http.routers.shop.tls=true
traefik.http.routers.shop.tls.certresolver=le
  1. Deploy again. The certificate is issued once the domain resolves to the server.

Back up the database

  1. Add a storage bucket under Settings → Storage providers.
  2. On the server’s Backups tab, select New schedule.
  3. Choose the MySQL instance, the storage provider and how often to run, then select Create schedule.

Read Database backups for retention and restores.

Ship a change

Push to the branch. Serversinc builds the new image, runs your migrations, then rolls over the web app once /up answers, followed by the worker and the scheduler. If the migration or the health check fails, the old version keeps serving.

To deploy from CI instead, use the application’s deploy trigger. For every rollout option, read Deploy an application.

One flat price for every Laravel app.

£5 a month covers your first three servers. Every server after that adds £2 a month. Builds and bandwidth are on the house, and the servers stay on your provider and your bill.

Laravel on Serversinc, answered.

Ship your Laravel app today.

Connect a server you already run, or provision one on your cloud account. £5 a month covers the first three.