Node.js Configuration

Last change on 2025-11-18 • Created on 2025-10-08 • ID: KO-61572

Node.js

Node.js is a JavaScript runtime environment that allows JavaScript code to run outside the browser — in the backend. It is used to build server-side applications, APIs, and real-time applications such as chats or live dashboards. With its asynchronous, event-driven architecture, Node.js can handle many processes simultaneously, making it ideal for scalable web applications. It is also a great choice for developing tools and automation scripts. Thanks to its integrated package manager npm, the platform is highly versatile.

Activate Node.js

You can activate Node.js from Webhosting L in konsoleH. Log in, select a domain, and click on "Services; Node.js configuration" on the left. Then you can activate Node.js on the right with the red button.

On Managed Servers you need to enable Node.js via "Reseller functions" under your server first. Then, select "Manage packages" and choose the account type for which you want to use Node.js. After saving your new settings, return to the "Product overview" and select the domain. On the left, you will now see "Settings; Node.js Configuration".

Please note that all other web applications (such as PHP or HTML applications) will be deactivated when you activate Node.js for the selected domain. The konsoleH menu is for running your Node.js web application permanently and making it accessible via your domain.

Do you still need other web applications, such as PHP, under the domain? For example, for your CMS? If Node.js is included in your product, it is already installed on the server in different versions. Alternatively, you can specify the desired Node.js version in your account via SSH. This allows you to use Node.js without activating or configuring it via konsoleH:

echo 24 > ~/.nodeversion

Node.js configuration

In konsoleH, you can configure the following and save your changes:

  • Script path: Path to your script, relative to the working directory
  • Working directory: Path, relative to the home directory, where your Node.js script lies
  • Log file: Here you can specify a path to a log file relative to the home directory
  • Memory limit: Specify a memory limit
  • Version: Select the Node.js version
  • Arguments: Add your own arguments
  • Environment variables: Add your own environment variables from your script

Examples

Hello World

  1. Create a new folder in your home directory named nodejs-hello-world and create a file app.js with the following content:

    const { createServer } = require('node:http');
    
    const server = createServer((req, res) => {
      res.statusCode = 200;
      res.setHeader('Content-Type', 'text/plain');
      res.end('Hello World');
    });
    
    server.listen(() => {
      console.log("Application is running...");
    });

    You can use WebFTP, an FTP client, or SSH to create the file.

  2. Open the Node.js Configuration menu on konsoleH and fill in the fields with the appropriate values:

    Node.js Hello World Settings

  3. Click Save Settings and activate Node.js by clicking the Activate button.

  4. Open your domain in a browser – you should see "Hello World".

n8n

  1. Log into your server via SSH.

  2. Install n8n:

    NODEVERSION=22 npm install -g n8n
  3. Open the Node.js Configuration menu on konsoleH and fill in the required values:

    Node.js n8n Settings

    Make sure to set the environment variable WEBHOOK_URL to the URL where the application will run.

  4. Click Save Settings and activate Node.js.

  5. Open your domain in a browser – the n8n setup page should appear.

Uptime Kuma

  1. Log into your server via SSH.

  2. Download and set up Uptime Kuma:

    git clone https://github.com/louislam/uptime-kuma.git
    cd uptime-kuma
    NODEVERSION=20 npm run setup
  3. Open the Node.js Configuration menu on konsoleH and fill in the required values:

    Node.js Uptime Kuma Settings

  4. Click Save Settings and activate Node.js.

  5. Open your domain in a browser – the Uptime Kuma setup page should appear.

Table of Contents