---
title: "How to create and import a Lovable website on an OVHcloud VPS"
url: https://docs.ovhcloud.com/es/guides/bare-metal-cloud/virtual-private-servers/import-lovable-website-on-vps
lang: es
lastUpdated: 2025-08-18
---
# How to create and import a Lovable website on an OVHcloud VPS

## Objective

[Lovable](https://lovable.dev) is a tool you can use to generate websites from prompts. This guide explains how to import and publish a website generated via Lovable on an OVHcloud VPS.

## Requirements

- A [Virtual Private Server](https://www.ovhcloud.com/es-es/vps/) in your OVHcloud account
- Administrative access (sudo) via SSH to your server
- You must have an account on [Lovable](https://lovable.dev)

## Instructions

### Summary

- [Step 1: Build your website on Lovable.dev](#step1)
- [Step 2: Export your website via GitHub and retrieve it](#step2)
- [Step 3: Upload the archive to the VPS](#step3)
- [Step 4: Install Node.js and the necessary tools](#step4)
- [Step 5: Unzip and build your website](#step5)
- [Step 6: Deploy your website](#step6)
- [Step 7: Install and configure the web server](#step7)
- [Step 8: Access your website](#step8)
- [Conclusion](#conclusion)
- [Go further](#go-further)

### Step 1: Build your website on Lovable.dev [](#)
1. Go to [https://lovable.dev](https://lovable.dev).
2. Create an account if you have not already done so.
3. Enter your prompt to build your website.

### Step 2: Export your website via GitHub and retrieve it [](#)
Once your website has been generated by Lovable, export it via GitHub. In the main Lovable interface, click on the GitHub icon (`Sync your project to GitHub`) in the top-right corner.

![hosting](/images/guides/bare-metal-cloud/virtual-private-servers/import-lovable-website-on-vps/synch_project_github_button.png)

To connect your Lovable account to GitHub, follow the official documentation for [Lovable](https://lovable.dev/integrations/github).

Once the process is complete, a new repository containing your website's code is present in your GitHub account.

From this GitHub repository, perform the following actions:

1. Click `Code` then `Download ZIP`.
2. This downloads a `.zip` file containing your project.
3. Unzip it.

### Step 3: Upload the archive to the VPS [](#)
In your terminal (where the `.zip` file is located), use this command:

```sh
scp my_website.zip <user>@<VPS_IP>:~
```

Replace:

- `my_website.zip` by the name of the file downloaded from Lovable
- `<user>` by your root username (e.g. debian, root, etc.)
- `<VPS_IP>` by the public IP address or DNS name of your VPS

`~` refers to the user's home directory.

### Step 4: Install Node.js and the necessary tools [](#)
Log in to your VPS via SSH:

```sh
ssh <user>@<VPS_IP>
```

To build a Lovable website, you must compile the React project into an optimized version using the `npm run build` command. To do this, you will need the following elements on the VPS:

- `Node.js`: The JavaScript environment required to run React.
- `npm`: The JavaScript package manager that installs project dependencies.
- `curl`: Allows you to download the Node.js installation script.
- `unzip`: Used to extract the `.zip` archive from the exported site from Lovable.

Run these commands:

```sh
sudo apt update
sudo apt install curl unzip -y
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo bash -
sudo apt install -y nodejs
```

Verify the installation:

```sh
node -v
npm -v
```

### Step 5: Unzip and build your website [](#)
Unzip the `.zip` archive into a destination folder (e.g.: `lovable-src`):

```sh
unzip my_website.zip -d lovable-src
```

Enter the destination folder:

```sh
cd lovable-src/my_site
```

Install the necessary dependencies:

```sh
npm install
```

This will install all React/Lovable libraries defined in the `package.json` file.

Generate optimized files (production build):

```sh
npm run build
```

This creates a `dist/` folder containing the minified HTML, CSS and JS files.

### Step 6: Deploy your website [](#)
Create the public folder:

```sh
sudo mkdir -p /var/www/lovable
sudo cp -r dist/* /var/www/lovable/
```

### Step 7: Install and configure the web server [](#)
:::info
For this guide, we choose NGINX, but you are free to install the web server of your choice.
:::

Install NGINX:

```sh
sudo apt install nginx -y
```

Create a configuration file for your website:

```sh
sudo nano /etc/nginx/sites-available/lovable
```

Paste the following content:

```sh
server {
    listen 80;
    server_name VPS_IP;

    root /var/www/lovable;
    index index.html;

    location / {
        try_files $uri /index.html;
    }
}
```

Replace `VPS_IP` with your VPS IP address or domain name.

Enable this configuration:

```sh
sudo ln -s /etc/nginx/sites-available/lovable /etc/nginx/sites-enabled/
sudo nginx -t
```

Restart NGINX to apply the configuration:

```sh
sudo systemctl start nginx
```

If the service is already active, use:

```sh
sudo systemctl reload nginx
```

### Step 8: Access your website [](#)
In your browser, enter:

```sh
http://VPS_IP
```

or:

```sh
http://DOMAIN_NAME
```

Your Lovable website will then appear.

### Conclusion [](#)
In just a few minutes, you built your website with Lovable, then put it online on your OVHcloud VPS. If you would like to secure it with HTTPS, please follow our guide on [Installing an SSL certificate on a VPS](/es/guides/bare-metal-cloud/virtual-private-servers/install-ssl-certificate.md) .

## Go further [](#)
[Install a web development environment on a VPS](/es/guides/bare-metal-cloud/virtual-private-servers/install-env-web-dev-on-vps.md)

[Secure a VPS](/es/guides/bare-metal-cloud/virtual-private-servers/secure-your-vps.md)

For specialized services (SEO, development, etc.), contact the [OVHcloud partners](https://partner.ovhcloud.com/es-es/directory/)

Join our [community of users](https://community.ovhcloud.com/).
