Documentation

Visit Our xCloud Knowledge Base

Here is your one-stop source for in-depth articles, FAQs, and tutorials for you to excel at hosting & managing your websites.


How to Set Up Laravel on DigitalOcean Server with xCloud?

Laravel is a popular PHP framework for building modern web applications. With DigitalOceanโ€™s cloud hosting and xCloudโ€™s oneโ€‘click deployment, you can set up Laravel on DigitalOcean Server quickly and manage it with ease. This guide walks you through the process step by step.

First, set up your DigitalOcean server in xCloud. Follow these steps to get started.

How to Setup A DigitalOcean Server in xCloud? #

This guide shows how to set up a DigitalOcean server in xCloud. Follow the steps to quickly launch, configure and start your cloud journey.

Step 1: Create Your New DigitalOcean Server in xCloud #

After logging in to your xCloud account, start by adding a new server by clicking on the โ€œAdd New Serverโ€ button from your dashboard.

Create Your New DigitalOcean Server in xCloud

The next screen will provide the list of our available server providers. For tutorial purposes, we will create a Digital Ocean server and for that select the DigitalOcean option. The billing of the server will be handled on your Digital Ocean account.

Note: Donโ€™t have a DigitalOcean account? Check out the documentation below to find out how to provision a server with any providers:

Weโ€™ve made it easier and safer for you to connect xCloud with your DigitalOcean account. You no longer have to go through the hassle of generating and copying access tokens. 

Now, xCloud will guide you through an OAuth flow, where you simply authorize xCloud to use your DigitalOcean account. 

Bring and Manage Your Own Server-DigitalOcean

All you have to do is provision a new DigitalOcean server, click โ€œAuthorizeโ€ during the setup, and youโ€™ll be redirected to DigitalOcean to grant permission to your account. Itโ€™s a straightforward and hassle-free process to set up your server with Digital Ocean.

Authorize on DigitalOcean

Step 3: Add Necessary Information #

You will be taken to the server creation page after successfully integrating your DO account. Now you need to provide the Server name, your preferred Server Size (CPU, RAM, Storage) and Region nearest to you and your visitors. Only, MySQL 8.0 database server is now available. 

By default Database, the โ€˜Rootโ€™ Password is auto-filed but you can change this and save it in a safe place.

We recommend at least a 2GB/ 1 shared CPU server for 10-20 sites with cache enabled. And for a site whose pages cannot be cached (e.g. WooCommerce site) we recommend a 4 GB / 2 dedicated CPUs server.

Set up your with DigitalOcean

We are almost done with our server creation of Digital Ocean in xCloud. After submitting the form this might take up to 12-15 minutes to make the Digital Ocean server live and ready to install a lightning fast WordPress Site.

Setting up your server

If you already have a DigitalOcean server, you can skip the first phase and proceed directly to the second. Follow these steps to get started.

How to Set Up Laravel on DigitalOcean Server: Deploy Laravel Applications with xCloud #

Deploying a Laravel application can feel complex, with multiple steps and detailed setup. This guide walks you through everything from configuration to deployment, so you can set up Laravel on DigitalOcean Server.

Step 1: Choose Your Server  #

Begin by logging into your xCloud account. Once logged in, navigate to your dashboard and click on the โ€˜Add New Siteโ€™ button.

You will then be asked to โ€˜Choose a Server to add Siteโ€™ from the dropdown. You must select the DigitalOcean server you set up in xCloud from this dropdown.

Choose a server to add site

Step 2: Go to The Laravel Tab #

Then navigate to the โ€˜Laravelโ€™ tab to deploy your Laravel applications. Now, choose โ€˜Clone A Git Repositoryโ€™ to import your custom PHP site. 

Go to The Laravel Tab

Step 3: Set Up Domains #

From the โ€˜Domainsโ€™ tab, you will get two options: either you can create a โ€˜Demo Siteโ€™ with a test domain and refine it until it is ready for launch or you can migrate into a new domain to get your site up and running in a new domain. 

Or you can create your site with your live domain; you need to select the โ€˜Migrate into a New Domainโ€™ option. Then you have to put โ€˜New Site Titleโ€™ and โ€˜Domain Nameโ€™. Here we are choosing the โ€˜Demo Siteโ€™ domain. Then click on โ€˜Nextโ€™.

Step 4: Settings to Manage Database #

Now, you will be sent to the โ€˜Settingsโ€™ step. Make sure to correctly add your โ€˜PHP Versionโ€™, โ€˜Site Userโ€™, โ€˜Web rootโ€™.

Settings to Manage Database

Now, it is time for database management. You will get three options. You can either create a new database on the server, you can add your existing database that is hosted on another server.

You can also proceed without any database. For this tutorial, we are going with the โ€˜Create Database In Serverโ€™ option. 

If you select this option, enter your โ€˜Database Nameโ€™, โ€˜Database Usernameโ€™ and โ€˜Database Passwordโ€™. You can keep these auto-generated credentials or you can modify them according to your choice. 

enter your Database Name, Database Username and Database Password

After selecting any one option and providing all essential information and credentials, click on โ€˜Nextโ€™.

Step 5: Insert Git Repository Credentials #

In the โ€˜Git Repoโ€™ tab, add your โ€˜Git Repositoryโ€™ and โ€˜Git Branchโ€™. Also, toggle on the โ€˜Enable push to deployโ€™ option. Once you enable the โ€˜Push To Deployโ€™, it will generate a โ€˜Deployment URLโ€™. We can use this URL to CICD pipeline and copy the โ€˜Deployment URLโ€™ from here.

URL to CICD pipeline and copy the Deployment URL from here.

Step 6: Add the Deployment URL to the Git Repository #

Now, go to your Git repository. From the โ€˜Codeโ€™ tab, go to the โ€˜Settingsโ€™ tab and click on the โ€˜Webhooksโ€™ page from the โ€˜Code and Automationโ€™ section of the left navigation. Insert the deployment URL into the โ€˜Payload URLโ€™ field. Select โ€˜application/jsonโ€™ from the โ€˜Content typeโ€™ dropdown. 

Note: This step is optional. Adding a webhook enables automatic deployments when you push changes to the repository but itโ€™s not required if you prefer to deploy manually.

Add the Deployment URL to the Git Repository

Step 7: Add Public Key to Git Repository #

Next in the โ€˜Deploy Scriptโ€™ field any script that needs to be executed after the site is deployed. For example, you can use it to install dependencies or run database migrations.

Next, in the โ€˜Deploy Scriptโ€™ field, specify any commands that need to be executed after the site is deployed.

If your project uses PHP, you can specify the version (e.g., php8.1) and run Composer along with Laravel-specific commands like this:

php8.1 $(which composer) install --no-interaction --prefer-dist --optimize-autoloader --no-dev

php8.1 artisan migrate --force

php8.1 artisan optimize:clear

If your project also involves Node.js, you can include additional commands as well. These scripts ensure that your backend and frontend are fully prepared after deployment.

scripts ensure that your backend and frontend are fully prepared after deployment.

From the xCloud dashboard, copy the โ€˜Public Keyโ€™ to add it to your Git repository as a deploy key. Git migration uses the โ€˜Public Keyโ€™ for SSH authentication. This is necessary to enable xCloud to access your Git repository and clone it. It ensures secure and authorized access for the cloning process.

Run the script after every site deployment

Now, again, go to your Git Repository. From the โ€˜Codeโ€™ tab, go to the โ€˜Settingsโ€™ tab and click on โ€˜Deploy Keysโ€™ in the security section of the left navigation. Click on the โ€˜Add keyโ€™ button and paste the key that you copied from xCloud. 

Click on the Add key button and paste the key that you copied from xCloud.ย 

After inserting the deploy key in GitHub, click on โ€˜Nextโ€™ on your xCloud settings of the โ€˜Git Repoโ€™ tab.  

After inserting the deploy key in GitHub, click on Next on your xCloud settings of the Git Repo tab.

Step 8: Confirm Migrating The Website #

Now, to start the migration process, click on the โ€˜Startโ€™ button. After clicking the migration process will start and you will see the progress of migration. 

Once the migration is successfully complete will see the following screen. You go to the site dashboard from there. Go to the โ€˜Laravelโ€™ Option from the menu and customize the โ€˜Applicationโ€™ and โ€˜Environmentโ€™ as your preferences.

Go to the Laravel Option from the menu and customize the Application and Environment

Check out the other features of Laravel:

Configure Laravel Scheduler with cron job for your Laravel projects with ease. Check out this documentation for more details: 

Configure Laravel Scheduler with cron job

And thatโ€™s it. This is how easily you can successfully deploy your Laravel application on xCloud. Now you can go to your site dashboard from xCloud and customize according to your preferences.

If you are still stuck, feel free to contact our support team.

What are your feelings

Updated on January 8, 2026

Server Name

RAM

SSD

xCloud Provider Price/m
(For LTD users)

VULTR Price/m

DO Price/m

Newcomer

1GB

25GB

$4.50

$5.00

$6.00

Basic

2GB

55GB

$9.00

$10

$12.00

Standard

4GB

80GB

$18.00

$20

$24.00

Professional

8GB

160GB

$36.00

$40

$48.00

Business

16GB

320GB

$72.00

$80

$96.00

Server Name

RAM

SSD/NVMe

xCloud Provider Price/m
(For LTD users)

VULTR Price/m

DO Price/m

Lite

1GB

32GB

$5.40

$6.00

$8.00

Personal

2GB

88GB

$16.20

$18.00

$24.00

Growing

4GB

128GB

$21.60

$24.00

$32.00

Elite

8GB

256GB

$43.20

$48.00

$64.00

Titanium

8GB

384GB

$86.40

$96.00

$96.00

Ultimate

32GB

512GB

$172.80

$192.00

$192.00