Laravel hosting
Modern PHP framework for building web applications and APIs. Deploy to a dedicated VPS in seconds — database auto-created, SSL installed, firewall locked down from the first boot.
9 – 13
Versions
MySQL
Database
Laravel
Category
What is Laravel?
Laravel is a modern PHP framework designed for building web applications, APIs, admin panels, SaaS platforms, e-commerce systems and other server-side applications. It provides developers with an organized application structure and built-in tools for routing, authentication, database access, queues, caching, validation, mail, events and scheduled tasks.
Unlike a plain PHP application where developers typically build many application components themselves, Laravel provides conventions and reusable components that make larger applications easier to develop and maintain. It uses Composer for dependency management and commonly uses Eloquent ORM for database operations.
A Laravel application is normally served from its public directory rather than exposing the entire project directory to the web. This protects files such as .env, composer.json, application source code and configuration from direct public access.
SharkCluster provides the server environment around your Laravel application. You can deploy an existing Laravel project, select a compatible PHP runtime, configure MySQL, point your domain to the application's public directory, enable HTTPS and manage background workers and scheduled tasks.
Quick facts
- Version
- 9 – 13
- Database
- MySQL
- Category
- Laravel
- SSL included
- Firewall locked
- DB auto-created
- Live in minutes
Why Laravel on SharkCluster?
Laravel-ready PHP environment
Deploy Laravel with a PHP-FPM environment and Composer so your application can use the runtime and dependencies required by its Laravel release.
Correct document root
Laravel applications are configured to serve the public directory, keeping application source code and environment configuration outside the public web root.
Composer included
Install Laravel dependencies with Composer using your project's composer.json and composer.lock files.
MySQL ready
Connect your Laravel application to a MySQL database and configure database credentials through the application's environment settings.
Queue worker ready
Run Laravel queue workers for emails, notifications, imports, reports and other background jobs without keeping long-running work inside web requests.
Scheduler ready
Use Laravel's scheduler with a server cron entry to run recurring application tasks from one centralized schedule.
Production optimization
Use Laravel's configuration, route, event and view caching features as appropriate for production deployments.
Developer-friendly access
Use SSH, Artisan, Composer and standard Linux tools to deploy, inspect and troubleshoot your application.
SSL included
Connect your domain and enable HTTPS using a free Let's Encrypt certificate.
What you get with Laravel
Deploy Laravel applications from Git, ZIP or SSH
Laravel 9–13 support where the selected PHP version and dependencies are compatible
PHP-FPM runtime
Composer 2 support
Laravel Artisan CLI access
MySQL database support
Redis support where enabled
Laravel queue worker support
Laravel scheduler support
Custom domain and subdomain support
Laravel public directory document root
Free Let's Encrypt SSL
Git-based deployment workflow
Environment configuration through .env
Application log access
Cron configuration for scheduled tasks
Dedicated application system user
Production deployment and optimization workflow
What Laravel is built for
SaaS applications
Build and host subscription platforms, dashboards, customer portals and multi-user business applications.
REST APIs
Create APIs for web applications, mobile applications, third-party integrations and internal services.
Business applications
Build CRM, ERP, inventory, accounting, HR and other custom business applications.
E-commerce platforms
Develop custom shopping, ordering and marketplace applications with Laravel and a relational database.
Admin panels
Create secure administrative interfaces for managing users, content, products, orders and application data.
Booking systems
Build appointment, reservation, scheduling and availability management applications.
Content platforms
Deploy blogs, publishing platforms, knowledge bases and content management applications.
Background processing
Use Laravel queues for email delivery, file processing, imports, exports, notifications and other asynchronous workloads.
Server specs for
Laravel
Not sure which plan to pick? The panel warns you before you deploy so you can choose the right size the first time.
- Minimum specs shown before deploy
- Panel blocks deploy if server is undersized
- Upgrade path available inside the panel
- Laravel 13
- PHP 8.3 or newer, with the PHP extensions required by the application
- Laravel 12
- PHP 8.2 or newer, with the PHP extensions required by the application
- Laravel 11
- PHP 8.2 or newer
- Laravel 10
- PHP 8.1 or newer
- Laravel 9
- PHP 8.0 or newer
- Database
- MySQL compatible with your Laravel application's database requirements
- Dependency manager
- Composer 2
- Web server
- nginx with PHP-FPM
- Development server
- 1–2 vCPU · 2 GB RAM for a lightweight development application
- Small production application
- 2 vCPU · 4 GB RAM or more depending on traffic and background jobs
- Medium production application
- 4 vCPU · 8 GB RAM or more depending on traffic, database size and queue workload
- High workload application
- 4–8+ vCPU · 16+ GB RAM depending on traffic, workers, database and application workload
How Laravel fits together
Domain
Your domain or subdomain points to the SharkCluster server through DNS.
nginx
nginx receives HTTP and HTTPS traffic, serves static files and forwards PHP requests to PHP-FPM.
Laravel public directory
The web server should point to the Laravel project's public directory, which contains the application's public entry point and static assets.
PHP-FPM
PHP-FPM executes Laravel requests using the PHP version selected for the application.
Laravel application
Laravel handles routing, middleware, authentication, validation, business logic, database operations, APIs and other application functionality.
MySQL
Laravel can use MySQL for users, application records, configuration, transactions and other persistent data.
Redis
Redis can be used for caching, queues, sessions and other supported Laravel workloads when enabled.
Queue workers
Long-running background jobs can be processed by Laravel queue workers managed by the server.
Scheduler
Laravel's scheduler can trigger recurring application commands through a server cron entry.
Match your runtime to Laravel
Match Laravel and PHP versions
Laravel releases have specific PHP requirements. Select a PHP runtime compatible with the Laravel version and all Composer dependencies used by your application.
Laravel 13
Laravel 13 requires PHP 8.3 or higher. Verify third-party packages before upgrading an existing application.
Laravel 12
Laravel 12 requires PHP 8.2 or higher. Check your application's dependencies and extensions before changing the runtime.
Older Laravel releases
Laravel 9, 10 and 11 have older PHP requirements. Existing applications may continue to require their original runtime, but upgrading to a supported Laravel and PHP release should be considered for security and maintenance.
Test PHP upgrades
Do not change the PHP version of a production Laravel application without testing the application and its Composer dependencies first.
After your Laravel deploy
- 1
Choose a compatible PHP version
Select a PHP version supported by your Laravel release and your application's Composer dependencies.
- 2
Deploy your Laravel project
Upload the application using Git, ZIP, SSH or your preferred deployment workflow.
- 3
Set the document root
Configure the domain to point to the Laravel project's public directory instead of the project root.
- 4
Configure the environment
Create and configure the .env file with application URL, database credentials, cache, queue, mail and other environment-specific settings.
- 5
Install dependencies
Run Composer installation using the application's lock file to install the exact dependency versions tested by the project.
- 6
Generate the application key
For a new Laravel application that does not already have an application key, generate one with php artisan key:generate.
- 7
Configure the database
Create or connect the MySQL database and run the application's migrations when required.
- 8
Configure storage
If the application uses the public local filesystem disk, create the storage symlink with php artisan storage:link.
- 9
Configure queues
If the application uses queued jobs, configure a queue connection and run one or more persistent Laravel queue workers.
- 10
Configure the scheduler
Add the Laravel scheduler to server cron so scheduled application tasks execute automatically.
- 11
Enable HTTPS
Connect the domain and enable a Let's Encrypt SSL certificate before sending production traffic to the application.
- 12
Optimize for production
Cache appropriate Laravel configuration, routes, events and views after verifying that the application is ready for production.
Ship Laravel your way
Git deployment
Pull the application source from your Git repository, install dependencies and execute the required Laravel deployment commands.
ZIP deployment
Upload the project archive, extract it on the server and configure the Laravel public directory as the document root.
Composer installation
For production deployments, use composer install with the project's composer.lock file rather than unexpectedly changing dependency versions.
Database migration
Run Laravel migrations when the deployment contains database schema changes. Review migrations before applying them to production.
Asset compilation
If the application uses Vite or another frontend build system, install the required Node.js dependencies and build production assets as part of the deployment process.
Cache optimization
After deployment, cache the application configuration and other appropriate Laravel resources for production.
Queue restart
After deploying new application code, restart or gracefully reload long-running queue workers so they use the new code.
Laravel deployment step by step
- 1
Backup
Create a current application and database backup before deploying significant changes.
- 2
Pull code
Deploy the approved Git commit or release artifact to the server.
- 3
Install dependencies
Run Composer with the project's lock file and production dependency settings.
- 4
Build assets
Compile production frontend assets when the application uses Vite or another frontend build process.
- 5
Run migrations
Apply reviewed database migrations when the release requires schema changes.
- 6
Clear and rebuild caches
Clear stale Laravel caches and rebuild the production caches required by the application.
- 7
Restart workers
Gracefully restart queue workers so they load the newly deployed application code.
- 8
Verify
Test the application, database, authentication, queues, scheduled tasks, email and critical business workflows.
Keeping Laravel fast
Enable OPcache
PHP OPcache stores compiled PHP bytecode in shared memory and can reduce repeated compilation work for PHP applications.
Cache Laravel configuration
Use Laravel's configuration cache in production after confirming that the application's environment configuration is correct.
Cache routes and views
Route and view caching can reduce framework startup work for suitable production applications.
Use Redis where appropriate
Redis can provide fast cache, session and queue storage for applications that need it.
Move slow work to queues
Do not make users wait for expensive email, report, import, export or external API operations when they can be processed asynchronously.
Optimize database queries
Review slow queries, indexes, relationships and eager loading before simply increasing server resources.
Control queue workers
Too many workers can consume available CPU and memory. Size worker concurrency according to job workload and server capacity.
Optimize frontend assets
Build and serve production CSS and JavaScript assets instead of development bundles when deploying a live application.
Monitor resources
Monitor CPU, RAM, disk usage, PHP-FPM activity, queue workers, database performance and application logs.
Background job processing
Why use queues?
Queues move slow operations such as emails, notifications, imports, exports, image processing and API synchronization out of the user's HTTP request.
Run workers continuously
Production queue workers should be supervised by a service or process manager so they restart automatically after failure or server reboots.
Restart after deployment
Long-running workers keep application code in memory. Restart them after deploying new code so they begin using the latest application version.
Use appropriate worker limits
Configure worker processes, retry behavior, timeout and memory limits based on the application's jobs and available server resources.
Monitor failed jobs
Monitor failed queue jobs and investigate recurring failures rather than allowing the failed-job list to grow indefinitely.
Scheduled tasks
Server cron
Laravel's scheduler normally requires a recurring server cron entry that invokes the application's scheduler command.
Scheduled commands
Use the scheduler for recurring cleanup, reports, notifications, synchronization, imports and other application tasks.
Avoid duplicate cron jobs
Keep the scheduler configuration centralized so the same task is not accidentally registered multiple times.
Check scheduled tasks
Use php artisan schedule:list to verify the tasks configured by the application.
Ready your Laravel for launch
Use a Laravel release and PHP version compatible with the application
Point the domain to the Laravel public directory
Enable HTTPS
Set APP_ENV=production where appropriate
Set APP_DEBUG=false
Configure a secure APP_KEY
Configure MySQL credentials
Run composer install with the production dependency set
Review and apply required database migrations
Create the storage symlink if required
Configure storage permissions
Cache Laravel configuration
Cache routes when compatible with the application
Cache views
Build production frontend assets
Configure queue workers if the application uses queues
Configure Laravel scheduler through server cron
Configure SMTP / transactional email
Configure backups
Enable firewall rules
Review PHP-FPM and web-server configuration
Remove development and test files that should not be public
Test authentication and authorization
Test forms and validation
Test database operations
Test file uploads
Test queues and scheduled tasks
Test email delivery
Review application and server logs
Monitor CPU, RAM, disk and database usage
Laravel in production
Install Composer dependencies
Install the locked production dependencies defined by composer.lock.
composer install --no-dev --optimize-autoloaderGenerate application key
Generate the Laravel application encryption key for a new application. Do not run this casually on an existing production application because changing APP_KEY can invalidate encrypted data and sessions.
php artisan key:generateRun database migrations
Apply pending migrations in a non-interactive production deployment. Review migrations before running them.
php artisan migrate --forceCreate storage link
Create the public storage symlink when the application uses Laravel's public local storage disk.
php artisan storage:linkCache configuration
Cache Laravel configuration for production. Environment values should be available when this command runs.
php artisan config:cacheCache routes
Cache routes when the application's route definitions are compatible with route caching.
php artisan route:cacheCache views
Precompile Blade views to improve startup work for production requests.
php artisan view:cacheCache events
Cache discovered events when the application uses Laravel's event discovery and the deployment workflow supports event caching.
php artisan event:cacheStart a queue worker
Start a Laravel queue worker. In production, run queue workers under a process manager or service manager so they are restarted automatically.
php artisan queue:workRestart queue workers
Tell Laravel queue workers to gracefully restart after they finish their current job. This is useful after deploying new application code.
php artisan queue:restartRun scheduler manually
Run Laravel's scheduled tasks for the current minute. The command is normally triggered automatically by server cron.
php artisan schedule:runList scheduled tasks
Inspect the application's configured scheduled tasks and their upcoming execution times.
php artisan schedule:listClear application caches
Clear Laravel's cached configuration, routes, views and other framework caches when troubleshooting or preparing a deployment.
php artisan optimize:clearCommon Laravel issues & fixes
403 Forbidden
- Cause
- The web server may be pointing to the wrong directory or filesystem permissions may prevent access.
- Solution
- Verify that the domain points to the Laravel public directory and review application ownership and permissions.
404 for Laravel routes
- Cause
- The web server may not be forwarding unknown URLs to Laravel's front controller.
- Solution
- Verify the nginx or Apache rewrite/front-controller configuration and ensure requests are routed through public/index.php.
502 Bad Gateway
- Cause
- nginx cannot communicate with PHP-FPM.
- Solution
- Check the PHP-FPM service, configured socket or FastCGI endpoint and PHP-FPM logs.
500 Internal Server Error
- Cause
- The application may have a PHP exception, missing dependency, incorrect environment configuration or permission problem.
- Solution
- Check storage/logs/laravel.log and the web-server/PHP logs. Keep APP_DEBUG disabled on production.
No application key
- Cause
- The Laravel environment does not contain a valid APP_KEY.
- Solution
- For a new application, configure the .env file and run php artisan key:generate. Do not regenerate the key on an existing production application without understanding its impact.
Database connection refused
- Cause
- Database credentials, hostname, port or MySQL availability may be incorrect.
- Solution
- Verify DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD, then check the database service.
Class not found
- Cause
- Composer dependencies may not have been installed or the autoloader may be outdated.
- Solution
- Run composer install using the correct PHP version and verify that vendor/autoload.php exists.
Storage files return 404
- Cause
- The public storage symlink may not exist or the application may be storing files in a different disk.
- Solution
- Check the configured filesystem disk and run php artisan storage:link when using the public local disk.
Queue jobs are not processing
- Cause
- No worker may be running, the queue connection may be misconfigured or the worker may be failing.
- Solution
- Check the queue configuration, failed jobs, worker process and application logs.
Queue worker still uses old code
- Cause
- Long-running Laravel workers can keep previously loaded application code in memory.
- Solution
- Run php artisan queue:restart and ensure your process manager starts the worker again.
Scheduled tasks are not running
- Cause
- The server cron entry may be missing or the scheduler command may be configured incorrectly.
- Solution
- Check the cron configuration and run php artisan schedule:list and php artisan schedule:run manually for testing.
CSS or JavaScript is missing
- Cause
- Production frontend assets may not have been built or the public asset paths may be incorrect.
- Solution
- Install the project's Node dependencies and run its production build command, then verify the generated assets.
Permission denied in storage
- Cause
- Laravel cannot write to a required storage or cache directory.
- Solution
- Review ownership and permissions for storage and bootstrap/cache without making the entire project world-writable.
Hardened before your first request
Every deploy is locked down from boot — closed firewall, valid SSL, and restricted access by default.
Use a Laravel and PHP version that is still supported whenever possible.
Point the web server to the Laravel public directory rather than the project root.
Never expose the .env file through the public web server.
Keep APP_DEBUG=false in production.
Use HTTPS for the entire application.
Protect APP_KEY and other secrets from source control and public access.
Use Laravel's built-in authentication and authorization mechanisms or carefully reviewed authentication packages.
Validate and authorize user input before performing sensitive operations.
Use Laravel's CSRF protection for browser-based state-changing requests.
Use prepared queries or Eloquent/query-builder parameter binding instead of concatenating untrusted SQL values.
Keep Composer dependencies updated and review security advisories.
Use least-privilege filesystem permissions.
Make only the required storage and cache directories writable by the application.
Do not run Laravel or Composer as root unless there is a specific administrative requirement.
Protect queue workers and scheduled commands from unauthorized execution.
Do not expose Laravel logs through the public web server.
Use strong database credentials and restrict database access to trusted hosts where possible.
Keep regular backups of application data and databases.
The data layer behind Laravel
MySQL support
Laravel supports relational databases through its database layer, including MySQL. Configure the database connection through the application's environment settings.
Migrations
Laravel migrations provide a version-controlled way to create and modify database tables and indexes.
Seeders
Seeders can populate development, testing or controlled production data when appropriate.
Transactions
Use database transactions when multiple related database changes must succeed or fail together.
Backups
Back up the database independently from application files so application data can be restored if the database is lost or corrupted.
File storage for Laravel
Public storage
When using Laravel's public local filesystem disk, run php artisan storage:link to expose the appropriate storage directory through the application's public directory.
Private files
Keep sensitive documents outside the publicly accessible directory and serve them through authorized application endpoints when necessary.
File permissions
Only directories that Laravel actually needs to write to should be writable by the application user.
Large uploads
Review PHP upload limits, PHP-FPM request limits, web-server settings and available disk space when handling large files.
Laravel environment configuration
.env configuration
Laravel uses environment variables for environment-specific values such as database credentials, application URL, mail configuration, cache, queues and external services.
Never commit secrets
Do not commit production passwords, API keys or other secrets to a public or shared Git repository.
Production debug setting
Set APP_DEBUG=false in production so detailed application errors are not exposed to visitors.
Application key
APP_KEY is used by Laravel's encryption system. Protect it carefully and do not regenerate it on an existing production application without understanding the consequences.
Frequently Asked Questions
The questions we hear most from people deploying Laravel on SharkCluster.
Contact supportLaravel is a PHP framework for building web applications, APIs, SaaS platforms, admin panels and other server-side applications. It provides tools for routing, database access, authentication, queues, caching, validation, mail and scheduled tasks.
The PHP requirement depends on the Laravel release. Laravel 13 requires PHP 8.3 or newer, Laravel 12 and 11 require PHP 8.2 or newer, and Laravel 10 requires PHP 8.1 or newer. Always verify the exact requirements of your Laravel release and Composer dependencies before deployment.
Yes. You can deploy an existing Laravel project using Git, ZIP or SSH. Configure the compatible PHP version, Composer dependencies, .env file, database, public document root, storage and any required queue or scheduler workers.
The web server should point to the application's public directory, for example /path/to/your-project/public. The Laravel project root should not normally be exposed directly to the internet.
Yes. Laravel applications use Composer to manage PHP dependencies. Production deployments should normally install the dependencies defined by composer.lock.
Yes. Laravel supports MySQL through its database layer. Configure the database connection using the application's environment variables and run the required migrations.
Yes. Laravel can use Redis for supported cache, session and queue workloads. The exact configuration depends on your Laravel version and application architecture.
Laravel Queue allows slow or resource-intensive tasks to run in the background instead of making users wait for the HTTP request to finish. Common examples include emails, notifications, imports, exports and external API processing.
Yes. If your application uses queued jobs, one or more queue workers need to process those jobs. In production, workers should normally be managed by a process or service manager so they restart automatically.
Laravel Scheduler provides a centralized way to define recurring application tasks. A server cron entry invokes Laravel's scheduler so the configured tasks can run automatically.
Laravel's public directory contains the public entry point and assets. Pointing the web server there helps prevent sensitive application files such as .env, configuration and source code from being directly exposed.
A 502 usually means nginx cannot communicate with PHP-FPM. Check that the correct PHP-FPM service is running and that the web-server configuration points to the correct PHP-FPM socket or FastCGI endpoint.
A 500 error can be caused by a PHP exception, missing Composer dependency, invalid .env configuration, missing PHP extension or filesystem permission problem. Check storage/logs/laravel.log and the server's PHP/web-server logs.
Laravel needs write access to specific runtime directories such as storage and bootstrap/cache. Verify ownership and permissions for those directories instead of making the entire project writable.
Check that the configured queue connection is correct and that a queue worker is running. Also inspect failed jobs and Laravel logs for errors.
Queue workers are long-running processes and may continue using code loaded before a deployment. Run php artisan queue:restart and ensure your process manager starts the worker again.
No. APP_KEY should normally remain stable for an existing application. Generate it when setting up a new application that does not already have a valid key. Changing APP_KEY on an existing application can make previously encrypted data or sessions unreadable.
No. APP_DEBUG should normally be false in production. Detailed application errors can expose sensitive information about your application and server.
Yes, when the Laravel release and all application dependencies support the target PHP version. Test the application and Composer dependencies before changing the production runtime.
Yes. Multiple Laravel applications can share a VPS when sufficient CPU, RAM and storage are available. Each application should have its own document root, domain configuration, environment configuration and appropriate filesystem permissions.
SharkCluster manages the server and deployment environment. Your Laravel source code, business logic, Composer dependencies, database schema, extensions, integrations and application-specific configuration remain under your control.
From deploy to live in minutes
Stack configured
Runtime, process manager and config files set up for you.
MySQL wired
Database created with a user and credentials in your config.
SSL + firewall
Free Let's Encrypt certificate and closed-by-default UFW rules.
Deploy anytime
Push with Git, or use the built-in file manager and ZIP upload.
Other applications you can deploy
How do you start
with SharkCluster?
To start with SharkCluster, create an account and your first server on DigitalOcean, Contabo or OVHcloud — no credit card or lock-in contract is needed. Every account includes free self-hosted business apps, free local backups, unlimited migrations and a dedicated DevOps manager.