Skip to content

For Laravel

Laravel, without the markup

Real VMs for PHP-FPM or Octane, an S3-compatible disk for Laravel's filesystem, and a CDN across 988 locations with zero egress. The whole stack, on infrastructure you control.

Free to sign up. No egress fees on any product.

Why Laravel on Edge

The simplicity of a VPS, with the edge built in

The VM you'd provision anyway, plus the storage and global delivery you'd otherwise glue together yourself.
  • Real VMs, not shared hosting

    Dedicated vCPU, NVMe storage and up to 10 Gbps networking. Start on a Standard VM and resize with one command as you grow.
  • An S3 disk for Flysystem

    Plug Edge Storage into Laravel's s3 driver. Uploads, exports and backups go to durable object storage, not the VM's disk.
  • Global CDN, zero egress

    Vite's /build assets and public Storage URLs cache in 988 locations. No egress fees and no per-request surprises.
  • Bring your database

    Run MySQL, MariaDB, PostgreSQL or Redis on the same VM, on a separate VM over a free private network, or keep your managed provider.
  • Image transforms via URL

    Skip the Intervention Image queue. Serve uploads through the CDN and ask for ?width=300&fit=cover&format=auto.
  • Forge-style automation

    The Edge CLI and agent API provision VMs, set firewall rules and roll out releases. Scriptable end to end.

Reference architecture

How Laravel maps to Edge

The same shape as your dev box: Nginx, PHP-FPM, a database and Redis. Add a bucket for the filesystem and a CDN in front.
  • Compute

    Runs Nginx and PHP-FPM (or Octane), plus MySQL and Redis on smaller apps.

  • Storage

    Backs Laravel's s3 driver for uploads, exports and backups.

  • CDN

    Caches Vite output, public assets and public Storage URLs.

  • Image optimisation

    Resize, crop and AVIF/WebP conversion of uploaded media, from the URL.

  • DNS

    Anycast DNS for the apex, subdomains and email records.

  • Shield

    Protects login, register and contact routes with one middleware.

  • Assist

    One line in your Blade layout adds answers from your public pages.

Deploy

From laravel new to live in five steps

A LEMP VM, an S3 disk, a release script and a CDN. The same moves you'd make on any Linux box.
  1. 01

    Create a VM with the LEMP stack

    The lemp library script installs Nginx, MySQL 8 and PHP 8.3-FPM on first boot. Add Composer and Redis, or bake everything into your own script with edge compute scripts create.

    shell
    $ edge compute create --name app --size s-2vcpu-4gb \
        --image ubuntu-24 --region london --script lemp \
        --script-param db_password="$(openssl rand -base64 24)"
  2. 02

    Add an Edge Storage disk

    Laravel's s3 driver works unchanged once league/flysystem-aws-s3-v3 is installed. Set url to your CDN hostname so Storage::url() returns cached links.

    config/filesystems.php
    'edge' => [
        'driver' => 's3',
        'key' => env('EDGE_ACCESS_KEY'),
        'secret' => env('EDGE_SECRET_KEY'),
        'region' => 'us-east-1',
        'bucket' => env('EDGE_BUCKET', 'acme-uploads'),
        'endpoint' => 'https://storage.edge.network',
        'use_path_style_endpoint' => true,
        'url' => env('EDGE_CDN_URL'),
    ],
  3. 03

    Ship a release

    Run it by hand the first time, then move it into CI or Envoy.

    shell
    $ cd /srv/app && git pull
    $ composer install --no-dev --optimize-autoloader
    $ php artisan migrate --force
    $ php artisan config:cache && php artisan route:cache
    $ php artisan queue:restart
    $ sudo systemctl reload php8.3-fpm
  4. 04

    Keep queues and the scheduler running

    Run the worker under systemd and add * * * * * php artisan schedule:run to cron. Split workers onto their own VM when the queue grows.

    /etc/systemd/system/laravel-queue.service
    [Unit]
    Description=Laravel queue worker
    After=network.target redis-server.service
    
    [Service]
    User=www-data
    WorkingDirectory=/srv/app
    ExecStart=/usr/bin/php artisan queue:work redis --sleep=3 --tries=3
    Restart=always
    
    [Install]
    WantedBy=multi-user.target
  5. 05

    Front it with the CDN

    Pages that set a session cookie pass straight through. Build assets and public Storage URLs are cached everywhere.

    shell
    $ edge cdn create --name acme-app
    $ edge cdn domains add cdn-e4d27b \
        --domain app.acme.co.uk \
        --origin https://<vm-ip> \
        --jit-image

Prefer to hand it off? Give the job to your AI agent or have our engineers do it.

What it costs

A server bill, not a platform bill

One VM runs Nginx, PHP-FPM, MySQL and Redis. Uploads live in a bucket and the CDN carries the bytes.
  • No egress fees on uploads or downloads
  • Image transforms included with the CDN
  • Resize the VM with one command when you outgrow it
  • Billed hourly from a prepaid balance, with optional hard caps
See compute pricing

Estimated monthly bill on Edge

SaaS app · 6.5M requests a month · 45 GB of uploads

USD
  • Compute$19.24Standard VM · 2 vCPU · 4 GiB · 80 GB NVMe
  • CDN$1.506.5M requests: first 500k free, 6M × $0.25 per million
  • Storage$0.6045 GB of uploads: first 5 GB free, 40 GB × $0.015
  • DNS$0.00Zone, subdomains and email records
  • Egress$0.00
Total$21.34

FAQ

Laravel on Edge, answered

Something else? Ask an engineer.
Does Laravel Octane work?
Yes. Run Octane with Swoole, RoadRunner or FrankenPHP on an Edge VM exactly as you would on any Linux box, with Nginx in front. There are no serverless cold starts to design around.
Can I keep using Forge?
Yes. Forge can manage any server you can SSH into, so point it at an Edge VM by IP. Or use the Edge CLI and a startup script to build an equivalent stack yourself.
How do queues and scheduled tasks work?
Run queue:work as a systemd service and schedule:run from cron on the same VM, with Redis alongside for fast queues. When the queue grows, move workers to a dedicated VM on a private network.
Where do user uploads go?
In an Edge Storage bucket, through the standard s3 filesystem driver. Only the endpoint changes: https://storage.edge.network, with path-style URLs enabled.
Will the CDN cache logged-in pages?
No. Responses that send Set-Cookie or Cache-Control: private are never cached, so session pages go straight to PHP. Static assets and public files are cached as normal.

Move your Laravel app to Edge

Bring an existing app or start with laravel new. We'll help you size the VM and move the storage.

Free tiers hard-cap. Nothing bills until you add a card.