Choose where your bot will run
A Discord gateway bot needs a process that stays running and can reconnect to Discord. A local PC or Raspberry Pi can do that while it has power and internet. A VPS gives you an always-running machine, with updates, process supervision and backups to manage. A managed worker runs the bot with a console and restart controls in the dashboard.
Bothosting’s free Spark plan gives one bot 256 MB of RAM, 25% CPU and 512 MB of storage. Renew Spark every 7 days for continued service. Paid plans start at $2.25 a month with 1 GB of RAM. For Java or a large cache, check memory before choosing. Read the VPS decision guide e o worker hosting comparison.
Put a test bot online
- Create a Discord application and install it in a test server with the bot and application-command scopes. Read the Discord setup guide for the install steps.
- Baixe o discord.js starter ou discord.py starter. Put the project at the deployment root with its dependency manifest. For existing code, deploy the bot from GitHub.
- Choose the matching Discord runtime. Save the application’s token as
BOT_TOKENin Variables and verify the entry file. Stop a local copy using the same token. - Start the deployment and open Console. The JavaScript starter logs
BOT_READY. In Discord, select the new app’s/pingcommand and look forpong. Switch off your development PC and send the command from another device.
Keep the bot online after the first reply
Set a reminder before your free plan renews. On either plan, enable restart on crash for a long-running bot and configure Discord notificações para paradas inesperadas. A restart can bring the process back after a brief failure. Repeated errors need a code, token or resource fix.
Keep the project in Git or another backup location, and keep backups of any SQLite files or other data. Restart once after saving a setting, then verify the same value from Discord. If you run a second process that needs the same state, read when to move beyond SQLite.
Find where a startup failed
Read the first Console error from the failed start. If there is no login attempt, check the entry file and dependencies. If login fails, follow the TokenInvalid and LoginFailure guide. If Discord closes the gateway with 4014, check the privileged intents requested by the code.
When Console shows a connection but Discord has no command, check registration and installation. If the bot works and then exits, use the exit reason and resource use in Overview to distinguish a deliberate stop, expired capacity or a crash.