Deploy your first Node.js app on NeoHeberg
Application hosting runs your Node.js code without giving you root access. You provide a project that starts with a known command, listens on the provided port and writes errors to standard output. The platform handles the rest.
Prepare the project
A minimal project contains package.json, a main file and its dependencies:
{
"name": "my-app",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"dependencies": {
"express": "^5.0.0"
}
}The server must read the port from the environment and listen on all interfaces:
const express = require("express");
const app = express();
const port = Number(process.env.PORT ?? 3000);
app.get("/", (_req, res) => res.send("Online"));
app.get("/health", (_req, res) => res.json({ status: "ok" }));
app.listen(port, "0.0.0.0", () => {
console.log(`Listening on ${port}`);
});Never hard-code the port: on application hosting, the value is provided by the platform. Also keep a simple health route to check startup.
Create the service
In the dashboard, choose an application hosting service, then Node.js and a version (22 LTS or 24, depending on availability). Use a clear name such as my-app. Note the RAM, disk and allocations shown: they limit what the application can consume.
Upload the files
Use the Pterodactyl file manager to upload a project archive, then extract it at the server root. The default main file is index.js; if your entry point has another name, adjust MAIN_FILE in the environment variables.
Do not upload node_modules: the start command runs npm install when package.json is present. Do upload package-lock.json for reproducible versions.
Start and verify
Start the server from the panel, then open the console:
npm installmust finish without errors;- the
Listening on ...line must appear; - the
/healthroute must return{"status":"ok"}through the provided allocation.
If the process restarts in a loop, read the first error, not the last. Common causes are a missing main file, an undeclared dependency or a hard-coded port.
Update
Upload the new files, restart the server and check /health and the logs again. For sensitive values, use the panel environment variables, never a file committed to Git.
Advertisement
Was this article helpful?
Read next
- Protect application secretsEnvironment variables, rotation, logs and Git: keep secrets out of the code.
- Deploy your first Python app on NeoHebergPrepare main.py and requirements.txt, create the Python service, start and verify.
- Back up application dataInventory, copy consistently, move the backup offsite and test the restore.