Your Node.js app runs on our hosting panel (Pterodactyl). It suits Discord bots, APIs and small web apps.
-
Upload your project
Open the Files tab and upload your project:
package.json, your source files and everything else the app needs. Do not uploadnode_modules. -
Set the main file
Open the Startup tab and set the main file to the one that starts your app, for example
index.js. -
Add your secrets
Put tokens and keys in a
.envfile or in the environment variables offered in Startup. Never write them into your code. -
Start the app
Press Start. Dependencies from
package.jsonare installed on start, so the first start takes longer. Watch the Console for errors.
Web apps and APIs
If your app listens for HTTP, use the port assigned to your server (shown in the panel). Pterodactyl also exposes it as the SERVER_PORT environment variable:
const port = process.env.SERVER_PORT || 3000;Updating
Upload the changed files, then press Restart. If you added packages, update package.json so they install on the next start.