ESN Docs

Docs › Discord bots

Upload and start your Discord bot (Python, Node.js or Java)

3 min readUpdated Oct 31, 2026

Step by step: upload your Discord bot to ESN Hosting with the file manager or SFTP, set the start file, add requirements.txt or package.json, keep your token in .env, press Start and read the console.

This guide takes a bot that runs on your computer and gets it running 24/7 on your ESN server. It works for every bot plan, from ESN Nano ($0.50/month) up.

Before you start #

  • A bot server on the panel that matches your language: Python, Node.js or Java. On an older free Nano, use the Bot type menu on your dashboard to switch.
  • Your bot's token from the Discord Developer Portal. See Create a Discord bot and get its token.

1. Upload your files #

  1. Open your server on the panel and go to Files.
  2. Choose Upload, or drag your files onto the page. For lots of files, upload one .zip, then open its menu (the three dots) and choose Unarchive.
  3. Make sure your main file sits in the top folder, not inside a folder that came from your zip. Move files up if needed.

Prefer an app like FileZilla or WinSCP? Use SFTP with your panel password. See Using SFTP.

Don't upload: node_modules, venv or .venv, __pycache__ or .git. They're big, and the server installs your packages itself (step 3).

2. Set your start file #

Go to Startup and check the variable that says which file runs:

Server typeVariableDefault
Python botMain Python Filemain.py
Node.js botMain JavaScript Fileindex.js
Java botJAR FILEyour .jar (older free Nano: bot.jar)

Type your file's exact name, including capitals (Bot.py and bot.py are different). It saves on its own.

3. Add your packages #

  • Python: list your packages in requirements.txt in the top folder, one per line, for example discord.py and python-dotenv. They're installed every time the server starts.
  • Node.js: upload your package.json (and package-lock.json if you have one). The server runs npm install every time it starts.
  • Java: build a single "fat" jar that already includes its libraries, and upload that.

More detail: How to install packages for your bot.

4. Add your token safely #

The panel doesn't have a token box, so keep the token in a file called .env instead of in your code:

  1. In Files, choose New File.
  2. Put one line in it, with your real token after the = and no quotes or spaces: DISCORD_TOKEN=your-token-here
  3. Save it as .env in the top folder.

Then read it in your code:

  • Python (add python-dotenv to requirements.txt): from dotenv import load_dotenv, then load_dotenv() near the top, then bot.run(os.getenv("DISCORD_TOKEN"))
  • Node.js (add dotenv to package.json): require("dotenv").config(); at the top, then client.login(process.env.DISCORD_TOKEN);
Keep it secret: anyone with your token controls your bot. Never paste it in Discord or share screenshots of .env. If it leaks, reset it in the Developer Portal and update .env.

5. Press Start and read the console #

  1. Go to Console and press Start.
  2. First you'll see packages installing. That can take a minute the first time, and it's quicker after that.
  3. Then your bot's own messages appear, such as "Logged in as YourBot". Your bot should show as online in Discord.

The panel may keep saying Starting for a bot. That's normal: if the console shows your bot logged in, it's running. If it stops with an error instead, look it up in Common bot errors and fixes.

Making changes later #

Upload the changed files over the old ones, then press Restart. Your bot keeps running when you close the panel or turn off your computer. See How to keep a Discord bot online 24/7.

Still stuck? Use the live chat on the panel or ask in the ESN Systems Discord. Last updated October 31, 2026.