Skip to content

Deployment ​

Introduction ​

A kitloom site is a Laravel application, and it is deployed like one: the code from your Git repository, the packages from Composer, the database and the uploads kept on the server or beside it. Nothing about it needs a special host. This page covers what the server has to provide, where to host it, and the deploy kit that writes the deploy files for the site; each place to host has a page of its own, with the kit's files first and the steps by hand after them.

What the server needs ​

PHP 8.4 or newer, as PHP-FPMwith intl, gd (or imagick), pdo_mysql, mbstring, xml, curl, zip, bcmath, opcache; redis for a cache or queue in Redis, pcntl for Horizon. For WebP or AVIF images (Settings → Media → Image format), GD built with WebP, and with libavif for AVIF: php -r 'var_dump((bool) (imagetypes() & IMG_AVIF));' says. The deploy kit's Docker image has both
A databaseMySQL 8 or MariaDB — a new database of the site's own, or an existing WordPress one. For WordPress, DB_PREFIX is the $table_prefix from its wp-config.php (wp_ unless it was changed). SQLite also works for a small site on one server
A web serverNginx or Caddy, with public/ as the document root
Composer 2with your kitloom token saved, to install the packages from https://packages.kitloom.dev
Node.js 22+to build Vue and React themes (npm run build) and to run their SSR server, php artisan inertia:start-ssr, kept running like the worker (the bundles are self-contained: Node's binary is enough, no node_modules). A Blade theme needs none. The builds can also be made in CI and copied up; without the SSR server the pages are drawn in the browser
Cronphp artisan schedule:run every minute: scheduled posts going live, future actions, backups, Site Health, link checks, booking reminders, unpaid order cancellation and other modules' tasks are on Laravel's schedule
A queue workerphp artisan queue:work kept running: imports, search indexing, "Back up now", webhooks and mail wait for it (QUEUE_CONNECTION=database by default)
Memory2 GB is enough to run a site and build its themes; 4 GB for a shop, several themes or Horizon
Outgoing HTTPSto updates.kitloom.dev, twice a day, so the admin can say a newer kitloom is out (what it sends). On a closed network, KITLOOM_UPDATE_CHECK=false turns it off, or KITLOOM_UPDATE_FEED points it at a mirror

The packages come with your purchase's token, the same one you use on your own machine (see After your purchase). Save it once on the server and on any CI that installs the site; never commit it.

Where to host ​

OptionWho it suitsNotes
DigitalOcean Dropletone site, one server, full controlWhat the kitloom demo runs on. A server: the kit's server target sets it up and deploys, or the same step by step. Managed MySQL, Spaces (S3) for uploads and backups, and uptime checks are a few clicks away in the same account
Laravel Forge on any VPSteams that would rather not run a server by handForge installs PHP, Nginx, MySQL, the queue worker and the scheduler on a server at DigitalOcean, Hetzner, Vultr, Akamai or AWS, and deploys from Git. Forge and Ploi: the kit's forge target writes the deploy script and the environment lines
Ploi on any VPSthe same, from EuropeLike Forge: provisioning, deploys, workers, cron and certificates on your own server; the same page
Hetzner Cloudthe lowest price for the memoryA plain VPS in Germany, Finland, the US or Singapore: a server as on DigitalOcean, from step 2
Laravel Cloudsites that should scale without a server to look afterLaravel's own platform: the app, MySQL, buckets, workers and the scheduler from one dashboard, a deploy on every push. The file system is reset on every deploy, so the uploads go to a bucket. Laravel Cloud: the kit's checklist, and the steps
DigitalOcean App Platformcontainers without a serverThe same as Laravel Cloud for the uploads, which go to Spaces; the queue worker and the scheduler run as separate components. Docker: the kit's digitalocean-app target writes the image and the app spec
AWSa company already on AWSEC2 or Lightsail are a server; ECS, App Runner or any Docker host the image; RDS for MySQL, S3 for the uploads. Below
Any Docker host — Coolify, Fly.io, a VPS with docker composeone image, wherever it runsDocker: the kit's docker target writes the image and a compose file for one host
Shared hostingnot recommendedOnly with SSH, PHP 8.4, Composer and cron. Without a long-running worker, run the queue from cron (queue:work --stop-when-empty every minute)

Several servers behind a load balancer work too: give them a shared cache and session store (Redis) and the uploads on a bucket, and set HEALTH_EPHEMERAL_DISK=true for Site Health to check that nothing is left on one server's disk. See Benchmarks for what a live site switches on.

The deploy kit ​

Every site has kitloom/deploy, and one command writes the deploy files of a target into the project, filled in from the site as it is — which admin and at which path, whether a theme is built with npm, whether the worker runs Horizon, whether the database is WordPress's — so nothing is typed from a page and got wrong for this site:

bash
php artisan kitloom:deploy-kit                  # the targets
php artisan kitloom:deploy-kit server           # one VPS on Ubuntu 24.04
php artisan kitloom:deploy-kit laravel-cloud    # cloud.laravel.com
php artisan kitloom:deploy-kit forge            # Laravel Forge or Ploi on any VPS
php artisan kitloom:deploy-kit docker           # any Docker host: compose, Coolify, AWS ECS / App Runner
php artisan kitloom:deploy-kit digitalocean-app # DigitalOcean App Platform
TargetPageWhat it writes
serverA serverA script that sets the server up (also as cloud-init for the first boot), a Deployer recipe with releases and a rollback, a GitHub Actions or GitLab workflow
laravel-cloudLaravel CloudThe checklist with this site's values, the variables to paste
forgeForge and PloiThe deploy script to paste, the environment lines, the checklist of their screens
dockerDockerDockerfile, the container's Nginx and PHP, compose.yml for one host
digitalocean-appDockerThe image and .do/app.yaml for doctl apps create

Every target writes deploy/README.md, the steps for this site in order. Run the kit again after a change — a Vue theme added, Horizon installed, another domain — and it rewrites its own files, keeping the ones you edited. The kitloom token goes where each page says, never into the repository. The whole of it is also on the module's page, Deploy → How it works, in the admin — and an AI agent can do the deploy for you: With an AI agent.

Passport's keys ​

AI agents sign in to the site with OAuth (AI Agents, on Laravel Passport), and every token they get is signed with Passport's key pair: when it changes, every connected agent is signed out, and two servers with two pairs refuse each other's tokens. The kit keeps the pair on every target:

WhereHow the pair lasts
server, forge (Forge and Ploi)storage/ lasts from one deploy to the next — the server target's shared folder, Forge's and Ploi's site folder — so the deploy makes the pair once with php artisan passport:keys and keeps it
docker, digitalocean-app, laravel-cloudThe disk is reset or there are several instances, so the pair is in the environment: PASSPORT_PRIVATE_KEY and PASSPORT_PUBLIC_KEY, made on your machine
bash
php artisan kitloom:passport-keys

prints PASSPORT_PRIVATE_KEY and PASSPORT_PUBLIC_KEY as one line each (Passport turns the \n back into line breaks), as key:generate --show prints a key: secrets for the platform, never for the repository. The kit writes neither key into its files, so running it again never changes them. Each target's deploy/README.md says how to rotate them.

AWS ​

Nothing on AWS is special to kitloom; the question is which of its services to take:

  • Lightsail or EC2 — one Ubuntu 24.04 machine: the server target, with deploy/cloud-init.yaml as the instance's User data (a filled copy, since it holds the token) — the server comes up set up. Lightsail bundles the machine, a static IP and DNS at a fixed price; EC2 is the same with more choice. With RDS for MySQL instead of MySQL on the machine, run server.sh --without-mysql and put the cluster's address into the server's .env.
  • ECS, App Runner, or Elastic Beanstalk's Docker platform — the docker target's image, built from the Dockerfile with COMPOSER_AUTH as a build-time variable, the worker and the scheduler as services of the same image with their own command, and the uploads on S3 (MEDIA_DISK=s3, the AWS_* variables) because the containers keep nothing on their disk. Docker has the three things that change without a shared disk.
  • S3 for the uploads on any of them, as below with AWS's own endpoint; SES for the mail (MAIL_MAILER=ses).

Updates ​

On Laravel Cloud, a push to the environment's branch is the deploy; with the kit's server target, vendor/bin/dep deploy or the push that runs it. By hand on a server, a deploy of a new version, as deploy in the site's folder:

bash
php artisan down --refresh=15
git pull
composer install --no-dev --optimize-autoloader
npm ci && npm run build
php artisan migrate --force
php artisan optimize
php artisan queue:restart
php artisan inertia:stop-ssr --graceful   # the SSR server comes back on the new bundles
php artisan up

With OPcache's file checks off (opcache.validate_timestamps=0), PHP keeps the old code until PHP-FPM is reloaded: systemctl reload php8.4-fpm as root after the deploy. With preload, run php artisan site:preload and then systemctl restart php8.4-fpm: a reload does not replace preloaded classes. With PHP's defaults neither is needed.

The admin's Updates screen, and the badge on its menu, say when a newer kitloom is out and whether it fixes a security hole (Updates). New versions of kitloom come in through composer update on your machine: you test them, commit composer.lock, and the server installs exactly that. Installing a module is the same kind of change — see Installing Modules. php artisan down closes the site for the minute the deploy takes; for no downtime at all, deploy each version into a folder of its own and switch a link to it, which is what the kit's server target does with Deployer, and what Forge's Envoyer does.

Holding new versions back ​

A package your site depends on can be taken over: someone gets into its author's account and publishes a version that reads your .env and sends it away. Such a version is usually found and pulled within hours or days, so the sites hurt are those that ran composer update in between. Since Composer 2.11, composer update can wait out those days: a cooldown leaves out every version younger than the period you set.

kitloom's own test applications run with a week's cooldown. A new site does not — the starters leave it out, for the first reason below. To turn it on for your site, add to config in its composer.json:

json
"policy": {
    "cooldown": {
        "period": "7 days",
        "ignore": {
            "laravel/nova": "From nova.laravel.com, which gives no publication time"
        }
    }
}

The ignore block is for Kitloom for Nova only; with Filament, leave it out. Then run composer self-update if composer --version is older than 2.11, and composer update --lock once: a changed policy makes the lock file out of date. From then on composer update and composer require pass over what is too new, and composer outdated shows what is still waiting. composer install, and so the server, is not touched: it installs exactly what composer.lock holds.

Composer has to know when every version in a Composer repository was published. Packagist says so, and so does packages.kitloom.dev: the moment it first offered the version, kept on our side, not a date that came with the code. nova.laravel.com does not, so Nova goes under ignore — without the line composer update stops and names the package.

kitloom's packages wait out the week like any other: a release that went up wrongly — a taken-over account, a broken tag — reaches your site only if nobody noticed it for seven days. To take kitloom's releases the day they are out, at the price of that protection, add them under ignore too:

json
"kitloom/*": "kitloom's releases the day they come out"

What it costs:

  • A security fix can leave nothing to install. Composer also refuses versions with a known security advisory. When a fix comes out, every older version is refused at once, and the fixed one is held back by the cooldown: for that week nothing satisfies the requirement, and composer update fails. It is not rare. On 28 October 2026 an advisory for symfony/mime (CVE-2026-45070; Laravel itself requires the package) marked every release before v7.4.22 and v8.1.10, the fixes published that day — so for a full week a project with a 7-day cooldown could not resolve Laravel from scratch. That is why the starters don't have it: laravel new would have failed for anyone who bought kitloom that week. On your site, take the fix by name: composer update symfony/mime --no-cooldown, or put the package under ignore until the week is over.
  • Fixes arrive a week later. A plain composer update takes a security release only once it is a week old, unless you take it by name as above. Watch composer audit and the advisories rather than waiting for the week.
  • What is ignored is not protected. Nova comes in the moment it is released, and so do kitloom's packages if you ignore them. Without the line, a kitloom fix also waits a week: take it by name, composer update 'kitloom/*' --no-cooldown.
  • It needs Composer 2.11. An older Composer reads the same composer.json without a word and holds nothing back, so check composer --version on every machine and CI that runs composer update.
  • A week is a guess. A version that hides its harm longer than the period still gets in. The cooldown narrows the window in which most hijacked releases have been caught; it does not read the code.

For speed on a live site — the page cache, static pages, preload — see Benchmarks.

Uploads on Spaces or S3 ​

Uploads stay in storage/app/public on the server by default. To keep them in DigitalOcean Spaces (or any S3-compatible bucket), behind its CDN:

bash
composer require league/flysystem-aws-s3-v3
ini
MEDIA_DISK=s3
AWS_ACCESS_KEY_ID=…
AWS_SECRET_ACCESS_KEY=…
AWS_DEFAULT_REGION=fra1
AWS_BUCKET=example-media
AWS_ENDPOINT=https://fra1.digitaloceanspaces.com
AWS_URL=https://example-media.fra1.cdn.digitaloceanspaces.com

Move the files that are already there into the bucket before switching. A site on several servers, Laravel Cloud and App Platform need this; a site on one Droplet can leave the uploads where they are.

Several sites on one server ​

With the Multisite module one application answers several domains, a site per domain with a database of its own. The server needs three things more than for one site:

  • DNS: every site's hosts to the server.

  • The web server: every host to the same application, and /storage/ of each host served from that site's uploads folder, storage/sites/<name>/uploads — the application never serves files itself. Caddy, one block for all hosts ({labels.2} is the host's first label when sites are subdomains; name the hosts and folders by hand otherwise):

    example.com, shop.example.com, blog.example.com {
        root * /var/www/example/current/public
        php_fastcgi unix//run/php/php8.4-fpm.sock
        file_server
    }

    Nginx, a map from the host to the site's folder in front of the server block:

    nginx
    map $host $kitloom_uploads {
        default            /var/www/example/current/storage/app/public;
        shop.example.com   /var/www/example/current/storage/sites/shop/uploads;
        blog.example.com   /var/www/example/current/storage/sites/blog/uploads;
    }
    
    server {
        server_name example.com shop.example.com blog.example.com;
        root /var/www/example/current/public;
        location /storage/ { alias $kitloom_uploads/; }
        # … the rest as for one site
    }

    On Spaces or S3 (above) nothing changes: each site's uploads are a prefix of the bucket, sites/<name>/.

  • The deploy: after php artisan optimize, php artisan multisite:optimize builds each site's own caches. The one cron line, schedule:run, and the one queue worker serve every site; a site whose modules differ from the main site's gets a worker of its own, queue:work --site=<name>.

Certificates come as for one site — Caddy fetches them by host; on Nginx, Certbot takes every host of the server block.

Backups ​

  • The server: Droplet backups (step 2) keep whole copies of the server for a few weeks.
  • The site: the Backup module puts the database and the uploads into an archive on a schedule and copies it off the server — to Spaces, S3, SFTP or FTP. Keep at least one copy outside the Droplet.
  • Managed MySQL backs itself up every day.

Watching the site ​

  • Uptime: DigitalOcean's Monitoring → Uptime checks an address from several regions and emails when it is down, slow, or its certificate is about to expire.
  • Errors: the Sentry module sends the site's exceptions to Sentry; without it they are in storage/logs.
  • The site itself: Site Health in the admin checks the database, the cache, the disk and writable folders, the PHP version, the environment, the scheduler and the queue, among others, and emails the site's administration address when one fails.

kitloom — sites on Laravel, built for you and run with AI.
Contact · Services · License · Refunds · Privacy · Community · YouTube · [email protected]