Knowledge base

1000 FAQs, 500 tutorials and instructional videos. Here, there are only solutions!

Modify a Node.js configuration

Update 09/03/2026

This guide explains how to adjust the configuration of a Node.js site hosted on the Infomaniak infrastructure. You will learn how to adapt your application's behavior based on its evolution, dependencies, or your technical preferences.

 

Prerequisites

  • Install a Node.js site on your hosting.
  • Test your changes locally before applying them in production.
  • Verify that your scripts (start, build) are properly defined in your package.json file.
  • If you modify the structure of your project, remember to adjust the execution folder and the associated commands.
  • Important: the listening port defined in the Manager must imperatively match the one used in the application's code.

 

Accessing the configuration

Each site has a dedicated dashboard to control the application (start, stop, restart), view execution logs, manage Node.js versions, and activate SSL certificates:

  1. Click here to access the management of your site on the Infomaniak Manager (need help?).
  2. Click directly on the name assigned to the site in question:
  3. Click on Manage advanced settings:
  4. Click on the Node.js tab to access the settings:

 

Commands and automation

Execution folder

The execution folder indicates the location on the server where the build and launch commands will be executed. It should point to the root directory of your application, where your package.json file is located.

./          // Root directory
./app       // Subfolder named app
./backend   // Subfolder named backend

 

Build command

If your application requires a preparation step (installing dependencies, compiling TypeScript, minifying), enter the command to execute here. This is the recommended method for deploying your updates.

Unlike a manual execution in SSH, this interface uses an environment with boosted performance to guarantee a fast build without impacting the resources of your site in production. You can chain multiple tasks here (such as a git pull followed by a build) and track the progress as well as the logs of the process in real time directly from the Manager.

# Example: install dependencies and build
npm install && npm run build

# Example: update code and build with yarn
git pull && yarn install && yarn build

Note: If your project is already compiled or does not require any intermediate steps, this field can remain empty.

 

Launch command

This instruction starts your server. It should be identical to the one used in your local development environment to launch the application's entry point.

# Option 1: Direct file launch
node index.js

# Option 2: Using npm script
npm start

# Option 3: Using yarn script
yarn start

 

Listening port

Your application must imperatively listen on the dynamic port assigned by the Manager. This port is passed to your code via the PORT environment variable.

// Use the port provided by the environment
const port = process.env.PORT || 8080;

app.listen(port, () => {
  console.log(`Application started on port ${port}`);
});

 

Node.js version

You can select the desired Node.js version in the settings. It is advisable to prioritize a stable (LTS) version to ensure the security and longevity of your project.

 

Apply and validate the changes

Once your changes are saved in the Manager, you must restart your application from the dashboard so that the new parameters (new Node version, new port, or new build command) are taken into account.

If you encounter difficulties during startup, you can consult the execution console or refer to this other guide for troubleshooting.


Has this FAQ been helpful?