Skip to content
Discord bots

Upload and start your Discord bot

Published on 3 October 2026

You get your bot online by uploading your files, putting your token in a .env file and letting the server install your packages. Then you start it from the console. This guide assumes a Node.js bot built with discord.js; the differences for Python and Java are in the questions at the bottom.

What do you need?

  • Your bot code with a package.json, plus package-lock.json if you have one.
  • Your bot token from the Discord Developer Portal.
  • The name of your entry file, for example index.js.

Which language and version should you pick?

Open your bot in the game panel and go to Startup. Under Discord Bot Runtime, choose Node.js Bot; the game panel then sets the matching Docker Image for you. Pick Node.js 24 or 26 under Docker Image: according to its own documentation, discord.js 14.27 needs Node.js 24.17.0 or newer. Enter your entry file under Startup File.

How do you upload your files?

  1. Go to File managers, click Upload and choose Upload Folder for your project folder. SFTP works too.
  2. Make sure package.json sits in the main folder.
  3. Don’t upload the node_modules folder. The server builds it for you.

How do you keep your token safe?

Never put your token in your code. Open Bot Studio and choose Env Editor. Click Add Variable, name it TOKEN, paste your token as the value and click Save .env. It’s stored in the .env file in your main folder. In your code, load it with the dotenv package: require('dotenv').config(), then use process.env.TOKEN.

How do you install your packages and start the bot?

  1. Go to Settings and choose Reinstall Server. Your own files stay where they are.
  2. The server reads your package.json and installs your packages. With a package-lock.json you get exactly the versions listed in it.
  3. Once the installation has finished, go to Console and click Start.
  4. When you see the message your bot prints on login, such as Logged in as ..., it’s online. It keeps running after you close the game panel.

To update: stop your bot, upload the changed files and start it again. Added packages to package.json? Run Reinstall Server again first.

What if your bot won’t start?

Everything your bot reports shows up in the console. Find the first error message. If it says Cannot find module with the name of your own entry file, Startup File is wrong. If it names a package, the installation didn’t work: run Reinstall Server again and watch the console to see where it fails. Intents and Discord error codes are covered in Keep your Discord bot online 24/7.

What are the common mistakes?

  • Uploading node_modules from your own computer. Our bots run on Linux servers with ARM processors, so packages with compiled code from a Windows PC won’t work there. Let the server install them.
  • Packages under devDependencies. The installation skips those. Put what your bot needs under dependencies.
  • Your token in your code or on GitHub. If it leaks, click Reset Token in the Discord Developer Portal and put the new token in .env.

Frequently asked questions

Does this work for a Python bot?

Yes. Choose Python Bot under Discord Bot Runtime and enter your entry file under Startup File, such as main.py. If your bot reports a missing package on start (ModuleNotFoundError), open a ticket and we’ll take a look with you.

And a Java bot?

Choose Java Bot and upload your bot as a single .jar file with all its dependencies inside. Enter that file’s name under Startup File.

Do I need to reinstall after every change?

No, only when your packages change. For ordinary code changes, a restart is enough.

Where can I run my bot if I don’t have a server yet?

Have a look at our Discord bot hosting. Your bot runs day and night there, even when your PC is off.

More questions? See all frequently asked questions

Related articles