Laravel hosting
Run Laravel on PHP-FPM behind Nginx, with Horizon workers, the scheduler and managed PostgreSQL or Redis. Each deploy installs dependencies, builds assets, runs migrations and switches traffic once health checks pass.
Build and run
- Detected by
- laravel/framework in composer.json
- Build
- composer install --no-dev --optimize-autoloader && npm ci && npm run build
- Start
- php-fpm with Nginx
FROM php:8.3-fpm-alpine
RUN docker-php-ext-install pdo pdo_pgsql opcache pcntl
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
WORKDIR /var/www
COPY . .
RUN composer install --no-dev --optimize-autoloader
RUN php artisan config:cache && php artisan route:cache && php artisan view:cache
EXPOSE 9000
CMD ["php-fpm"]Recommendations
- Set the release command to php artisan migrate --force.
- Run Horizon as a worker process and add the scheduler as a cron entry in 9live.toml.
- One managed Redis instance can handle cache, sessions and queues on Launch.
- Octane with Swoole or FrankenPHP works with a custom Dockerfile.
Plans
| Plan | Price | vCPU | Memory | NVMe | Databases | Backups |
|---|---|---|---|---|---|---|
| Launch | $149/mo | 8 | 16 GB | 160 GB | 1 | Daily, kept 7 days |
| Grow | $249/mo | 12 | 32 GB | 320 GB | 2 | Daily, kept 14 days |
| Scale | $349/mo | 16 | 48 GB | 500 GB | 3, plus a read replica | Hourly and daily, kept 30 days |
| Custom | On request | As required | Up to a full server | As required | As required | As required |
Questions
Do you offer managed MySQL?
Not yet. Laravel runs well on PostgreSQL, and converting a MySQL schema is part of the migration we provide. Managed MySQL is planned.
Do we need a Dockerfile to deploy Laravel?
No. 9live detects Laravel and builds it with a maintained buildpack. If your repository has a Dockerfile, we use it instead.
How are environment variables managed?
Set them per environment in the dashboard or with the CLI. They are encrypted at rest and injected at runtime. Connection strings for managed databases are added automatically.
What happens when a deploy fails?
If the build fails, or the new release fails its health check, the current release keeps serving traffic. You get a notification with the build or health-check logs.
Other frameworks
Talk to an engineer about your setup
Tell us what you run today and where it runs. We reply within one business day with a recommended plan and an estimate for the migration.
