Skip to main content

SST Laravel Documentation

SST Laravel deploys a Laravel application to AWS Fargate with SST. You describe the application in sst.config.ts with the LaravelService component: a web service, optional workers and Reverb, the environment, and the AWS resources it links to. SST Laravel builds the Docker images and deploys them to your own AWS account.

Start here​

If you are new to the package, read the pages in this order:

  1. Getting Started installs the package, creates sst.config.ts, and deploys a dev stage.
  2. Environment Variables shows how the containers get their .env.
  3. Linking Resources connects a database, Redis, or a bucket.

Everything else can be read as you need it.

Pages​

PageWhat it covers
OverviewWhat gets deployed, the quick start, requirements, and roadmap.
Onboard your agentSet up your coding agent with the SST Laravel skill and deployment instructions.
Why SST LaravelWhat SST is, and what the setup gives you: infrastructure as code, auto-scaling, linked AWS resources, and security.
Getting StartedRequirements, installation, the generated sst.config.ts, the first deploy, and checking it.
WebThe HTTP service: domain, container size, scaling, health check, HTTPS redirect, and access logs.
WorkersHorizon, the scheduler, and custom commands in worker containers or in the web container.
ReverbA dedicated Laravel Reverb service for WebSockets, with its own domain.
Load BalancerThe secure defaults of the load balancer, the IP allowlist, and access logs in S3.
Environment VariablesEnvironment files, SST secrets, RemoteEnvVault (AWS Secrets Manager), and the variables SST Laravel adds.
Linking ResourcesLinked databases, Redis, and buckets, PlanetScale, custom variable names, and IAM permissions.
DeployingThe deploy command, readiness and status checks, PHP settings, the deployment script, and GitHub Actions.
CLIEvery sst-laravel command and its options.
TroubleshootingCommon errors and how to fix them.
API ReferenceEvery LaravelService and RemoteEnvVault option.
Agent SetupThe instructions a coding agent follows to set up and deploy an app.

Conventions​

The examples show only the LaravelService call. It goes inside the run() function of sst.config.ts, with the component imported the same way init does it:

const { LaravelService } = await import("@kirschbaum-development/sst-laravel");

$app.stage is the SST stage you deploy, such as dev or production.