Laravel Deployment
On KloudBean, you get a complete production-ready stack to host high-performance PHP Laravel applications with ease in just a few steps.
You get:
- Git Integration: Pull your code on the server
- SSH Access: Access to the server to run Composer and Artisan commands
- File Manager Access: Add, update, and manage files with ease
Launch New Laravel Application
If you already have a server and wish to launch an app on it, go to Applications → Add Application and add a Laravel app on the existing server.
In this example, we will create a brand new server.
In order to launch your first Laravel app on a new server, navigate to the server provision page:
- Select Cloud Provider
- Select "Laravel" from application dropdown
- Add Application Name
- Add Server Name
- Select Server size (for Laravel, minimum recommended size is 4GB)

- Click on "Launch" button and proceed with the payment process (trial or payment)
Once payment is completed, server with Laravel app provisioning will be initiated.
Wait for a while; it will take 5-7 minutes to create your server, configure, and deploy a high-performance PHP web stack.
By default, on a new server you will get the following stack versions:
- PHP-FPM: 8.2+
- MariaDB: 10.6+
- Node: 20.X
- Composer: Latest
- Redis: Latest
Access Application Administration
Once your server is ready, in order to access the Laravel app, select "Apps" from the header menu to go to the Applications page.
On this page, you will see your application in active status.

Click on it to navigate to "Application Administration" → "Access" section.
On this section, you will see:
- Application default access URL
- Server public address to point your custom domain to it

Deploy Your Code
The next step is to deploy your code.
In order to deploy your code, navigate to the "Code Delivery" tab.
Here, stay on the first tab, which is "Git Deployment".
Click on "Enable Git Integration" and add your repo URL to connect your repository and clone it.
In this example, I'm going to deploy the open-source Laravel app "BookStack":
https://github.com/BookStackApp/BookStack.git

In order to connect a private repo, read the detailed guide on Connecting Git Repository.
Once the repo is cloned, the next step is to access your code files using the file manager.
Navigate to the third tab "FileManager" and click the "Launch FileManager" button to open it in a new tab.

Once you are in the file manager, here you will see all your files.
Updating .env File
To add variables like site URL and database variables:
- Locate the
.envfile, or rename.env.example, or you can create a new file and name it.envand add environment variables in it.

- Double-click on the
.envfile to edit it. Once the editor opens, update the required variables.
In this example, I updated:
APP_URL=https://laravel-232200300.kloudbeansite.com
# Database details
DB_HOST=localhost
DB_DATABASE=kb_u27hulkz3c
DB_USERNAME=kb_u27hulkz3c
DB_PASSWORD=PydV7ZOqwb612ce469
In order to get database access credetials, read the detailed guide on Viewing Database Credentials.

- Once updated, click on the "Save" icon on the top right corner of the editor, and it will be saved.
Execute Composer and Artisan Commands
The next step is to execute the required Composer and Artisan commands to initialize the application and perform migrations.
In order to execute these commands, you have to SSH into the server to run commands.
To SSH into the server, read our detailed guide: Getting Server Access Credentials.
Once you are connected to the server, execute the cd command to navigate to your application root directory:
cd /home/admin/hosted-sites/<app_system_user>/app-html/
Once you are inside that directory, you can view your files using the command:
ls -l

In this directory, execute the command:
composer install --no-dev

The next step is to execute the command artisan key generate to generate a unique application key.
php artisan key:generate

Now Execute artisan migrate commands to update the database.
php artisan migrate

Done! You can now login using the default admin details [email protected] with a password of password. You should change these details immediately after logging in for the first time.
Congratulations! Your code is deployed and ready to access in a production-ready, high-performance, and secure environment.
Your application is now ready and good to access. Go to "Application Administration" → "Access" → "Access URL", and access your app.
If you see old content, follow the following steps to clear your cache:
Purge Cache
Purge Varnish Cache
To purge Varnish cache, go to "Server Administration" → "Service Management" → Varnish → click "Purge".

Clear App Cache
Execute the following Artisan cache commands:
php artisan cache:clear
php artisan config:clear
php artisan route:clear
php artisan view:clear
Next Steps
- Add a custom domain: Adding Domains and Aliases
- Install SSL certificates: Installing Let's Encrypt Certificates