EthioDeploy
DocsPricingDomainsBlogToolsChangelog
Deploy guides/Node.js

Deploy a Node.js app

Express, Fastify, Hono, NestJS and plain Node apps all deploy the same way: we run your start script. The only requirements are the port and the bind address.

Last updated September 29, 2026

What we run by default
Detected by
package.json
Install
npm ci / pnpm / yarn (from your lockfile)
Build
npm run build (if you have one)
Start
npm start, then main, then index.js

These run automatically, so leave the command fields blank. Only override them in Settings → Build if you need something different.

Fix this first: Bind 0.0.0.0 and read PORT

Listen on 0.0.0.0, not localhost, and take the port from the PORT environment variable. Otherwise the platform can't reach your app and the health check fails, even though it runs fine on your laptop.

Prepare your app

Listen on the port we give you, on all interfaces:

Express

const port = process.env.PORT || 3000;
app.listen(port, '0.0.0.0');

Fastify

await fastify.listen({
  port: Number(process.env.PORT) || 3000,
  host: '0.0.0.0',
});

Hono

serve({
  fetch: app.fetch,
  port: Number(process.env.PORT) || 3000,
  hostname: '0.0.0.0',
});

NestJS

await app.listen(process.env.PORT ?? 3000, '0.0.0.0');

Then make sure package.json has a start script. For TypeScript, compile in build and run the output:

"scripts": {
  "build": "tsc",
  "start": "node dist/index.js"
}

For NestJS use "build": "nest build" and "start": "node dist/main". We build on Node 22 by default, and engines.node in package.json overrides it. Dev dependencies are installed during the build, so build tools like tsc or the Nest CLI can live there.

Environment variables

Add variables in the project's settings. They're available both while the app builds and while it runs, so build-time values (like framework-public keys) work without extra setup. See Environment variables. Read them with process.env.NAME. Never commit a .env file.

Add a database

Add a Postgres addon (or Redis) and DATABASE_URL (or REDIS_URL) is injected automatically. Read it with process.env.DATABASE_URL.

There's no separate pre-deploy step yet, and the database isn't reachable while the app builds, so run migrations before the server starts: set the Start command in Settings → Build to, for example, npx prisma migrate deploy && npm start. Make migrations safe to run more than once.

Deploy

  1. Sign in with GitHub and install the EthioDeploy app on the repo.
  2. Click “New Project” and pick the repo.
  3. Watch the build in the dashboard. When the health check passes, your app is live at <project-slug>.ethiodeploy.app. Every push to the default branch redeploys, and the old version keeps serving until the new one is healthy.

Troubleshooting

Health check times out+

Cause: The app listens on localhost or a hardcoded port.

Fix: Listen on 0.0.0.0 and read PORT.

Cannot find module '…/index.js' on start+

Cause: There's no start script, so we fell back to index.js.

Fix: Add "start" to package.json, or set a Start command in Settings → Build.

Cannot find module '…/dist/…'+

Cause: TypeScript was never compiled.

Fix: Add a build script (tsc or nest build) and start from dist/.

Unsupported engine or syntax errors+

Cause: The app needs a different Node version than 22.

Fix: Set engines.node in package.json.

App crashes at boot with missing config+

Cause: An env var your code needs isn't set.

Fix: Add it in Settings and redeploy. The build log shows the crash.

Still stuck? Check the deployment's build log in the dashboard, or see Troubleshooting.

Questions

Yes. The Free plan runs one project with a 512 MB Postgres database at no cost. The app sleeps after 30 minutes without traffic and wakes on the next request, and the container has 256 MB of memory. Pro ($10/month) keeps it always on with 1 GB.

Yes. Compile in your build script (tsc or nest build) and point start at the output in dist/. Dev dependencies are installed during the build, so TypeScript can stay a dev dependency.

Yes. Set the project's Service Type to Background Worker when you create it or in Settings → Build. Workers get no HTTP health check and never sleep when idle, even on the Free plan.

Node 22 by default. Set engines.node in package.json to use a different version.

Ready to deploy?

Sign in with GitHub and pick your repo. No Dockerfile, no YAML.

More guides

PythonSvelteKitTanStack Start

All guides on the deploy guides page. Custom domains, env vars, addons and billing are in the docs.

On this page
Prepare your appEnvironment variablesAdd a databaseDeployTroubleshootingQuestions
Deploying with an agent?Point it at llms.txt. Every guide is in one file there.Open llms-full.txt →
EthioDeploy

Agentic first development and deployment, started in Ethiopia, built for developers everywhere.

Telegram community
Product
PricingAI coding agentAgent mode docsDomainsCLIFree backend hostingHosting in EthiopiaChangelog
Deploy guides
Next.jsNode.jsPythonSvelteKitTanStack StartAstroNuxtReact RouterHonoStrapiDjangoFastAPIFlaskStreamlitExpressNestJSLaravelRailsGoTelegram botDiscord botLovableBoltReplitv0Google AI StudioBase44Firebase StudioClaude Code & Cursor
Compare
vs Herokuvs Vercelvs Rendervs Railwayvs Fly.iovs Netlifyvs KoyebHeroku alternativesVercel alternativesNetlify alternativesRender alternativesRailway alternativesFly.io alternativesReplit alternativesPythonAnywhere alternativesDigitalOcean App Platform alternativesGlitch alternatives
Resources
DocsBlogFree toolsAboutSupportContactllms.txt
© 2026 EthioDeployPay by card in USD or bank transfer in ETBTermsPrivacy