How do I deploy a discord.js bot?
Create your bot application at discord.com/developers/applications and add it to your Discord server with the appropriate permissions. Copy the bot token from the Bot page; you will need it as an environment variable.
In the panel, go to the Startup page for your server and add an environment variable named TOKEN (or whatever your code reads) with your bot token as the value. Never put the token directly in your code files; environment variables keep it out of version control and out of your file uploads.
Upload your bot files via File Manager. Your project needs a package.json with a main or start field pointing to your entry file. The panel runs npm install on first start to install your dependencies from package.json. Make sure discord.js is listed under dependencies, not devDependencies.
If your start command is not node index.js, update it on the Startup page under the start command field. Common alternatives: node src/bot.js, node . (uses the main field in package.json).
After uploading files and setting the start command, click Start. Check the Console page for errors. Common issues: missing TOKEN environment variable (bot will throw an error about an invalid token), missing dependencies (run npm install manually from the Console if needed), or a syntax error in your code. The console output will show the exact error.
To update your bot code, stop the server, upload the new files via File Manager, and start again. If you have added new dependencies, the panel will run npm install again automatically.
Want to try this on a real server?
Everything described here is available on the trial too, on the same hardware and the same panel as the paid plans. Try it free for 24-hour, no credit card required.
Didn't fix it? Ask in Discord.
Ask in our Discord - we help with hosting questions whether or not you host with us.