---
title: "How to install Node on a VPS with nvm and manage versions | StreetHosting"
description: "Use nvm to install and switch Node versions on your VPS without conflicts. Ideal for bots and APIs that need different versions. Switch fast, nothing breaks."
url: "https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps"
type: "page"
language: "en-US"
---

VPS · 3 min · Intermediate

Published on Jun 17, 2026 · Updated on Jun 17, 2026

# Install Node on a VPS with nvm

Different projects need different Node versions. nvm solves that by installing and switching between versions with one command, without messing up the system or needing root privileges.

By [Equipe StreetHosting](https://streethosting.com.br/en/autores#equipe-streethosting) · StreetHosting infrastructure and support team

[Deploying and running apps](https://streethosting.com.br/en/guides/topics/deploy)

Summarize with:

[](https://chat.openai.com/?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Finstall-nodejs-nvm-vps.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "ChatGPT") [](https://claude.ai/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Finstall-nodejs-nvm-vps.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Claude") [](https://www.google.com/search?udm=50&aep=11&q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Finstall-nodejs-nvm-vps.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Google AI Mode") [](https://x.com/i/grok?text=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Finstall-nodejs-nvm-vps.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Grok") [](https://www.perplexity.ai/search/new?q=Summarize%20the%20key%20points%20of%20this%20StreetHosting%20guide%3A%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Finstall-nodejs-nvm-vps.%20Highlight%20the%20step-by-step%20instructions%2C%20the%20prerequisites%20and%20the%20most%20common%20mistakes. "Perplexity")

Share:

[](https://x.com/intent/tweet?text=How%20to%20install%20Node%20on%20a%20VPS%20with%20nvm%20and%20manage%20versions&url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Finstall-nodejs-nvm-vps "Share on X") [](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Finstall-nodejs-nvm-vps "Share on Facebook") [](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Finstall-nodejs-nvm-vps "Share on LinkedIn") [](https://wa.me/?text=How%20to%20install%20Node%20on%20a%20VPS%20with%20nvm%20and%20manage%20versions%20https%3A%2F%2Fstreethosting.com.br%2Fen%2Fguides%2Fvps%2Finstall-nodejs-nvm-vps "Share on WhatsApp")

For agents: Copy as Markdown [.md](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps.md)

In this guide 5 sections

* [Why use nvm](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#por-que-nvm)
* [Install nvm](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#instalar)
* [Install versions](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#versoes)
* [Version in production](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#producao)
* [Best practices](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#boas-praticas)

Quick answer

**nvm**installs and switches between Node versions on your VPS with no root and no conflicts. Install nvm under the applications' user, install the version your project needs, set a default, and make sure PM2 or systemd uses the correct Node path at boot. That way, projects with different versions live side by side on the same machine.

## Why use nvm[](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#por-que-nvm)

One bot wants one Node version, an API wants another. Installing Node straight from the system locks you into a single one and makes switching painful. nvm solves that by keeping several versions side by side, ready to switch. It is the natural companion for anyone running [Node APIs on a VPS](https://streethosting.com.br/en/guides/vps/host-nodejs-on-vps).

## Install nvm[](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#instalar)

Install nvm under the user that will run the applications, not root. After installing, reload the terminal so the command becomes available. From there, all version management happens without administrator privileges.

## Install versions[](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#versoes)

1. Install the Node version your project needs.
2. Install other versions as needed.
3. List the installed versions to check.
4. Switch between them with one command.

Declare the Node version in the project. That way, anyone who clones the code knows exactly which version to use, with no guesswork.

## Version in production[](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#producao)

systemd usually does not see nvm by default. Point the service at the full path of the correct Node, or the application may start with the wrong version at boot.

Configure the process manager for the right version by following [PM2 or systemd](https://streethosting.com.br/en/guides/vps/pm2-vs-systemd-nodejs).

## Best practices[](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#boas-praticas)

* nvm installed under the user, no root
* Node version declared per project
* Default version set for boot
* Process manager pointing at the correct Node

With nvm, your VPS can run as many Node projects as you need without version conflicts. For bot deploys, see [deploying with PM2](https://streethosting.com.br/en/guides/discord-bots/deploy-discord-bot-pm2) and take a look at the [Ryzen VPS](https://streethosting.com.br/en/vps/ryzen).

In this guide

* [Why use nvm](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#por-que-nvm)
* [Install nvm](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#instalar)
* [Install versions](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#versoes)
* [Version in production](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#producao)
* [Best practices](https://streethosting.com.br/en/guides/vps/install-nodejs-nvm-vps#boas-praticas)

## Frequently asked questions

Why not install Node straight from the system?

You can, but you get stuck on one version and switching is a chore. nvm lets you keep several versions installed and switch with one command, which is ideal when different projects need different versions.

Does nvm need root?

No. It installs Node in the user's home directory, with no administrator privileges. That is safer and avoids conflicts with system packages, and it makes it easier to separate environments by user.

How do I make sure the right version runs in production?

Set nvm's default version and configure the process manager to use it. A common gotcha is systemd not seeing nvm, so point the service at the correct Node path.

Can I use different versions for different projects?

Yes. That is exactly what nvm is for. Each project can declare the version it needs, and you switch as you work on each one, without reinstalling anything.

Next step

See VPS plans

Root VPS in Brazil with NVMe and Anti-DDoS.

[See VPS plans](https://streethosting.com.br/en/vps)

[See Ryzen VPS Ryzen 9 9950X VPS in São Paulo with root access, NVMe and gamer Anti-DDoS.](https://streethosting.com.br/en/vps/ryzen) [See bot plans 24/7 Discord bots with fast activation and support in Portuguese.](https://streethosting.com.br/en/bots)

## Related guides

[VPS Intermediate How to host a Node.js app on a VPS in Brazil A Node.js app in production needs a process manager, a reverse proxy, HTTPS and automatic restarts. Follow the complete walkthrough on an Ubuntu VPS in São Paulo, close to your users and to Brazilian integrations. 9 min Read guide](https://streethosting.com.br/en/guides/vps/host-nodejs-on-vps) [VPS Intermediate PM2 vs systemd: keep your Node app always online on a VPS Your app needs to come back on its own after a crash and start together with the VPS. PM2 and systemd solve this in different ways. Here is how to set up each one and which to pick. 3 min Read guide](https://streethosting.com.br/en/guides/vps/pm2-vs-systemd-nodejs) [Discord bots Intermediate Deploy a Discord bot with Node.js and PM2: env vars and auto restart PM2 is a popular Node process manager for Discord bots because it restarts after a crash, survives reboots when paired with the startup hook and centralizes basic logs without standing up a whole Kubernetes cluster. This guide covers the ecosystem file, env vars for the token and how it fits hosting in Brazil. 4 min Read guide](https://streethosting.com.br/en/guides/discord-bots/deploy-discord-bot-pm2)

[← Back to the Guide Center](https://streethosting.com.br/en/guides)
