NestJS VPS HostingAPIs, Gateways and Queues on One Server
NestJS apps are long-running Node.js servers with queues, scheduled jobs and WebSocket gateways. A VPS runs all of them together. We install Node.js, PM2, NGINX, your database and Redis on a hardened KVM VPS; you build and deploy your app.
Full root & SSH NVMe storage Daily backups Anti-DDoS 99.9% uptime SLA 11 locations
-
Reserved vCores and RAM
API and queue workers on guaranteed resources.
-
Root and SSH access
Node version, native modules and system packages.
-
NVMe storage
Fast builds and database I/O.
-
Dedicated IPv4 and IPv6
WebSocket gateways and webhooks on your own IP.
Why Host NestJS on a VPS
NestJS brings structure to large Node.js back ends, and those back ends rarely run as a single process. A VPS gives them room at a flat price.
-
Queues and schedulers beside the API
Run BullMQ processors and @nestjs/schedule jobs in a separate worker process on the same server.
-
WebSocket gateways without limits
Gateways on Socket.IO or ws keep connections open as long as you need.
-
Database and Redis on localhost
TypeORM or Prisma talk to PostgreSQL or MySQL, and BullMQ to Redis, with no network hop.
-
Microservices on one server
Split into several Nest apps that talk over TCP or Redis transport, all managed by PM2.
How a NestJS Back End Runs
NGINX in front, the API and a worker process under PM2, and data services on localhost.
Request from a browser or app (HTTPS)
-
Reverse proxy
NGINX
HTTPS, rate limiting and WebSocket upgrades to the API port.
-
API
NestJS app (dist/main.js)
Controllers, guards and gateways, running under PM2.
-
Worker
NestJS worker process
BullMQ processors and scheduled jobs, separate from the API.
-
Queue and cache
Redis
BullMQ queues, caching and rate-limit storage.
-
Database
PostgreSQL, MySQL or MongoDB
Through TypeORM, Prisma or Mongoose.
Worth knowing
- Build with nest build and run the compiled dist/main.js in production, not ts-node.
- Call app.enableShutdownHooks() so PM2 reloads close connections cleanly.
- Run scheduled jobs in one process only, or every cluster instance runs them.
- Keep configuration in environment variables with @nestjs/config.
What You Can Run
-
REST and GraphQL APIs
Back ends for web and mobile apps, with Apollo or Mercurius for GraphQL.
-
Real-time gateways
Chat, notifications and live dashboards over WebSockets.
-
Queue-driven services
Email, media processing and imports on BullMQ.
-
Microservices
Several Nest services with TCP or Redis transport.
-
B2B and SaaS back ends
Multi-tenant APIs with auth, billing webhooks and audit logs.
-
Integration hubs
Webhook receivers and sync jobs between third-party systems.
VPS Plans for NestJS
VPS-1 runs an API with Redis for a small product. Production back ends with a database, workers and gateways usually start on VPS-2.
VPS-1
Small websites, APIs, bots and development servers.
- 2 vCores
- 4 GB RAM
- 40 GB NVMe
- 500 Mbps
- Full root and SSH access
- Free initial stack installation
- Server hardening and firewall setup
- Daily backup of the previous 24 hours
- Unlimited traffic *
- Anti-DDoS protection
- Dedicated IPv4 and IPv6
- KVM virtualisation
VPS-2
Production apps, WordPress and online stores.
- 4 vCores
- 8 GB RAM
- 75 GB NVMe
- 1 Gbps
- Full root and SSH access
- Free initial stack installation
- Server hardening and firewall setup
- Daily backup of the previous 24 hours
- Unlimited traffic *
- Anti-DDoS protection
- Dedicated IPv4 and IPv6
- KVM virtualisation
VPS-3
Busy stores, SaaS products and several projects.
- 6 vCores
- 12 GB RAM
- 100 GB NVMe
- 2 Gbps
- Full root and SSH access
- Free initial stack installation
- Server hardening and firewall setup
- Daily backup of the previous 24 hours
- Unlimited traffic *
- Anti-DDoS protection
- Dedicated IPv4 and IPv6
- KVM virtualisation
VPS-4
High-traffic apps, large databases and agencies.
- 8 vCores
- 24 GB RAM
- 200 GB NVMe
- 3 Gbps
- Full root and SSH access
- Free initial stack installation
- Server hardening and firewall setup
- Daily backup of the previous 24 hours
- Unlimited traffic *
- Anti-DDoS protection
- Dedicated IPv4 and IPv6
- KVM virtualisation
* Unlimited traffic in Europe and North America. In Mumbai, Singapore and Sydney a monthly allowance applies (VPS-1 500 GB, VPS-2/VPS-3 1 TB, VPS-4 3 TB), then speed is limited to 10 Mbps until the next month.
Which Plan for Your NestJS Back End
Count the Node processes (API, workers, microservices), then add the database and Redis.
| Workload | Start with | Why |
|---|---|---|
| Small API or staging | VPS-1 2 vCores · 4 GB RAM | API, worker and Redis with a small database. |
| Production API with PostgreSQL | VPS-2 4 vCores · 8 GB RAM | Cluster mode on 4 vCores plus database memory. |
| Gateways or heavy queues | VPS-3 6 vCores · 12 GB RAM | More vCores for connections and parallel jobs. |
| Microservices or large data | VPS-4 8 vCores · 24 GB RAM | 8 vCores and 24 GB RAM. |
A starting point, not a limit: every plan upgrades in place, keeping your data, IP address and configuration.
NestJS on an App Platform or a VPS?
Platforms charge per process and add-on. A VPS runs the API, workers, database and Redis together.
| Feature | App platform (PaaS) | NestJS VPS |
|---|---|---|
| Pricing | Per instance, plus database and Redis add-ons | Flat monthly plan |
| Worker processes | Extra instances | Same server |
| Redis and database | Usually separate paid services | Installed at handover |
| WebSockets | Allowed within platform limits | Unrestricted |
| Deployment | git push built in | SSH or your own CI |
| Server administration | Handled by the provider | Yours, after our free setup |
| See Plans |
Your First NestJS Deploy
Build once, then run the API and the worker as two PM2 processes.
-
Clone and install
Reproducible installs from your lockfile.
-
Build
Compiles TypeScript to dist/.
-
Run migrations
With your ORM, for example Prisma.
-
Start the API and worker
Two processes, saved so they start on boot.
# 1. Clone and install
git clone [email protected]:you/api.git ~/api && cd ~/api
npm ci
# 2. Build
npm run build
# 3. Run migrations
npx prisma migrate deploy
# 4. Start the API and worker
pm2 start dist/main.js --name api
pm2 start dist/worker.js --name worker && pm2 save
Example commands; adjust names, paths and versions to your project. Deploying and maintaining your application is yours to do (or ask us for a quote).
Installed and Secured Before You Log In
The VPS is unmanaged: after handover the server is yours to run. Before that, our engineers do the first setup once, free, so you start from a hardened server with NestJS in place.
-
Choose a plan and location
Pick the resources you need and the datacentre closest to your users.
-
Tell us your NestJS setup
Versions, database and domain: at order or right after.
-
We install and secure it
Server hardened, NestJS installed and tested, HTTPS on your domain.
-
You take over with root
SSH access to a working server, ready for your code and data.
Your NestJS stack
- Node.js LTS and PM2 with startup on boot
- NGINX reverse proxy with WebSocket support
- PostgreSQL, MySQL or MongoDB with a user for your app
- Redis for queues and caching
- HTTPS with Let's Encrypt on your domain
Yours to run after handover
- Ongoing server administration
- Application maintenance and updates
- Debugging your code
- Migrating existing sites or data
Not included in the free setup, but we can quote for it. No control panel by default: CloudPanel, HestiaCP or Virtualmin on request at no cost; cPanel and Plesk need their own licence.
Platform Specs and Locations
The same KVM platform on every plan; only the CPU, RAM, storage and port speed change.
| Virtualisation | KVM with reserved vCores and RAM |
|---|---|
| Storage | NVMe SSD on every plan |
| Network | Dedicated IPv4 and IPv6, 500 Mbps to 3 Gbps per plan |
| Operating systems | Ubuntu 26.04, 24.04 and 22.04 LTS · Debian 13, 12 and 11 · AlmaLinux · Rocky Linux · Fedora · FreeBSD |
| Access | Full root over SSH, key-based login |
| Backups | Automatic daily backup of the previous 24 hours; snapshots and longer retention on request |
| Protection | Always-on anti-DDoS mitigation |
| Availability | 99.9% uptime SLA |
Secured before we hand it over
- Non-root sudo user created for daily work
- SSH key login, password login for root disabled
- Firewall (UFW) open only for the ports you use
- Fail2ban blocking repeated login attempts
- Automatic security updates enabled
- Free Let's Encrypt SSL on your domain
- Timezone, swap and hostname configured
Asia-Pacific
- Mumbai
- Singapore
- Sydney
Europe
- London
- Limburg
- Roubaix
- Gravelines
- Strasbourg
- Milan
- Warsaw
North America
- Beauharnois
Availability per location changes with demand; we confirm your location before setup. In Mumbai, Singapore and Sydney each plan includes a monthly traffic allowance (VPS-1 500 GB, VPS-2 and VPS-3 1 TB, VPS-4 3 TB); beyond it, speed is limited to 10 Mbps until the next month.
Who a NestJS VPS Suits
-
Back-end teams on NestJS
You want API, workers and data on one predictable server.
-
Startups with a growing API
One server for everything until you need to split it.
-
Teams leaving app platforms
Back ends where per-instance and add-on pricing has added up.
Security and Performance for NestJS
Security
- Use ValidationPipe with whitelist so unexpected fields are rejected.
- Add helmet and rate limiting (@nestjs/throttler) to public endpoints.
- Bind the API to localhost; only NGINX listens publicly.
- Keep secrets in environment variables readable only by the app user.
Performance
- Consider the Fastify adapter for higher request throughput.
- Run the API in PM2 cluster mode and keep schedulers in a single worker process.
- Cache hot responses in Redis with the cache manager.
- Move slow work to BullMQ so requests return quickly.
Questions Before You Deploy
Not covered here? Ask an engineer before you order.
Deploy Your NestJS Back End
Choose a plan, tell us your database, and get Node.js, PM2, NGINX and Redis ready for your API.