# Configure Node.js on TurboStack

Enable the Node.js runtime on an application and proxy public traffic to it with Nginx.

![The NodeJS panel under Configure application > Technologies, enabled, with the version selector and the note to expose the application through the Reverse Proxy tab|1000](../../assets/screenshots/technologies/nodejs.png)

## Where to configure it

The Node.js runtime is configured per application. In the TurboStack Platform, open an application and go to **Configure application > Technologies > NodeJS**, then choose the version your application should use.

To publish the application, you also enable the reverse proxy so Nginx forwards public traffic to the local port your Node.js process listens on. See [Configure the reverse proxy](../reverse-proxy/configure.md) for that side of the setup.

## YAML configuration

### Required

| Key | Meaning |
| --- | --- |
| `nodejs_version` | The Node.js major version to install, for example `"24"` (or newer). Setting this enables the Node.js runtime for the application. |

> [!NOTE]
> There is no separate "enable" key. Node.js is installed for an application as soon as you set
> `nodejs_version` on it, and is left out when you omit the key.

### Optional

These keys are typically added together with the reverse proxy so public traffic reaches your app.

| Key | Meaning |
| --- | --- |
| `proxy_enabled` | Enables the Nginx reverse proxy for the application. |
| `proxy_upstream_port` | The local port your Node.js application listens on. |

```yaml
nodejs_version: "24"

# Publish the app via the nginx reverse proxy
proxy_enabled: true
proxy_upstream_port: 3000   # the port your Node.js process listens on
```

## Permissions

Harden the files and directories in your application so files are readable but not writable by the group, and directories stay traversable. Run these from the parent of your application's directory (replace `~/app` with wherever your Node.js application lives):

```bash
find ~/app -type f -exec chmod 644 {} \;
find ~/app -type d -exec chmod 755 {} \;
```

This sets files to `644` (owner read/write, others read-only) and directories to `755` (owner read/write/traverse, others read/traverse).

## Common tasks

- [set the Node.js version](set-node-version.md)
- [keep a Node.js app running](run-with-process-manager.md)

## Related

- [What is Node.js?](what-is.md)
- [Keep a Node.js app running](run-with-process-manager.md)
- [Configure the reverse proxy](../reverse-proxy/configure.md)
- [TurboStack CLI](../../api/cli.md) - `tscli app backends` shows the configured process manager.
- [Applications overview](../../applications/index.md)
