Back to stack index

Runtime

Node.js

Server runtime for JS chat backends.

Short answer

Node.js is the open-source runtime that executes JavaScript and TypeScript outside the browser, built on Google's V8 engine. It runs the servers of many open-source AI tools, including LibreChat, LobeChat, Botpress, Typebot and n8n. On October 21, 2026, the Node.js project shipped security releases for its active lines: Node.js 26.12.1 on the Current line and 24.22.1 on the Long Term Support line. Production servers should run an LTS release, which in October 2026 means Node.js 24, and should apply the October security release. Node.js is free under the MIT license. For AI apps, Node's event loop handles many simultaneous streaming connections efficiently, its fetch and web streams APIs make proxying model responses simple, and official SDKs from OpenAI, Anthropic and Google all support it. Most self-hosted Node AI tools ship as Docker images that bundle the right Node version.

Current line
Node.js 26.12.1, October 21, 2026
nodejs.org
LTS line
Node.js 24.22.1, October 21, 2026
nodejs.org
License
MIT
Node.js GitHub
Directory projects
LibreChat, LobeChat, Botpress, Typebot, n8n
Project repositories

Updated October 21, 2026How we evaluate tools

Official site

Directory projects (5)

  • LibreChat

    Multi-model chat UI with plugins, agents, and self-hosted deployment.

  • LobeChat

    Modern chat shell for running and comparing multiple models locally or via API.

  • Botpress

    Visual builder for conversational agents with hooks for custom NLU and actions.

  • Typebot

    Visual chatbot builder you can embed or self-host.

  • n8n

    n8n accelerates app backends or internal tools with frameworks you can self-host.

Node.js in open-source AI tools: the runtime behind LibreChat, LobeChat, Botpress, Typebot and n8n in 2026

What Node.js does

Node.js, created by Ryan Dahl in 2009, runs JavaScript on servers. Its key design choice is non-blocking I/O: instead of a thread per connection, one event loop handles many connections, starting each network or file operation and moving on until the result arrives. That model suits servers that mostly wait, and AI app servers wait a great deal, on model APIs that take seconds to finish a reply.

Node also includes a large standard library for HTTP, files, streams, crypto and child processes, and npm, the largest package registry in the world.

Which directory projects use it

ProjectWhat it isNode's role
LibreChatMulti-provider chat with agentsExpress API server, MCP client, file handling
LobeChatChat with pluginsNext.js server routes running on Node
BotpressChatbot and agent platformServer and integrations in TypeScript on Node
TypebotConversational form and chatbot builderBuilder and viewer apps on Node with Next.js
n8nWorkflow automation with AI agentsEntire app, including the workflow engine and AI nodes

n8n is the largest of these. Its AI agent nodes, built on LangChain.js, let users connect models, memory, vector stores and tools in a visual editor, all executed by Node.

The October 21, 2026 security releases

On October 21, 2026, Node.js published security releases for its supported lines: 26.12.1 for Current and 24.22.1 for LTS. Security releases are announced in advance on the Node.js blog, then released with a post listing each fixed vulnerability and its severity. The October releases arrived the same week other vendors removed trust for a compromised eMudhra intermediate certificate authority, an incident that also prompted updates to Python and Docker Desktop.

If you self-host Node AI tools from Docker images, update to images built on the patched Node versions; projects typically publish new images within days. If you run Node directly, upgrade with your version manager.

Release lines

LineStatus in October 2026Use
26CurrentTesting new features
24LTSRecommended for production
22Maintenance LTSStill supported; plan to move to 24
20End of life (April 2026)Upgrade now

Node.js releases a new major version every April and October. Even-numbered versions become LTS and are supported for about 30 months in total. The project has discussed changing to one major release a year, so check the official schedule for future lines.

Features that help AI apps

  • Built-in fetch and web streams. Node supports the same fetch, ReadableStream and TextDecoderStream APIs as browsers, so proxying a model's streamed reply needs no extra libraries.
  • TypeScript type stripping. Recent Node versions run .ts files directly by removing type annotations, which simplifies scripts and small services.
  • Built-in test runner with mocking, useful for testing tool-calling logic with recorded model responses.
  • Permission model. Flags restrict file system, network and child process access, a useful layer for running AI-generated code or untrusted MCP servers.
  • Worker threads for CPU-heavy work such as parsing large PDFs or tokenizing, without blocking the event loop.
  • Built-in SQLite module for small local stores.

Streaming model responses

A Node chat server's main job is relaying streams. The official OpenAI and Anthropic SDKs return async iterables, so the server loops over chunks and writes each to the HTTP response as a server-sent event. Two details matter: flush headers immediately so the browser starts reading, and stop the upstream request when the client disconnects, or you keep paying for tokens no one will see. An AbortController tied to the request's close event handles this.

Memory and scaling

A Node process uses one CPU core for JavaScript. To use more cores, run several processes behind a load balancer, or use Node's cluster module. The default heap limit depends on system memory; services that hold large documents in memory may need --max-old-space-size raised. n8n, for example, documents memory settings for workflows that process big files, and recommends queue mode with separate worker processes for heavy workloads.

WorkloadTypical memory per process
Chat API server at idle100 to 300 MB
n8n main process200 to 500 MB, more with large workflows
Document processing workerCan spike to several GB with large PDFs

Alternatives: Bun and Deno

Bun and Deno run most Node code and are faster in some tasks. Bun, which Anthropic acquired in December 2025 and uses to ship Claude Code, has fast startup and a built-in package manager. Deno has a security permission system by default and runs TypeScript natively. For self-hosting the projects above, stick with Node.js unless a project documents another runtime; their dependencies and Docker images target Node.

Supply-chain security

Node apps install hundreds or thousands of npm packages. npm has suffered repeated attacks, including the 2025 worm campaigns that stole maintainer tokens and published infected versions of popular packages. For self-hosters, official Docker images reduce the risk, since dependencies are fixed at build time. For developers: commit lock files, use npm ci in builds, consider disabling install scripts by default, enable npm's trusted publishing and provenance for your own packages, and run npm audit or a similar scanner.

Agent frameworks for Node.js

Node has a full set of libraries for building AI agents, which is part of why so many AI products run on it:

LibraryWhat it offers
Vercel AI SDKOne API across providers, streaming, tool calls, structured output and agent loops
LangChain.js and LangGraph.jsChains, retrievers and graph-based agents; used by n8n's AI nodes
MastraTypeScript agent framework with workflows, memory and evaluations
OpenAI Agents SDK for JavaScriptAgents, handoffs and guardrails
Claude Agent SDKThe agent loop and tools behind Claude Code, usable in your own apps
Official MCP SDKBuild MCP servers and clients

Self-hosting checklist

  1. Use the project's Docker image or the Node version in its .nvmrc or engines field.
  2. Run behind a reverse proxy with buffering off for streaming routes.
  3. Set NODE_ENV=production for performance and safer error messages.
  4. Use a process manager or container restart policy so crashes recover.
  5. Update images after each Node security release.

Contributing

Node AI projects typically use pnpm or npm workspaces, TypeScript, ESLint or Biome, and Vitest or Jest. Use a version manager such as nvm, fnm or Volta to match the project's Node version. When adding provider integrations, follow existing patterns for streaming and cancellation, and add tests with recorded responses rather than live API calls.

Related: JavaScript stack, TypeScript stack, n8n stack, Electron stack, Docker stack, Stack index.

Frequently asked questions

Which Node.js version should I use for self-hosted AI tools?

The version the project documents, usually an Active LTS line. In October 2026 that is Node.js 24, and the latest patch is 24.22.1 from October 21. If you use the project's Docker image, the right version is already included; update the image to pick up security fixes.

What is the difference between Current and LTS releases?

Current releases get new features first and are supported for a shorter time. Even-numbered major versions become Long Term Support releases each October and receive fixes for about 30 months. Production systems should use LTS. Node.js 26 is the Current line in October 2026 and is expected to enter LTS later in its cycle.

Why do AI chat servers use Node.js?

A chat server spends most of its time waiting on model APIs and databases. Node's single-threaded event loop handles thousands of waiting connections with little memory, and it streams data naturally. The same language runs in the browser, so teams can share code and types between client and server.

Can Node.js run AI models locally?

Through bindings and libraries, yes: node-llama-cpp wraps llama.cpp, Transformers.js runs ONNX models in Node, and ONNX Runtime has a Node package. Most Node apps instead call a local model server such as Ollama over HTTP.

How do I find out what the October 2026 security releases fixed?

Read the security release post on the Node.js blog, which lists each CVE, its severity and the affected versions. Node.js publishes advance notice of security releases a few days before they ship.

Sources

  1. Node.js releases
  2. Node.js blog and security releases
  3. Node.js release schedule
  4. n8n on GitHub