Deploy a Node.js App
Deploy your Node.js or Express.js API in under 2 minutes.
Overview
Node.js is the most popular runtime for building web APIs and backend services. Deploying it should be as simple as writing it. Kubeletto builds your Node.js app from GitHub or a Docker image, assigns a TLS subdomain, and scales it to zero when idle — so you pay nothing for unused compute.
Prerequisites
- A Node.js project with a start script in package.json
- A Dockerfile (or let Kubeletto auto-detect your project)
- A Kubeletto account (free during beta)
Step-by-Step Guide
Deploying Express / Node.js to Kubeletto is done by configuring a Dockerfile, connecting your GitHub repository, and setting environment variables. Follow this step-by-step checklist to deploy your code:
- 1
Add a Dockerfile
If you don't have one, Kubeletto auto-generates it. For full control, add a minimal Dockerfile to your project root.
dockerfileFROM node:20-alpine WORKDIR /app COPY package*.json ./ RUN npm ci --omit=dev COPY . . EXPOSE 3000 CMD ["node", "src/index.js"] - 2
Connect GitHub and deploy
Install the Kubeletto GitHub App, select your repository and branch. Every push to main triggers an automatic build and deploy.
bash# Or deploy directly from CLI kubeletto deploy --source github --repo your-org/your-repo --branch main - 3
Set environment variables
Add your DATABASE_URL, API keys, and any runtime config in the Environment tab or via CLI.
bashkubeletto env set DATABASE_URL=postgres://... --app my-node-app kubeletto env set NODE_ENV=production --app my-node-app - 4
Access your live URL
Kubeletto provisions a wildcard HTTPS subdomain instantly. Your app is live at `https://my-node-app.kubeletto.app`.
bashkubeletto apps list # → my-node-app https://my-node-app.kubeletto.app running
Sample Environment Variables
To configure your Express / Node.js application, set these key-value pairs in the environment variables tab of the Kubeletto console or CLI. Ensure production secrets are flagged as write-only:
NODE_ENV=production
PORT=3000
DATABASE_URL=postgres://user:pass@host:5432/dbname
REDIS_URL=redis://...
JWT_SECRET=your-secret-here Related Kubeletto Features
Kubeletto offers automatic SSL certificate provisioning, zero-downtime rollbacks, and scale-to-zero autoscaling for Express / Node.js container workloads:
PaaS Platform Comparisons
See how Kubeletto compares directly against other cloud platforms and PaaS providers when deploying Node.js workloads:
Frequently Asked Questions
Find direct answers to common questions about hosting, building, scaling, and managing Express / Node.js containerized apps on Kubeletto:
Does Kubeletto support Node.js ESM modules?
Yes. Kubeletto builds your project inside a container using the base image you specify, so ESM, CommonJS, and TypeScript (via ts-node or compiled builds) all work out of the box.
Can I deploy a monorepo with multiple Node.js services?
Yes. Create one Kubeletto app per service and point each to a different subdirectory using a build context path in your Dockerfile.
What Node.js versions are supported?
Any version available as an official Docker image — Node 18, 20, 22, etc. Specify the version in your Dockerfile FROM line.
How do I run database migrations on deploy?
Add a migration command to your Dockerfile CMD or use a deploy hook script. Common patterns: run migrations in an entrypoint.sh before starting the server.
Deploy your Express / Node.js app today
Free during our active beta. No credit card required.
Start Deploying Free