Skip to main content
All guides

Your first Discord bot host

Uploading your bot, picking the start file, packages and your token.

1. How do I put my bot on the server?

Upload your bot files in the Files tab or over SFTP. Or, if your code is on GitHub, fill in Git Repo Address in the Startup tab (plus Git Username and Git Access Token for a private repository) and choose Reinstall Server in the Settings tab to pull it in.

2. How does the server know which file to run?

In the Startup tab, set Main file (Node.js), for example index.js, or App py file (Python), for example bot.py. Then press Start and watch the Console.

3. How do I install packages?

Include a package.json (Node.js) or requirements.txt (Python) with your code; packages from it are installed every time the bot starts. You can also list extra packages in the Startup tab.

4. Where do I put my bot token?

In a file on the server that your code reads, such as .env or config.json, never in code you share or push to a public GitHub repository. If a token ever leaks, reset it in the Discord Developer Portal straight away.

New to running a server