Full-stack

Laravel + React hosting

Laravel with a React frontend (Breeze + Inertia). Deploy to a dedicated VPS in seconds — database auto-created, SSL installed, firewall locked down from the first boot.

Latest

Versions

MySQL / PostgreSQL / MongoDB

Database

Laravel

Category

SSL included
Firewall locked
DB auto-created
Live in minutes
Overview

What is Laravel + React?

Laravel + React is a full-stack setup: Laravel handles routing, data, authentication and the API, and React renders the user interface. The two are joined with Inertia.js, so you build React pages without writing a separate REST API for them.

SharkCluster creates a new Laravel project and installs Laravel Breeze with its React starter. Breeze adds working login, registration, password reset, email verification and profile pages, so you start from a real app instead of an empty project.

The database you choose is connected in .env, the app key is generated, the frontend is built with Vite and the database migrations are run. The web server points at Laravel's public folder.

Choose this when you want a single Laravel codebase with a React interface. If you only need Laravel with Blade views, use the Laravel app; if you need a standalone React app, use the React app.

Quick facts

Version
Latest
Database
MySQL / PostgreSQL / MongoDB
Category
Laravel
  • SSL included
  • Firewall locked
  • DB auto-created
  • Live in minutes
Why SharkCluster

Why Laravel + React on SharkCluster?

Authentication included

Breeze provides login, registration, password reset, email verification and profile pages out of the box.

One codebase

Laravel controllers pass data straight to React pages through Inertia, without a separate API layer.

Built and migrated

Frontend assets are built and the database tables are created during install.

Choice of database

Use MySQL, PostgreSQL or MongoDB; the connection is written to .env for you.

Dark mode

The Breeze React starter is installed with dark mode support.

Features

What you get with Laravel + React

  • Laravel project (the version you select)

  • Laravel Breeze with the React starter

  • Inertia.js and React

  • Vite frontend build

  • Login, registration, password reset and profile pages

  • MySQL, PostgreSQL or MongoDB

  • App key generated and migrations run

  • Document root set to Laravel's public folder

  • Composer and Node.js installed

  • Custom domain support

  • Free SSL certificate

  • SSH and SFTP access

Use cases

What Laravel + React is built for

SaaS products

Start with working authentication and build your product's screens in React.

Dashboards and admin panels

Build interactive internal tools on top of Laravel's data layer.

Customer portals

Give users accounts and a responsive React interface.

Moving from Blade to React

Use Inertia to build new pages in React inside a Laravel app.

System requirements

Server specs for
Laravel + React

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
PHP
PHP 8.1, 8.2 or 8.3 (match the Laravel version you choose).
Node.js
Used to build the frontend; installed during setup.
Database
MySQL, PostgreSQL or MongoDB.
Memory
1 GB RAM minimum; 2 GB recommended for frontend builds.
CPU
1 vCPU minimum; 2 vCPU recommended.
Storage
10 GB+ SSD.
Architecture

How Laravel + React fits together

1

Domain

Your domain or subdomain points to the SharkCluster server.

2

Web server

nginx or Apache serves htdocs/laravel/public and sends requests to Laravel.

3

PHP-FPM

Runs Laravel with the PHP version you selected.

4

Inertia and React

Laravel returns Inertia responses that React renders in the browser.

5

Vite build

Compiled JavaScript and CSS are served from public/build.

6

Database

MySQL, PostgreSQL or MongoDB, configured in .env.

Get started

After your Laravel + React deploy

  1. 1

    Create a Laravel + React application

    Select Laravel + React in the SharkCluster panel and choose the Laravel version, PHP version and database.

  2. 2

    Connect your domain

    Point your domain to the server and enable SSL.

  3. 3

    Register the first user

    Open /register on your domain and create an account.

  4. 4

    Open the project

    Connect over SSH or SFTP; the project is in htdocs/laravel.

  5. 5

    Build your pages

    Add React pages in resources/js/Pages and routes in routes/web.php.

  6. 6

    Rebuild the frontend

    Run npm run build after changing React code.

Deployment

Ship Laravel + React your way

Install tools

Composer and Node.js are installed if missing.

Create the project

composer create-project installs the selected Laravel version.

Configure .env

The selected database connection is written and the app key is generated.

Install Breeze

Laravel Breeze is installed with the React starter and dark mode.

Build assets

npm install and npm run build compile the frontend with Vite.

Migrate

Database migrations create the users and session tables.

Performance

Keeping Laravel + React fast

Cache configuration

Run php artisan optimize after deploys to cache config, routes and views.

Build for production

Always deploy with npm run build, not the Vite dev server.

Use queues

Move slow work such as emails to Laravel queues.

Split React code

Use dynamic imports for large pages to keep bundles small.

Deployment checklist

Before you go live

  • Home page and /login load

  • Registration creates a user

  • Domain DNS points to the server

  • SSL is enabled

  • APP_URL uses https

  • Frontend assets load from public/build

Production checklist

Ready your Laravel + React for launch

  • Set APP_ENV=production and APP_DEBUG=false

  • Configure mail so password resets and verification emails are sent

  • Run php artisan optimize after each deploy

  • Set up a queue worker if you use queues

  • Back up the database

  • Keep Laravel and npm dependencies updated

Useful commands

Working with Laravel + React

Build the frontend

Compile React and CSS for production.

bash
cd htdocs/laravel && npm run build

Run migrations

Apply database migrations.

bash
php artisan migrate --force

Cache for production

Cache configuration, routes and views.

bash
php artisan optimize

Clear caches

Clear cached configuration after changing .env.

bash
php artisan optimize:clear
Troubleshooting

Common Laravel + React issues & fixes

Page loads without styles or scripts

Cause
The Vite build is missing or out of date.
Solution
Run npm install and npm run build in htdocs/laravel.

Vite manifest not found

Cause
public/build/manifest.json does not exist.
Solution
Run npm run build and check the build output for errors.

Password reset emails are not sent

Cause
Mail is not configured.
Solution
Set the MAIL_ variables in .env and run php artisan optimize:clear.

500 error after changing .env

Cause
Cached configuration is stale.
Solution
Run php artisan optimize:clear and check storage/logs/laravel.log.
Security config

Hardened before your first request

Every deploy is locked down from boot — closed firewall, valid SSL, and restricted access by default.

  • Set APP_DEBUG=false in production.

  • Keep .env out of version control.

  • Keep Laravel, Breeze and npm packages updated.

  • Serve the app over HTTPS and set APP_URL to the https address.

  • Use Laravel's built-in CSRF protection and validation.

Database

The data layer behind Laravel + React

MySQL

The default choice; the database and user are created during install.

PostgreSQL

Set as the pgsql connection in .env.

MongoDB

The mongodb/laravel-mongodb package is installed and the connection is set in .env.

Upgrade safely

A safe Laravel + React upgrade path

  1. 1

    Back up

    Back up the database and project files.

  2. 2

    Follow the upgrade guide

    Check Laravel's upgrade guide for the target version.

  3. 3

    Update dependencies

    Run composer update and npm update, then rebuild.

  4. 4

    Migrate and test

    Run migrations and test login and key pages.

Take a snapshot before every upgrade so a bad release can be rolled back in minutes.

Who owns what

We manage the server, you own the store

SharkCluster manages

  • VPS infrastructure
  • PHP-FPM
  • Database server
  • Web server
  • SSL
  • Firewall
  • Backups where enabled

You manage

  • Laravel and React code
  • Composer and npm dependencies
  • Frontend builds
  • .env settings
  • Queues and scheduler
  • Upgrades

Everything below the application line — from nginx to backups — is infrastructure. Your code, content and store configuration are always yours, and you keep full SSH and root access.

FAQ

Frequently Asked Questions

The questions we hear most from people deploying Laravel + React on SharkCluster.

Contact support

A new Laravel project with Laravel Breeze and its React starter (Inertia.js), the selected database connection, a Vite production build and the initial migrations.

Yes. Breeze adds login, registration, password reset, email verification and profile pages.

MySQL, PostgreSQL or MongoDB.

No. React pages live in the Laravel project and are served through Inertia, so there is one codebase and one domain.

The Laravel app gives you a standard Laravel project. Laravel + React also installs Breeze with React and builds the frontend.

Yes. Replace the project in htdocs/laravel with yours, run composer install, npm install, npm run build and migrations.

One-click setup

From deploy to live in minutes

Stack configured

Runtime, process manager and config files set up for you.

MySQL / PostgreSQL / MongoDB 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.

Start your journey today

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.

No lock-in contracts
No credit card required
Dedicated DevOps manager