WORKLOAD DOCUMENTATION

Node.js VPS Setup and Management

Use Node.js and npm on Ubuntu KVM. Deploy an application, manage its process and configure public HTTPS access.

Overview, platform and installed software

This guide covers a provisioned Ubuntu 24.04 LTS KVM Workload. Check the version installed on your server.

The documented runtime provides Node.js 24 and npm in /usr/local/bin. Express and external process managers are optional dependencies.

Choose resources, order and sign in

Public configuration baseline: 1 vCPU, 1 GB RAM and 25 GB storage. Allow headroom for your application and data.

Select the Workload and region in the Builder and confirm availability and the quote. After provisioning, connect via SSH using the access details for your service.

Initial configuration and practical examples

Keep dependencies in the project directory and commit the lockfile. Use npm ci when a lockfile is present. Install Express in the project if needed and bind the application to a local port behind a reverse proxy.

Application management, settings and security

Run the app under a dedicated user. Set the absolute Node path, working directory and restricted environment file in your service definition. Terminate HTTPS at the reverse proxy and check logs after a restart.

Updates, backups and recovery

Back up project files, lockfiles, service settings and data. Manage secrets separately. Test runtime and dependency updates first. Restore the known working runtime and lockfile, then verify the proxy and application health.

Troubleshooting, limitations and FAQ

When Node works in SSH but fails under systemd, check the absolute runtime path, service user, working directory and environment.

Getting Started

  1. Check Node.js and npm

    Connect to your VPS over SSH. Node.js 24.22.0 and npm 11.19.1 are available in /usr/local/bin.

    /usr/local/bin/node --version
    /usr/local/bin/npm --version
  2. Create a project and add a dependency

    Run these commands in your home directory. npm installs dependencies into the project directory.

    mkdir -p hello-node
    cd hello-node
    npm init -y
    npm install picocolors
  3. Run a JavaScript app

    Run this in the hello-node directory. The example uses the installed dependency to print a message.

    printf '%s\n' "console.log(require('picocolors').green('Hello from Node.js'));" > hello.cjs
    node hello.cjs