Hosting Discord.js v14 Bots on NodeFlux Applications | NodeFlux.eu Docs

Deploy modern Discord.js v14 bots using gateway intents, environment variables, and event handlers.

Steps

  1. Prepare your Discord bot project locally and ensure package.json specifies "node": ">=18.0.0".
  2. Include required dependencies in package.json: "discord.js": "^14.0.0".
  3. Use process.env.DISCORD_TOKEN for authentication rather than hardcoding tokens in code.
  4. Upload project files to NodeFlux Node.js service using SFTP or panel File Manager (exclude node_modules).
  5. Configure DISCORD_TOKEN in the service Environment Variables panel.
  6. Install dependencies via panel package installer or npm ci workflow.
  7. Set entry point script (e.g., node index.js) and start the service.
  8. Verify bot signs online in your Discord server and logs clean gateway connection.

Notes