- Order a Discord Bot server and choose the runtime: Node.js or Python.
- Upload your code via the Files tab (drag the folder's contents in, not the folder) or SFTP. Leave out
node_modules/and virtual environments, since they are installed on the server. - Set the start file: Startup →
MAIN_FILE(Node, defaultindex.js) orPY_FILE(Python, defaultapp.py) to your entry file's name. - Dependencies: Node installs from your
package.jsonautomatically on every start; Python installs fromrequirements.txt. See Dependencies. - Token: put it in a
.envfile or a config file, never in the code. See Token security. - Start. The console shows
npm install/pip installoutput, then your bot's own log lines (Logged in as ...).
Folder layout that works
/ (server root)
index.js or app.py
package.json or requirements.txt
.env
commands/ ...
If your project has a src/ folder, set MAIN_FILE to src/index.js.
RAM
Most bots are happy with 512 MB-1 GB. Music bots and bots with image processing want 2 GB.