|

Where to Deploy Your First Node.js App in 2026: A Beginner’s Guide

Where to Deploy Your First Node.js App in 2026: A Beginner’s Guide

Last updated: September 2026

You’ve built your first Node.js app. It runs perfectly on localhost:3000, and now you want to share it with the world: a friend, a potential employer, or your first real users. That’s when you hit the question every beginner faces: where do you actually deploy a Node.js app?

The answer has changed a lot recently. Several platforms that older tutorials still recommend have removed their free plans, and one popular option is now owned by an AI company and shifting direction. Meanwhile, newer platforms have made deploying a Node.js app easier than ever, often in under ten minutes and sometimes for free.

This guide explains your options in plain English, compares the best Node.js hosting platforms for beginners in 2026, shows you exactly how to prepare your app, and walks you through a complete first deployment. All code examples use JavaScript (Node.js) with the Express framework, the most common setup for first projects.

Quick answer: the best places to deploy a Node.js app in 2026

If you just want a recommendation, here it is:

  • Best free option for your first deploy: Render. No credit card needed, simple Git-based deploys, and a genuine free tier. The trade-off is that free apps “fall asleep” when nobody’s using them.
  • Best for apps that must stay awake: Railway. Usage-based pricing that starts at around $5 a month, with no sleeping.
  • Best if you’re building a frontend too: Vercel. Deploys Express apps with zero configuration and has a free Hobby plan for personal projects.
  • Best if you also want a website or blog: Hostinger. Its Business and Cloud hosting plans can run Node.js apps alongside WordPress sites, deployed straight from GitHub.
  • Best for predictable pricing: DigitalOcean App Platform. Flat monthly prices starting at $5 for a small app.

Keep reading to understand why, and to pick the right one for your project.

What does “deploying” a Node.js app actually mean?

When you run node server.js on your laptop, your computer becomes a tiny web server. It listens for requests on a port (like 3000) and sends back responses. The problem is that your laptop isn’t reachable from the internet, it isn’t always on, and it definitely isn’t built to handle strangers’ traffic safely.

Deploying means running that same code on a computer that is built for this: a server that stays online around the clock, has a public web address, and handles security basics like HTTPS for you.

A typical deployment involves four things:

  1. Your code, usually stored in a Git repository on GitHub.
  2. A build step, where the platform installs your dependencies (running npm install) and prepares your app.
  3. A start command, usually npm start, which launches your server.
  4. A public URL, where anyone can reach your running app.

Modern hosting platforms automate almost all of this. You connect your GitHub repository, tell the platform how to start your app, and it handles the rest. Every time you push new code to GitHub, the platform can redeploy automatically. This workflow is often called Git-based deployment or “git push to deploy,” and it’s the easiest way for beginners to get started.

The four types of Node.js hosting

Before comparing specific platforms, it helps to understand the four main categories. Each one trades off simplicity, control, and cost differently.

Hosting typeHow it worksDifficultyTypical costExamples
Platform as a Service (PaaS)You push code; the platform builds, runs, and manages itEasyFree to about $7 a month to startRender, Railway, DigitalOcean App Platform, Heroku
ServerlessYour app runs as functions that start on demandEasyFree tiers for personal useVercel
Managed web hosting with Node.jsA traditional hosting plan with a Node.js deployment featureEasyPart of your hosting planHostinger
Virtual Private Server (VPS)You rent a Linux server and set everything up yourselfHardFrom about $4 a monthDigitalOcean Droplets, Hetzner

For your first deployment, choose a PaaS or serverless platform. They let you focus on your code instead of server administration. A VPS is a fantastic learning experience later, once you’re comfortable with the Linux command line, but it means handling security updates, process managers, and firewalls yourself.

How to choose where to deploy your Node.js app

Ask yourself these six questions before picking a platform.

1. Does it need to be free? Free tiers are perfect for learning, portfolios, and demos. But most free tiers come with limits, and the most common one is sleeping: your app shuts down after a period of inactivity and takes a while to wake up on the next visit.

2. Can your app tolerate a slow first load? If your project is a portfolio piece that a recruiter might open once, a 30 to 60 second wake-up could make a bad first impression. If it’s a personal learning project, it doesn’t matter.

3. Does your app need to run continuously? Some apps do things in the background: chat servers using WebSockets, bots that stay connected to Discord, or scheduled jobs. These need an always-on server, which rules out sleeping free tiers and most serverless platforms.

4. Do you need a database? Many platforms offer managed databases (like PostgreSQL), but free databases often expire or have tight limits. Check this before you build around one.

5. Is it for personal or commercial use? Some free plans, including Vercel’s Hobby plan, are for personal, non-commercial projects only. If your app will make money, you’ll need a paid plan.

6. Do you already pay for hosting? If you already have a hosting plan for a website or blog, check whether it supports Node.js apps. You may be able to deploy at no extra cost.

The best places to deploy your first Node.js app in 2026

Here’s a closer look at each platform, including what it costs today, where it shines, and where it falls short. Prices and free tiers were checked in September 2026 and change often, so confirm the latest details on each platform’s pricing page.

1. Render: best free option for beginners

Render is a cloud platform that deploys web services, static sites, and databases straight from your Git repository. It has become one of the most popular Heroku replacements, and it’s our top recommendation for a first Node.js deployment.

Free tier: Render’s free web services require no credit card. Your workspace gets 750 free instance hours per month, enough to run one app continuously. The catch: free web services spin down after 15 minutes without traffic, and the next visitor waits roughly a minute while the app starts back up. Free instances are also small (about 512 MB of memory), and free PostgreSQL databases expire after 30 days.

Paid plans: Always-on web services start at $7 a month, which removes the spin-down entirely.

Why beginners like it:

  • Connect GitHub, fill in two commands, and deploy.
  • Automatic HTTPS for your app’s onrender.com address.
  • Automatic redeploys every time you push to GitHub.
  • Clear build and runtime logs, which make debugging much easier.

Watch out for:

  • Cold starts on the free tier make it a poor fit for anything visitors use regularly.
  • Your app must listen on the port Render provides (more on this below).

Best for: your first deployment, learning projects, and demos.

2. Railway: best for apps that must stay awake

Railway is a developer-friendly platform known for its polished dashboard and fast deploys. Instead of fixed plans, it charges for the resources your app actually uses, billed by the second.

Free options: New accounts get a one-time $5 trial credit. After the trial, Railway’s Free plan continues with $1 of usage credit per month and tight limits (0.5 GB of memory and a single project), which suits only very small apps.

Paid plans: The Hobby plan costs $5 a month and includes $5 of usage credit. A small Node.js app often fits inside that credit, but usage beyond it is billed on top, so the $5 is a minimum, not a cap. You can set a hard usage limit to avoid surprise bills.

Why beginners like it:

  • Apps don’t sleep, so there are no cold starts on paid plans.
  • Adding a database takes a couple of clicks.
  • A clean, modern interface that makes it easy to see what’s running.

Watch out for:

  • Usage-based billing is less predictable than a flat price. Set a spending limit.
  • There’s no generous permanent free tier.

Best for: small apps, bots, and APIs that need to stay online without sleeping, on a small budget.

3. Vercel: best if you’re also building a frontend

Vercel is best known for hosting frontend frameworks like Next.js, but it now deploys Express apps with zero configuration. You export your Express app, and Vercel runs it as a single serverless function using its Fluid compute system.

Free tier: The Hobby plan is free, with generous limits for small projects, but it’s intended for personal, non-commercial use.

Paid plans: The Pro plan costs $20 per team member per month, plus usage beyond the included amounts.

Why beginners like it:

  • Excellent for full-stack projects where your frontend and API live together.
  • Preview deployments give every Git branch its own test URL.
  • Very fast global delivery for static files.

Watch out for:

  • Serverless functions run on demand, so Vercel isn’t designed for apps that need a constantly running process, such as WebSocket servers or always-connected bots.
  • Your code needs a small change: you export the app instead of (or in addition to) calling app.listen(). We show how below.
  • Commercial projects need a paid plan.

Best for: portfolio projects with a frontend, APIs that back a web app, and anyone already using Next.js.

4. Hostinger: best if you also want a website or blog

Hostinger is known for affordable web hosting, but its Business Web Hosting and Cloud plans also include a Node.js web app feature. You deploy from a GitHub repository (or by uploading a ZIP file), Hostinger detects your framework and suggests build settings, and it keeps your app running and redeploys when you push changes. Supported runtimes include Node.js 18, 20, 22, and 24.

Pricing: Node.js apps are included in eligible hosting plans rather than billed separately. Hostinger’s lowest prices require paying for a multi-year term upfront, and plans renew at a higher price, so check both figures before buying.

Why beginners like it:

  • One plan can host your WordPress site, your email, and your Node.js app.
  • A guided setup inside the same control panel (hPanel) you use for everything else.
  • The Hostinger Connector lets AI coding tools like Claude Code and Cursor deploy to your account from your editor.

Watch out for:

  • Node.js apps are only available on specific plans, so check your plan before counting on it.
  • Long upfront terms and higher renewal prices.

Best for: beginners who want one place for a website, a blog, and their Node.js projects. BeginnerStack itself runs on Hostinger.

5. DigitalOcean App Platform: best for predictable pricing

DigitalOcean is a long-established cloud provider with a reputation for clear pricing and excellent documentation. Its App Platform is a PaaS that deploys Node.js apps from GitHub.

Free tier: Only static sites are free (up to three). Node.js apps that run a server are not included in the free tier.

Paid plans: Small app containers start at $5 a month (512 MB of memory), with flat, predictable pricing. New accounts often receive promotional credits, which can cover your first months.

Why beginners like it:

  • You know exactly what you’ll pay each month.
  • Outstanding tutorials and documentation.
  • An easy path to DigitalOcean’s other products, such as managed databases and Droplets (VPS servers), when you’re ready.

Watch out for:

  • No free option for server apps.
  • Managed databases start at around $15 a month, which adds up quickly.

Best for: beginners who prefer a fixed monthly bill over usage-based pricing.

6. Fly.io: powerful, but no longer free

Fly.io runs your app on servers around the world, close to your users. It’s powerful and loved by experienced developers, but it’s changed significantly for newcomers.

Free tier: Fly.io no longer offers a free tier to new users; it was removed in late 2024. New accounts get a short trial (2 hours of server time or 7 days, whichever comes first), then pay as you go. The smallest always-on machine costs roughly $2 a month.

Why developers like it:

  • Deploy to many regions worldwide with a single command.
  • Fine-grained control and low running costs for small machines.

Watch out for:

  • A command-line workflow and Docker concepts that can overwhelm beginners.
  • Many older tutorials still describe the old free allowance, which new accounts don’t get.

Best for: your second or third deployment, once you’re comfortable with the command line.

7. Heroku: the original, now paid-only

Heroku pioneered “git push to deploy” and taught a generation of developers how to deploy apps. Many tutorials still reference it, so it’s worth knowing where it stands.

Free tier: None. Heroku removed its free plans in November 2022.

Paid plans: Eco dynos cost $5 a month for 1,000 hours shared across your apps, and they sleep after 30 minutes of inactivity. Always-on Basic dynos start at $7 a month.

Watch out for: In February 2026, Salesforce reportedly moved Heroku to a “sustaining engineering” model, focusing on stability and security fixes rather than new features. Existing apps keep running, but for a brand-new project, the platforms above offer more for the money.

Best for: following an older tutorial exactly, or teams already using Heroku.

8. A VPS: best for learning how servers really work

A Virtual Private Server gives you a full Linux machine in the cloud. Providers such as DigitalOcean (Droplets from $4 a month) and Hetzner offer small servers for a few dollars a month.

Why it’s worth learning eventually: You’ll understand what every other platform does behind the scenes: installing Node.js, keeping your app running with a process manager like PM2, configuring a web server like Nginx, and setting up HTTPS certificates.

Watch out for: You’re responsible for security updates, firewalls, backups, and fixing anything that breaks. That’s a lot to take on for a first deployment.

Best for: your next learning milestone, not your first deploy.

A note on Koyeb

You may see Koyeb recommended in older “free Node.js hosting” lists. In February 2026, it was acquired by Mistral AI and is being folded into Mistral’s AI cloud, with its focus shifting toward AI workloads. Reports indicate its free tier has closed to new sign-ups. Until its direction settles, we’d suggest beginners choose one of the platforms above.

Node.js hosting comparison table

PlatformFree optionPaid fromSleeps on free tier?Always-on apps?Best for
RenderYes, no card needed$7/monthYes, after 15 minPaid plansFirst deployment
Railway$5 trial, then $1/month credit$5/month plus usageNoYesApps that must stay awake
VercelYes (personal use)$20/user/monthRuns on demandNo (serverless)Full-stack and frontend projects
HostingerNoIncluded in eligible plansNoYesWebsite plus Node.js in one plan
DigitalOcean App PlatformStatic sites only$5/monthNot applicableYesPredictable monthly pricing
Fly.ioShort trial onlyPay as you go (about $2/month)NoYesDevelopers comfortable with the CLI
HerokuNo$5/month (Eco)Eco sleeps after 30 minBasic and upFollowing older tutorials

How to prepare your Node.js app for deployment

Most first deployments that fail do so for the same handful of reasons. Get these right, and your app will deploy smoothly on almost any platform. The examples below use JavaScript (Node.js) with Express 5.

Use a supported Node.js version

Node.js releases have a support schedule. As of September 2026, Node.js 24 is the Active LTS (Long-Term Support) version, and it’s the safest choice for new projects. Node.js 26 is scheduled to become the next LTS version in October 2026. Node.js 22 is in maintenance until April 2027, and Node.js 20 reached end of life in April 2026, so avoid it for new apps.

The release schedule is also changing: starting with Node.js 27, there will be one major release a year, and every release will become LTS. The simple rule stays the same: use an LTS version for anything you deploy.

Check your local version with:

node --version

Set up package.json correctly

Your package.json tells the platform how to install and start your app. Here’s a deployment-ready example:

{
  "name": "my-first-node-app",
  "version": "1.0.0",
  "type": "module",
  "main": "server.js",
  "scripts": {
    "start": "node server.js",
    "dev": "node --watch server.js"
  },
  "engines": {
    "node": "24.x"
  },
  "dependencies": {
    "express": "^5.1.0"
  }
}

Three parts matter most:

  • "start": most platforms run npm start to launch your app. Without this script, deployment fails.
  • "engines": tells the platform which Node.js version to use, so production matches your laptop.
  • "dependencies": everything your app needs to run must be listed here. Running npm install express adds it automatically.

Listen on the platform’s port

This is the single most common reason first deployments fail. On your laptop, you might hardcode port 3000. Hosting platforms, however, tell your app which port to use through an environment variable called PORT. Render, for example, sets it to 10000 by default and requires your app to listen on host 0.0.0.0.

Here’s a complete, deployment-ready server.js:

// server.js (JavaScript, Node.js with Express 5)
import express from "express";

const app = express();

// Use the port the platform provides, or 3000 on your own computer
const PORT = Number(process.env.PORT) || 3000;

app.use(express.json());

app.get("/", (req, res) => {
  res.send("Hello from my first deployed Node.js app!");
});

// A health check route that platforms can use to confirm the app is running
app.get("/health", (req, res) => {
  res.json({ status: "ok" });
});

app.get("/api/greet", (req, res) => {
  const name = req.query.name ?? "friend";
  res.json({ message: `Hello, ${name}!` });
});

// Listen on all network interfaces so the platform can reach the app
app.listen(PORT, "0.0.0.0", () => {
  console.log(`Server listening on port ${PORT}`);
});

Notice Number(process.env.PORT). Environment variables are always text, so converting the value to a number avoids subtle bugs.

Keep secrets out of your code

Never write passwords, API keys, or database URLs directly in your code, and never commit them to GitHub. Instead, read them from environment variables:

const apiKey = process.env.WEATHER_API_KEY;

On your computer, you can store them in a .env file and load it with Node’s built-in option:

node --env-file=.env server.js

On your hosting platform, add the same variables in the dashboard’s environment variables or settings section.

Add a .gitignore file

Create a file named .gitignore in your project folder so you don’t upload files that don’t belong in Git:

node_modules/
.env

The platform installs node_modules itself during the build, and your .env file contains secrets.

Push your code to GitHub

Git-based platforms deploy from a repository. If your project isn’t on GitHub yet, create an empty repository on github.com, then run these commands in your project folder:

git init
git add .
git commit -m "First commit"
git branch -M main
git remote add origin https://github.com/YOUR-USERNAME/my-first-node-app.git
git push -u origin main

Replace YOUR-USERNAME with your GitHub username.

One change for Vercel

Because Vercel runs your Express app as a serverless function, it needs the app exported. You can support both Vercel and traditional platforms with one file by replacing the app.listen() block with:

// Start a normal server everywhere except on Vercel
if (!process.env.VERCEL) {
  app.listen(PORT, "0.0.0.0", () => {
    console.log(`Server listening on port ${PORT}`);
  });
}

// Vercel uses the exported app
export default app;

Step by step: deploy your first Node.js app on Render

Here’s the complete process on Render, our recommended free platform for a first deployment. Render updates its dashboard from time to time, so button names may differ slightly, but the steps stay the same.

Step 1: Create a Render account. Sign up at render.com. Signing up with GitHub is easiest, since you’ll connect it anyway. No credit card is needed for the free tier.

Step 2: Create a new web service. In the dashboard, choose New, then Web Service. A web service is Render’s name for an app that runs a server, as opposed to a static site.

Step 3: Connect your repository. Give Render access to your GitHub account, then select your project’s repository from the list.

Step 4: Configure the service. Render detects that your project uses Node.js. Fill in the settings:

SettingValue
Namemy-first-node-app (this becomes part of your URL)
RegionThe one closest to your users
Branchmain
RuntimeNode
Build commandnpm install
Start commandnpm start
Instance typeFree

Step 5: Add environment variables (if you have any). If your app uses secrets like API keys, add them in the environment variables section now. You don’t need to add PORT, because Render sets it for you.

Step 6: Deploy. Click the create or deploy button. Render opens a live log showing each step: cloning your code, running npm install, then running npm start. When you see your message, Server listening on port 10000, followed by a note that the service is live, you’re done.

Step 7: Visit your app. Your app now has a public address ending in onrender.com, with HTTPS already set up. Try /health and /api/greet?name=World too.

Step 8: Make a change and watch it redeploy. Edit the message in your / route, then commit and push:

git add .
git commit -m "Update homepage message"
git push

Render detects the push and redeploys automatically. Within a minute or two, your change is live. This loop (edit, commit, push, live) is how professional teams ship software every day.

Troubleshooting common Node.js deployment errors

If your deployment fails, don’t panic. Open the platform’s logs, find the first error message, and check this table.

Error or symptomLikely causeHow to fix it
“No open ports detected” or a port scan timeoutYour app isn’t listening on the platform’s PORT, or it’s bound to localhostUse Number(process.env.PORT) and listen on "0.0.0.0"
npm ERR! Missing script: "start"No start script in package.jsonAdd "start": "node server.js" under "scripts"
Cannot find module 'express'The package isn’t listed in dependenciesRun npm install express locally, commit, and push
SyntaxError: Cannot use import statement outside a moduleUsing import without ES module support enabledAdd "type": "module" to package.json, or switch to require()
SyntaxError on newer JavaScript featuresThe platform uses an older Node.js version than your laptopSet "engines": { "node": "24.x" } in package.json
App crashes right after startingA missing environment variable, often a secret you forgot to addCheck the logs, then add the variable in the platform dashboard
First visit takes 30 to 60 secondsA free-tier cold start after the app went to sleepExpected on free tiers; upgrade to an always-on plan to remove it
Changes don’t appearThe code wasn’t pushed, or auto-deploy is turned offRun git push and check the deploy history

A debugging habit that saves hours: before deploying, test your app locally in production-like conditions. Delete your node_modules folder, run npm install, then run npm start instead of your usual development command. If it works locally this way, it will almost always work on your platform.

Free vs paid Node.js hosting: when should you upgrade?

Free tiers are perfect while you’re learning. Consider upgrading when:

  • Real people use your app regularly. Cold starts frustrate users. An always-on plan (around $5 to $7 a month on most platforms) fixes this.
  • Your app needs to run continuously, such as a chat server, a bot, or scheduled tasks.
  • You need a database you can rely on. Free databases on some platforms expire after a set period, which can mean losing your data.
  • Your project makes money. Some free plans don’t allow commercial use.

A common, sensible path: start free on Render, move to an always-on paid plan when people start using your app, and learn VPS hosting later as a skill-building project.

What to do after your first deployment

Once your app is live, here are the natural next steps:

  1. Add a custom domain. Instead of my-first-node-app.onrender.com, use your own domain name, like api.yourname.com. Most platforms walk you through the DNS records.
  2. Connect a database. Try a managed PostgreSQL database so your app can store data permanently.
  3. Set up uptime monitoring. Free monitoring services can email you if your app goes down.
  4. Learn about logs and errors. Error tracking tools show you exactly where your app crashes in production.
  5. Try a second platform. Deploying the same app to Railway or Vercel teaches you what’s platform-specific and what’s universal.

Frequently asked questions

Can I host a Node.js app for free in 2026?

Yes. Render offers a free tier for Node.js web services with no credit card required, though free apps sleep after 15 minutes of inactivity. Vercel’s free Hobby plan runs Express apps as serverless functions for personal, non-commercial projects. Railway offers a trial credit and a small ongoing free allowance.

What is the easiest way to deploy a Node.js app?

For most beginners, the easiest way is a Git-based platform like Render or Railway: push your code to GitHub, connect the repository, set the start command to npm start, and deploy. The whole process can take under ten minutes.

Is Heroku still free?

No. Heroku removed its free plans in November 2022. Its cheapest option, Eco dynos, costs $5 a month, and those apps sleep when inactive.

Can I run Node.js on shared web hosting?

It depends on the host and plan. Traditional shared hosting is built for PHP sites like WordPress, and many plans don’t support Node.js at all. Some hosts, including Hostinger on its Business and Cloud plans, now include a dedicated Node.js web app feature. Check your plan’s features before buying.

Which Node.js version should I use for deployment?

Use an LTS (Long-Term Support) version. As of September 2026, that’s Node.js 24, with Node.js 26 becoming LTS in October 2026. Specify it in your package.json using the engines field so your hosting platform uses the same version you tested with.

Do I need Docker to deploy a Node.js app?

No. Platforms like Render, Railway, Vercel, Hostinger, and DigitalOcean App Platform detect Node.js projects automatically and build them without Docker. Docker becomes useful later, when you want identical environments everywhere or more control over your setup.

Why does my app work locally but fail after deploying?

The most common reasons are listening on a hardcoded port instead of process.env.PORT, a missing start script, a package missing from dependencies, a different Node.js version, or a missing environment variable. Check the troubleshooting table above; it covers the error messages you’re most likely to see.

Our recommendation

If you’re deploying your first Node.js app, start with Render’s free tier. It teaches you the modern Git-based workflow, costs nothing, and requires no credit card. When your app needs to stay awake for real users, upgrade to an always-on plan on Render or move to Railway. If you’re building a full-stack project with a frontend, try Vercel. And if you want your website, blog, and Node.js projects under one roof, look at a Hostinger Business or Cloud plan.

Whichever you choose, the skills transfer: once you’ve deployed one Node.js app, you can deploy anywhere.

Before publishing, run server.js locally and deploy it to Render once. It takes about ten minutes and confirms every step matches today’s dashboard. Also use your SEO plugin’s FAQ block for the FAQ section so Google can show those answers in search results.

Want me to turn this into an import file so it lands in WordPress as a draft post with the categories already set?

Leave a Reply

Your email address will not be published. Required fields are marked *