Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
VGSources
Blog

How to Set Up a Node.js Development Environment on a VPS for a Team

Build a reliable team Node.js VPS with nvm, a pinned Node 24 runtime, a non-root deploy account, PM2 startup persistence, and Nginx HTTPS. Includes Node 26 upgrade planning and troubleshooting.
Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a team VPS in October 2026, install Node.js with nvm rather than Ubuntu’s packaged Node.js, use Node 24 (the current Active LTS line), and commit an .nvmrc file so every developer uses the same runtime. Run the application as a dedicated non-root deploy user under PM2, persist PM2’s process list with pm2 startup and pm2 save, then put Nginx and SSL in front of the app.

Node 26 was released on 5 May 2026 and is scheduled to become LTS on 28 October 2026. Keep production on Node 24 until Node 26 has entered LTS and your dependencies and deployment have been tested against it. Node 20 reached end of life on 30 April 2026, so it should not be the baseline for a new team environment.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the Node.js release before configuring the server

The runtime decision affects every developer, the CI build, native dependencies, and the process that runs on the VPS. Pin one major version in the repository instead of allowing each shell or deployment to select its own “latest” release.

Node.js line Status in October 2026 How to use it
Node 24 Active LTS Use as the production and team-development baseline now.
Node 22 Maintenance LTS Keep only when an existing application still requires it; do not choose it for a new baseline when Node 24 is supported.
Node 26 Released 5 May 2026; scheduled to become LTS on 28 October 2026 Test on a staging branch now, then consider production after the LTS transition and dependency checks.
Node 20 End of life since 30 April 2026 Migrate away; it is not an appropriate production target for this setup.

The Node.js project has also announced a cadence change beginning with 27.x: instead of two major releases each year, the project plans one major release per year and intends every release to become LTS. The reported schedule places Alpha in October 2026, Current in April 2027, and LTS in October 2027. Treat those future dates as a planning signal and verify the official release schedule before making a long-term upgrade commitment.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Why nvm is the practical team choice

Ubuntu’s apt packages are convenient, but distribution repositories often lag behind Node.js releases and make side-by-side version switching awkward. nvm installs Node per user, permits several major versions on one VPS, and lets a project select its runtime through .nvmrc. That matters when one game service is being upgraded while another still depends on an older maintenance line.

Install method Strengths Team trade-off
nvm Per-user installations, multiple Node versions, project-level selection with .nvmrc, and straightforward upgrades. The shell must load nvm for every user that runs Node. Global npm tools belong to the user who installed them.
Ubuntu apt package Simple system-package management and familiar OS updates. Packages are often outdated, and switching versions for different projects is harder.

Use nvm for the deploy account and document the selected version in the repository. Do not mix a system-wide apt Node installation with an nvm-managed deployment unless you have a specific reason and know which binary each service will execute.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Plan the VPS layout for a team

A small team can run several services on one VPS, but ownership must be unambiguous. Give the application and its PM2 daemon to a dedicated account such as deploy. Developers should connect with their own SSH accounts and use a controlled deployment process; they should not share the deploy account’s private key or run the application as root.

Minimum responsibilities

  • Operating-system administration: one or more administrators manage Ubuntu updates, firewall rules, users, Nginx, and certificates.
  • Application ownership: the deploy user owns the checked-out repository, the nvm installation, npm’s global tools, PM2, logs, and the running process.
  • Developer access: each developer uses a personal SSH key and contributes through the repository and review workflow rather than editing production files manually.
  • Runtime contract: the repository contains .nvmrc, a lockfile, build scripts, and the PM2 ecosystem file used for deployment.

Create a non-root deploy user

  1. From an administrative account, create the account:
    sudo adduser --disabled-password --gecos "" deploy
  2. Install the deploy user’s SSH public key in /home/deploy/.ssh/authorized_keys, set ownership to deploy, and restrict the directory and file permissions.
  3. Keep day-to-day Node, npm, and PM2 commands in a shell owned by deploy. Use sudo only for system tasks such as Nginx configuration and the one-time PM2 startup command.
  4. Choose one application directory, for example /srv/game-api, and make the deploy user its owner. Keep secrets outside the Git checkout or inject them through the service environment.

Installing PM2 globally under one developer’s nvm tree and then asking another user to run it commonly produces “command not found” errors or a daemon that cannot see the application. A dedicated deploy user avoids that split ownership.

Install nvm and pin Node 24

Install nvm using the installer documented by the nvm project, then open a new login shell so the nvm initialization is loaded. Do not hard-code an old installer tag in team documentation; nvm release tags change, while the commands below remain the important part of the setup.

  1. Switch to the deploy account:
    sudo -iu deploy
  2. Confirm that nvm is loaded:
    command -v nvm
    nvm --version

    If the first command prints nothing, start a new login shell or load the nvm initialization in the account’s shell profile before continuing.

  3. Install the current LTS line:
    nvm install --lts

    In October 2026 this should resolve to Node 24. Check the result rather than assuming:

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
    Rank #2
    Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
    • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
    • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
    • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
    • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
    • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
    node --version
    npm --version
    nvm current
  4. Set the default for new shells:
    nvm alias default 24

    This keeps interactive sessions on Node 24, while a project’s .nvmrc remains the authoritative per-repository setting.

  5. Install the exact major version explicitly if the LTS alias has moved by the time you provision another server:
    nvm install 24
    nvm alias default 24
    nvm use 24

Record the observed node --version in the deployment log. The major version is the compatibility boundary; npm will report its own version separately.

Make every checkout use the same runtime

At the repository root, create a file named .nvmrc containing the major line selected for the service:

24

Commit that file. A developer can then enter the project directory and run:

nvm install
nvm use

With an existing Node 24 installation, nvm use selects the version in .nvmrc. On a new machine, nvm install reads the same file and installs the required line. Team documentation and CI should execute the same check:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
test "$(node -p 'process.versions.node.split(`.`)[0]')" = "24"
node --version

Use the project’s lockfile with npm ci so each deployment resolves the dependency tree recorded by the team. A typical deployment sequence is:

  1. Change into the checkout:
    cd /srv/game-api
  2. Select the project runtime:
    nvm use
  3. Install the locked dependencies:
    npm ci
  4. Run the application’s build script, if the project has one:
    npm run build
  5. Start or reload the service through the committed PM2 ecosystem file.

Do not commit production secrets, private keys, or a developer’s shell profile. Keep environment-specific values in the process environment or a protected file readable by the deploy account.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Run the app with PM2

PM2 supplies a Node-focused process manager, keeps the application running after a crash, and can restore it after a VPS reboot when its startup hook and saved process list are configured. Install it globally as the deploy user, not with sudo:

npm install -g pm2
pm2 --version

Use an ecosystem file

Store a small, reviewed configuration file in the repository. If the project’s package.json declares "type": "module", name the PM2 file with a .cjs extension so Node treats the configuration as CommonJS:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
module.exports = {
  apps: [{
    name: 'game-api',
    script: './dist/server.js',
    env: {
      NODE_ENV: 'production',
      PORT: 3000
    }
  }]
};

Replace the script path with the file produced by your build. Keep the port bound to the local VPS interface; Nginx will publish the public HTTPS endpoint. Add only environment values that are safe to store in the repository. Inject database passwords, API keys, and signing secrets through the deployment environment instead.

Start, inspect, and persist the service

  1. From the project directory, select Node 24 and install/build the code as described above.
  2. Start the ecosystem file:
    pm2 start ecosystem.config.cjs --env production
  3. Check the process table:
    pm2 status
    pm2 logs game-api
  4. Verify the local health endpoint or service port from the VPS before exposing it through Nginx.
  5. Generate the system startup command:
    pm2 startup

    PM2 prints a command that includes the deploy user and a sudo invocation. Copy and run that printed command exactly from an administrative shell.

  6. Save the currently running process list:
    pm2 save

pm2 startup installs the boot-time integration; pm2 save records which processes should be restored. Run pm2 save again after adding, removing, or renaming an application. Test the arrangement with a planned reboot and then check pm2 status and the application health endpoint.

Deploy a new build without changing ownership

Keep the same deploy user for checkout, dependency installation, build, and PM2. After updating the repository, run:

cd /srv/game-api
nvm use
npm ci
npm run build
pm2 reload ecosystem.config.cjs --env production
pm2 save

A reload keeps PM2 in control of the process while replacing the running code. If the new build fails its health check, inspect pm2 logs game-api, correct the release, and reload the known-good commit. Do not “fix” a permissions problem by running the whole deployment as root; repair ownership and the deploy user’s environment instead.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Put Nginx and SSL in front of Node

Node should listen on an internal port while Nginx owns the public HTTP and HTTPS sockets. This separates internet-facing configuration from the application process and gives the team one place to manage redirects, request limits, and certificates.

Reverse-proxy configuration

Create an Nginx server block for the service’s DNS name. The following example forwards to a Node process listening on port 3000 and includes the headers commonly needed by applications that upgrade connections:

server {
    listen 80;
    server_name play.example.com;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

Replace the hostname and port with the values for the service. Enable the site, validate the configuration with sudo nginx -t, and reload Nginx with sudo systemctl reload nginx. Keep the Node port closed to the public network in the VPS firewall; only Nginx needs the public web ports.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add HTTPS

Obtain a certificate for the real hostname, configure Nginx to listen on 443 with that certificate, and redirect HTTP to HTTPS. A Certbot-based Ubuntu installation can request and wire the certificate with:

sudo certbot --nginx -d play.example.com

Confirm renewal is enabled by the certificate tooling, then test the public HTTPS URL and the application’s health endpoint. SSL belongs at the edge even when the Node process is private, because team dashboards, game APIs, authentication callbacks, and browser clients should not send credentials over plain HTTP.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Plan the Node 26 upgrade

Node 26 is available before its scheduled LTS date, but production guidance for Node.js is to use an Active or Maintenance LTS line. Keep the repository’s .nvmrc at 24 until the 28 October 2026 LTS transition and until the application has passed its own tests.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Staging procedure

  1. Create a staging checkout or branch and install Node 26 without changing production’s default:
    nvm install 26
    nvm use 26
    node --version
  2. Run the locked install, build, test suite, and a full smoke test against a staging database or isolated game service.
  3. Check native npm modules, startup scripts, PM2 configuration, WebSocket behavior through Nginx, and any code that depends on Node’s runtime APIs.
  4. After Node 26 is LTS on 28 October 2026, update .nvmrc in a reviewed change, deploy one environment, and monitor logs and health checks before moving the remaining services.
  5. Keep the Node 24 installation available during the rollout so a rollback is a one-command runtime switch rather than an emergency package reinstall.

When the team updates .nvmrc, update CI, the VPS default alias, and the deployment notes together. A project-level pin is the source of truth; the account-level default is only the fallback for new shells.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Team troubleshooting

nvm is not found

The command is usually being run in a non-login shell or under a different user. Confirm that you are the deploy account, open a fresh login shell, and check the account’s shell profile for the nvm initialization. Do not install a second system Node to work around a missing profile; that creates competing binaries.

The wrong Node version runs under PM2

PM2 inherits the Node environment of the user and shell that started its daemon. Run nvm use in the project directory, inspect node --version, then restart or reload the PM2 process as the deploy user. Check the executable path with which node and inspect PM2’s process details if the service still reports another major line.

PM2 works manually but not after reboot

Run pm2 status as the deploy user. If the list is empty, the startup command was not installed for that user or the latest process list was never saved. Run pm2 startup, execute the exact command it prints with administrative privileges, start the ecosystem file, and finish with pm2 save.

PM2 cannot find the ecosystem file

Use the complete filename and extension. A project marked "type": "module" should use ecosystem.config.cjs for a CommonJS PM2 configuration. Run the command from the repository directory or provide the absolute path to the file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Nginx returns 502 Bad Gateway

First check pm2 status and pm2 logs game-api. Then test the local upstream from the VPS, for example with curl http://127.0.0.1:3000/health. A stopped process, a port mismatch, or an application bound to a different address explains most 502 responses. After correcting the app, validate and reload Nginx rather than editing a live configuration blindly.

One developer’s global PM2 command is missing for another

That is expected with nvm: global npm binaries are installed per user and per nvm tree. Run PM2 under the dedicated deploy account and let developers trigger deployments through the team’s controlled workflow. Do not add random sudo npm install -g commands that bypass the selected nvm version.

Production readiness checklist

  • Node 24 is installed through nvm and verified with node --version.
  • The repository commits .nvmrc containing 24 and a dependency lockfile.
  • The application, npm global tools, PM2 daemon, and files are owned by a non-root deploy user.
  • The PM2 ecosystem file uses the correct extension for the project’s module type and contains no committed secrets.
  • pm2 startup has been completed for the deploy user and pm2 save has recorded the running process.
  • A reboot test confirms that the service returns without a manual login.
  • Nginx proxies the internal Node port, the Node port is not publicly exposed, and HTTPS is active for the public hostname.
  • The team has a tested staging path for Node 26 before changing production after its 28 October 2026 LTS date.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.