Upload and start your Discord bot (Python, Node.js or Java)
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 #
- Open your server on the panel and go to Files.
- 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. - 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.
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 type | Variable | Default |
|---|---|---|
| Python bot | Main Python File | main.py |
| Node.js bot | Main JavaScript File | index.js |
| Java bot | JAR FILE | your .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.txtin the top folder, one per line, for examplediscord.pyandpython-dotenv. They're installed every time the server starts. - Node.js: upload your
package.json(andpackage-lock.jsonif you have one). The server runsnpm installevery 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:
- In Files, choose New File.
- Put one line in it, with your real token after the
=and no quotes or spaces:DISCORD_TOKEN=your-token-here - Save it as
.envin the top folder.
Then read it in your code:
- Python (add
python-dotenvto requirements.txt):from dotenv import load_dotenv, thenload_dotenv()near the top, thenbot.run(os.getenv("DISCORD_TOKEN")) - Node.js (add
dotenvto package.json):require("dotenv").config();at the top, thenclient.login(process.env.DISCORD_TOKEN);
.env. If it leaks, reset it in the Developer Portal and update .env.5. Press Start and read the console #
- Go to Console and press Start.
- First you'll see packages installing. That can take a minute the first time, and it's quicker after that.
- 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.