App hosting

Node.js hosting

Run a Node.js application or Discord bot on RHQ App Hosting.

Your Node.js app runs on our hosting panel (Pterodactyl). It suits Discord bots, APIs and small web apps.

  1. Upload your project

    Open the Files tab and upload your project: package.json, your source files and everything else the app needs. Do not upload node_modules.

  2. Set the main file

    Open the Startup tab and set the main file to the one that starts your app, for example index.js.

  3. Add your secrets

    Put tokens and keys in a .env file or in the environment variables offered in Startup. Never write them into your code.

  4. Start the app

    Press Start. Dependencies from package.json are 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:

js
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.