Python Bots (discord.py)
Upload main.py alongside requirements.txt so dependencies install automatically. Add your bot token inside Settings instead of hardcoding it.
discord.py python-dotenv
Default entry file: main.py
Prepare your files for your chosen runtime, upload them in the file manager or pull from GitHub, and go live in two minutes.
Upload main.py alongside requirements.txt so dependencies install automatically. Add your bot token inside Settings instead of hardcoding it.
discord.py python-dotenv
Default entry file: main.py
Upload index.js and package.json — the server automatically installs listed dependencies on startup.
{
"name": "my-discord-bot",
"main": "index.js",
"dependencies": {
"discord.js": "^14.0.0"
}
}
Default entry file: index.js
Build a fat/shadow JAR locally with Gradle or Maven, then upload it to your root folder named bot.jar.
./gradlew shadowJar # Output: build/libs/*-all.jar -> upload as bot.jar
Default entry file: bot.jar
The Free tier does not compile Rust on-server to keep CPU fast. Build a Linux x86_64 binary and upload it named bot.
cargo build --release # Output: target/release/<name> -> upload as bot
Default binary name: bot
Save this snippet to .github/workflows/build.yml in your repository, download the compiled artifact from the Actions tab, and upload it to your bot.
name: Build Linux binary
on:
workflow_dispatch:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --release
- uses: actions/upload-artifact@v4
with:
name: discord-bot-linux
path: target/release/your-binary-name
your-binary-name with your Cargo binary name, and never push your Discord token to GitHub!