Deploy / Node.js

Deploy Node.js to Your Own Server

To deploy a Node.js app to your own server, install Temps on a Linux VPS and run up --preset nixpacks-node from the project root. Temps installs your dependencies, runs your build script, starts the app from your Procfile, start script or entry file, and puts it behind automatic HTTPS.

Last updated

Preset required

Choose the Autopack (Node.js) preset (nixpacks-node). Temps doesn't detect a plain Node.js service from its package.json; without a preset the build stops with "Could not auto-detect project type from files".

How to deploy Node.js with Temps

Commands run on your machine unless they say otherwise. The CLI runs with bunx or npx.

  1. 1

    Install Temps on a Linux server

    On a VPS with at least 2 CPU cores and 4 GB of RAM, download the installer, read it, then run it. It installs Docker if needed, the Temps binary and its database, and asks how the console is reached: an sslip.io address or your own domain.

    curl -fsSL https://temps.sh/deploy.sh -o deploy.sh
    less deploy.sh
    bash deploy.sh
  2. 2

    Log in from your machine

    Point the CLI at your Temps console. It opens a browser to approve the login.

    bunx @temps-sdk/cli login https://console.example.com
  3. 3

    Listen on PORT

    Temps sets PORT for the container. Bind to it on all interfaces, not just localhost, or the health check can't reach the app.

    const port = Number(process.env.PORT ?? 3000);
    app.listen(port, "0.0.0.0");
  4. 4

    Give Temps a start command

    If there's no start script, main field or common entry file, the build stops and asks for one. A Procfile web: line takes priority over everything else; other Procfile lines are ignored.

    Procfile
    web: node dist/server.js
  5. 5

    Deploy Node.js

    From the project root, run up with the preset, or set it under Project → Settings → Build & deploy → Build → Framework. If the directory isn't linked to a project yet, up walks you through creating one first. For a project created from a Git repository, pushes to the tracked branch deploy automatically.

    bunx @temps-sdk/cli up --preset nixpacks-node
  6. 6

    Create and link a PostgreSQL database

    Temps doesn't create a database for you. Create one, then link it to the project (or use Databases → Create database in the dashboard). Linking injects POSTGRES_URL plus POSTGRES_HOST, POSTGRES_PORT, POSTGRES_DB, POSTGRES_USER and POSTGRES_PASSWORD into the next deployment. It doesn't inject DATABASE_URL.

    bunx @temps-sdk/cli services create -t postgres -n my-api-db
    bunx @temps-sdk/cli services link --id <service-id> -p my-api

How Temps builds and runs Node.js

Every app runs in a Docker container on your server, behind the Temps proxy. Before traffic switches to a new deployment, Temps health-checks it; if the check fails, the deployment is marked failed and the current version keeps serving.

InstallThe package manager your lockfile or packageManager field points to
BuildYour build script, if there is one
StartThe first that exists: a Procfile web: line, your start script, main in package.json, or a common entry file such as server.js or index.js
Node.jsFrom .nvmrc, .node-version or engines.node; defaults to 24
EnvironmentNODE_ENV=production and PORT are set for you

What works with Node.js on Temps

  • Express, Fastify, Hono, NestJS or any HTTP server
  • Start command from a Procfile, start script or entry file
  • WebSockets through the reverse proxy
  • Health check before each cutover
  • Managed PostgreSQL and Redis you can link
  • Preview environments per branch (opt-in)

Managed services for Node.js

Temps runs these services on your server. Create one, link it to the project, and its connection variables reach the next deployment. Set up managed services.

PostgreSQL

Injects POSTGRES_URL (not DATABASE_URL) once linked

Redis

Injects REDIS_URL for caching, sessions and queues

Environment variables for Node.js

Set your own with environments vars set or in the project settings; values are encrypted at rest.

VariableWhat it does
PORTSet by Temps; read it in your server
NODE_ENVSet to production by Temps
POSTGRES_URLInjected when a managed PostgreSQL database is linked
REDIS_URLInjected when a managed Redis is linked

What it costs to self-host Node.js

Temps is free to self-host under MIT / Apache 2.0, with no per-seat fee and nothing metered, so hosting Node.js costs what the server costs. A Hetzner CX23 (2 shared vCPU, 4 GB RAM, 40 GB NVMe, 20 TB traffic) meets the minimum Temps needs and is €5.49/month excluding VAT, plus €0.50/month for an IPv4 address; Hetzner sells it in Germany and Finland only. Prices checked October 10, 2026.

TempsFree and open source (MIT / Apache 2.0)
ServerHetzner CX23: €5.49/month excluding VAT, plus €0.50/month for IPv4
What Node.js runsOne Node.js container, plus the managed PostgreSQL and Redis you link, on the same server.
ObservabilityWeb analytics, error tracking, session replay and uptime monitoring are included and run on the same server
Temps PremiumOptional: $399 per organisation per month for SAML SSO, SCIM, custom roles, approval gates and a tamper-evident audit log

For one to three production apps, the server guide recommends 4 vCPU and 8 GB RAM: a Hetzner CX33 is €8.49/month excluding VAT. Any Linux VPS that meets the minimum works; sizes and other providers are in Choosing a server. For what the same app costs on Railway, see Temps vs Railway.

Node.js on Temps: frequently asked questions

Why does my Node.js build stop with "Could not auto-detect project type"?

A package.json on its own isn't a detection signal. Choose the Autopack (Node.js) preset, with bunx @temps-sdk/cli up --preset nixpacks-node or under Project → Settings → Build & deploy → Build → Framework, and deploy again.

Can Temps run a separate worker process for my Node.js queue?

Not from a Procfile: Temps runs the web: process only and ignores worker: lines. Run the consumer inside the web process, or deploy the repository as a Docker Compose project that defines the worker as its own service.

Do WebSockets work for Node.js apps on Temps?

Yes. The reverse proxy passes WebSocket upgrades through to your app, so Socket.IO or ws work without extra configuration.

Included with every Temps project

Deployments, analytics, error tracking, session replay and uptime monitoring run in the same self-hosted platform, so your Node.js app doesn't need separate subscriptions for them.

Automatic HTTPS

Let's Encrypt certificates for every domain, issued and renewed for you.

Preview deployments

Turn on preview environments and each branch gets its own URL on your domain.

Web analytics

First-party analytics stored on your server. Add the React provider or a script tag.

Error tracking

Sentry-compatible: any Sentry SDK can report to the SENTRY_DSN Temps injects.

Session replay

Off by default. When on, it records the DOM with every input masked.

Uptime monitoring

HTTP monitors for your apps, with alerts through your notification channels.

Related guides

Deploy another framework

Deploy Node.js on a server you own

Temps is free and open source to self-host (MIT / Apache 2.0). You pay only for the server.