Cyber Edge Hosting's Node.js bot plans run your own bot on Node.js 24 LTS. You supply the application, code and Discord token. These steps cover a bot that maintains its connection to Discord; a project requiring a public HTTPS endpoint may need additional setup.

Upload your project

  1. Open your service in the game control panel. Stop it before replacing files and back up any existing code, configuration and saved data.
  2. Use Files or your panel's SFTP details to upload your project into the server's main folder. Include package.json and package-lock.json. Avoid an extra enclosing folder and do not upload Windows node_modules. For TypeScript, build your project locally and upload the compiled JavaScript.
  3. Under Startup, set Main file to the relative entry-file path, such as index.js or dist/index.js. Enter a filename, without command arguments. The hosting template runs this file directly; it does not run npm start.
  4. Leave Install dependencies on start at 1. With a lockfile, startup uses npm ci; otherwise it uses npm install. Development dependencies are omitted, so packages needed by the running bot belong in dependencies. Keep both package files synchronized for repeatable installs.

Add your token privately

Create .env in the server's main folder using Files. Use the variable name your code expects, for example DISCORD_TOKEN=YOUR_PRIVATE_TOKEN. Replace the placeholder privately. This template loads that file automatically; your code can access process.env.DISCORD_TOKEN. See Node's environment-variable documentation.

Never put the token in Startup, console commands, checkout fields, screenshots or a public repository. Only trusted users should have file access: .env is not a separate secrets vault.

Start and verify

Install your application into your Discord server through the Discord Developer Portal, granting only required permissions. Start the hosting service and wait for dependency installation. The panel's “Starting customer bot process” message does not confirm Discord login. Look for your bot's own ready message, test a command in Discord, then restart once to confirm it returns online.

¿Le ha resultado útil esta respuesta? 0 Los usuarios encontraron esto útil (0 Votos)