Hosting a Discord bot on Vertra Cloud
A Discord bot runs on Vertra Cloud as a bot-type application: a background process with no exposed HTTP port, restarted automatically when it crashes and streamed live to the dashboard log. Vertra Cloud is a Brazilian application hosting platform (PaaS), and Discord, WhatsApp and Telegram bots are first-class workloads on it — the same containers, snapshots and metrics as any other application. This guide covers bothdiscord.js (JavaScript) and discord.py (Python).
Discord.js (JavaScript)
Structure
package.json
vertracloud.config
Example
Discord.py (Python)
Structure
requirements.txt
vertracloud.config
Example
Deploy
- Dashboard
- CLI
- VS Code
- Compress the project into a
.zip(folders likenode_modules,venvandtargetare removed automatically) or push it to GitHub. - In the dashboard, click New Project and upload the
.zipor paste the repository URL. - In Build, check the runtime (JavaScript or Python), the main file (
index.jsormain.py) and the memory. Start and build commands are under Advanced settings. - Add your environment variables in Environment.
- In Network, leave web publishing off: a bot doesn’t receive incoming traffic and runs in the background on any plan.
- Review and deploy. Follow the output in the Logs tab.
Available Versions
Node.js
Python
Notes
- Bot Type: Always select Bot when creating the application (not Website)
- Environment variables: Configure
DISCORD_TOKENin the application’s variables - Auto-restart: On by default, keeps the bot online in case of disconnection
- Memory: 256MB is enough for simple bots, 512MB+ for complex ones
- Logs: Use
console.log()(JS) orlogging(Python) to monitor in real-time - Gateway: Both libraries keep a persistent WebSocket connection to the Discord gateway, so the bot needs no incoming traffic and no web publishing