Skip to content

Deploy NestJS App on Seenode | NestJS Hosting & Deployment Guide

This guide explains how to deploy your existing NestJS application to seenode.

Before you begin, ensure you have:

  • A seenode account at cloud.seenode.com
  • Git configured on your machine
  • Existing NestJS project ready to deploy

Your service must listen on the same port that you configure in the Port field for the web service. NestJS defaults to port 3000, so the simplest option is to use 3000 both in your code and in the dashboard.

For more details on how ports are routed on seenode, see Configuring Your Application’s Port.

src/main.ts
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3000);
}
bootstrap();

Ensure your package.json includes the following scripts:

package.json
{
"scripts": {
"build": "nest build",
"start:prod": "node dist/main"
}
}
  1. Push to Git

    Commit your project and push it to GitHub or GitLab.

  2. Create a Web Service

    From the seenode Dashboard, create a new Web Service and connect your NestJS project’s Git repository.

  3. Configure Build & Start

    seenode attempts to detect these automatically for a NestJS project. Configure:

    • Build Command:
      npm i && npm run build
    • Start Command:
      npm run start:prod
    Configure Build & Start: Port field

    Set the Port field (above Environment Variables) to the value your app listens on. NestJS defaults to 3000, so a common choice is to set the Port field to 3000 as well. You can choose a different port (for example, 4000) as long as your app.listen(…) call and the Port field match. The field starts empty, so set it before your first deploy. After the service is created, you can change the port from the project’s Settings tab.

  4. Configure Environment Variables

    Configure any additional environment variables your application needs in the Environment section. You do not need to add a PORT environment variable.

  5. Choose Pricing Tier

    Select your preferred instance size and create your service.

  6. Deploy

    Click Create Web Service and watch logs until your web service is live.

  7. Success

    Once complete, your NestJS application is accessible via your service’s URL.

If you don’t have a NestJS project yet:

Option 1: Use our Template (Recommended)

Option 2: Create from NestJS Docs + seenode Setup

Follow the official NestJS documentation to create a new project, then return here for seenode-specific deployment steps.

seenode-Specific Setup Steps:

  1. Install NestJS CLI: npm i -g @nestjs/cli
  2. Create project: nest new your-project-name
  3. Update src/main.ts to listen on the port you’ll configure in the dashboard (for example, 3000)
  4. Set up production build scripts

Now that your NestJS application is deployed, here are some things you might want to do next: