NestJS hosting
Run a NestJS application with its HTTP layer, BullMQ workers and scheduled tasks in one environment, with managed PostgreSQL and Redis on the private network and a single monthly price.
Build and run
- Detected by
- @nestjs/core in package.json
- Build
- npm ci && npm run build
- Start
- node dist/main.js
FROM node:22-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:22-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY package*.json ./
RUN npm ci --omit=dev
COPY --from=build /app/dist ./dist
EXPOSE 3000
CMD ["node", "dist/main.js"]Recommendations
- Run TypeORM or Prisma migrations in the release command so they execute once per deploy.
- Use @nestjs/terminus for a health endpoint that also checks the database connection.
- Run queue consumers as a separate process type so a long queue doesn't slow HTTP responses.
- Managed Redis works with @nestjs/bullmq and cache-manager without extra configuration.
Plans
| Plan | Price | vCPU | Memory | NVMe | Databases | Backups |
|---|---|---|---|---|---|---|
| Launch | $149/mo | 8 | 16 GB | 160 GB | 1 | Daily, kept 7 days |
| Grow | $249/mo | 12 | 32 GB | 320 GB | 2 | Daily, kept 14 days |
| Scale | $349/mo | 16 | 48 GB | 500 GB | 3, plus a read replica | Hourly and daily, kept 30 days |
| Custom | On request | As required | Up to a full server | As required | As required | As required |
Questions
Do we need a Dockerfile to deploy NestJS?
No. 9live detects NestJS and builds it with a maintained buildpack. If your repository has a Dockerfile, we use it instead.
How are environment variables managed?
Set them per environment in the dashboard or with the CLI. They are encrypted at rest and injected at runtime. Connection strings for managed databases are added automatically.
What happens when a deploy fails?
If the build fails, or the new release fails its health check, the current release keeps serving traffic. You get a notification with the build or health-check logs.
Other frameworks
Talk to an engineer about your setup
Tell us what you run today and where it runs. We reply within one business day with a recommended plan and an estimate for the migration.
