# Deploy a Node.js app

Put a Nuxt, Next.js, SvelteKit, Astro, Express or other Node.js app from GitHub online. Nuvlo detects how to build it, keeps it running and deploys every push.

## Before you start

- An active server of type **Application** or **General purpose**. See [Create a server](https://app.nuvlo.dev/docs/create-a-server).
- The app in a GitHub repository. Node.js apps deploy from GitHub only; GitLab and Bitbucket are marked as coming soon.
- A domain or subdomain for the app, such as `app.example.com`.
- Room for another site on your plan. See [Usage and limits](https://app.nuvlo.dev/docs/usage-and-limits).

## Step 1: Start a new site

Go to [Sites](https://app.nuvlo.dev/dashboard/sites), click **Create** and choose **Site**. Under **Server**, pick an application or general-purpose server, then click **Node.js app** under **Site type**.

The setup moves to **Connect your project**.

![The Create site page with the Server list and the Node.js app card under Site type](https://app.nuvlo.dev/docs/shots/deploy-an-application--site-type.webp)

## Step 2: Connect GitHub

The card **Import Git repository** shows the Git providers with **GitHub** selected. If GitHub isn't connected yet, click **Connect account** and approve access in the window that opens. See [Connect GitHub](https://app.nuvlo.dev/docs/connect-git).

If you didn't pick a server on the first step, choose a compatible one in the **Server** list first.

## Step 3: Import the repository

Under **Select repository**, find the app with **Search repositories…** and click it. Each entry shows the main language, when it was last updated and whether it's private.

![The Import Git repository card with GitHub selected and a list of repositories with Import badges](https://app.nuvlo.dev/docs/shots/deploy-an-application--repositories.webp)

## Step 4: Check the detected build settings

Nuvlo analyzes the repository and shows what it found, for example **Auto-detected: Nuxt · pnpm**, plus the database, root folder and Redis use when it detects them. The detected settings are locked; opening **Edit build settings** unlocks them.

The settings in **Edit build settings**:

| Setting | What it does |
| --- | --- |
| **Framework** | Nuxt, Next.js, Remix, SvelteKit, Astro, Express, Hono or Other. Choosing one fills in the build and start commands. |
| **Package manager** | npm, pnpm, Bun or Yarn. |
| **Database** | The database your app uses. This only records your choice; it doesn't create a database. Set the connection in environment variables. See [Create a database](https://app.nuvlo.dev/docs/create-a-database). |
| **Private Redis cache** | Nuvlo runs a private, password-protected Redis for this app and sets `REDIS_URL` for it. **Automatic** starts at 64 MB and adjusts between 32 and 512 MB; **Manual** keeps a fixed size. |
| **Build command** | The command that builds the app, for example `nuxt build`. |
| **Start command** | How the app is started and kept running, for example `node .output/server/index.mjs` or `npm run start`. |
| **Output directory** | The folder the build writes to. |
| **Root directory** | For monorepos, the folder of the app. Leave `/` otherwise. |
| **Port** | Leave it blank and Nuvlo assigns one. If you set it, use 1024–65535. |
| **Node.js version** | The Node.js version for building and running the app. |

![The Configure build card with the Auto-detected line and the Edit build settings section open](https://app.nuvlo.dev/docs/shots/deploy-an-application--configure.webp)

## Step 5: Set the branch and domain

Below the build settings, check the **Server**, enter the **Deployment branch** (the repository's default branch is filled in) and the **Domain** the app answers on.

Open **Domain redirects** to choose how the www address behaves: **No redirect**, **www → root** or **root → www**. Nuvlo selects the usual choice for the domain you typed.

Click **Next: environment variables**.

![The Server list, the Deployment branch field, the Domain field and the Domain redirects section below the build settings](https://app.nuvlo.dev/docs/shots/deploy-an-application--branch-domain.webp)

## Step 6: Add environment variables

Drop your `.env` file on **Drop your .env file here**, or click **Add variable** for each one. Values are hidden; the eye button shows them. Variables are written to a `.env` file on the server and loaded when the app runs.

Leave out `REDIS_URL` when the private Redis cache is on; Nuvlo sets it. `PORT` and `HOST` are also managed by Nuvlo. See [Set environment variables](https://app.nuvlo.dev/docs/environment-variables).

Click **Next: review**.

![The Environment variables step with the .env drop area and the Add variable button](https://app.nuvlo.dev/docs/shots/deploy-an-application--environment.webp)

## Step 7: Review and deploy

Check the summary: repository and branch, server, domain, framework and Node.js version, commands, port, database, cache and the names of your variables.

Leave **Auto-deploy** on to deploy every push to the branch. Then click **Deploy site**.

![The Review and deploy step with the summary list and the Auto-deploy switch](https://app.nuvlo.dev/docs/shots/deploy-an-application--review.webp)

## Step 8: Follow the first deploy

Nuvlo creates the site, adds a read-only deploy key to the repository (and, with **Auto-deploy** on, the webhook), clones it, prepares Redis if needed, installs dependencies, builds, starts the app and configures Nginx.

When it reads **Your app is live**, click **Open site**. If it stops, click **Open the deploy log** to see what went wrong.

To stop a deploy that is still running, click **Cancel deploy**. This stops the build and removes everything it created, as if the site had never been started.

## Point the domain at the server

If the domain is in a Cloudflare account you connected, Nuvlo creates the DNS record during the deploy. Otherwise the progress screen shows which A record to add at your DNS provider. HTTPS is issued automatically once the domain points at the server. See [Add a domain](https://app.nuvlo.dev/docs/add-a-domain) and [Connect Cloudflare](https://app.nuvlo.dev/docs/connect-cloudflare).

## Find your way around the app's page

Open the app from [Sites](https://app.nuvlo.dev/dashboard/sites). The header shows its status, framework, repository, branch and server, with **Visit site** and **Deploy latest from** the branch.

| Tab | What you find there |
| --- | --- |
| **Overview** | The live deployment with a preview, resource use, traffic and a setup checklist. |
| **Deployments** | Every deployment with build logs and rollback. See [Deploy from Git](https://app.nuvlo.dev/docs/deploy-from-git) and [Roll back to an earlier release](https://app.nuvlo.dev/docs/releases-and-rollback). |
| **Analytics** | Traffic, performance and runtime figures. |
| **Environment** | The app's [environment variables](https://app.nuvlo.dev/docs/environment-variables). |
| **Security** | [Security scans](https://app.nuvlo.dev/docs/security-scans), the [launch check](https://app.nuvlo.dev/docs/launch-check), [response headers](https://app.nuvlo.dev/docs/response-headers) and [AI crawler rules](https://app.nuvlo.dev/docs/site-seo). |
| **Monitoring** | Uptime and logs. See [Logs](https://app.nuvlo.dev/docs/logs). |
| **Headless** | Connecting the app to a WordPress backend. See [Headless WordPress](https://app.nuvlo.dev/docs/headless-wordpress). |
| **Settings** | Git, the [deploy hook](https://app.nuvlo.dev/docs/deploy-from-git), [build settings](https://app.nuvlo.dev/docs/build-settings), [persistent storage](https://app.nuvlo.dev/docs/persistent-paths), domains and deleting the app. |

![The Overview tab of a Node.js app with the Production card, resource usage, traffic and the deployment setup checklist](https://app.nuvlo.dev/docs/shots/deploy-an-application--overview.webp)

## Troubleshooting

- **We could not detect this project’s build settings.**: enter the framework, commands and folders under **Edit build settings** yourself.
- **Choose an active application or general-purpose server.**: the selected server can't run Node.js apps. Pick another one.
- **Port … is already in use on this server**: leave **Port** blank, or choose another port.
- **REDIS_URL is managed by the private cache.**: remove your own `REDIS_URL`, or turn off the private Redis cache.

---
Source: https://app.nuvlo.dev/docs/deploy-an-application
