A Discord bot does not need a port or a website. Hyze recognizes discord.js and discord.py from your dependencies and considers the bot live once the process stays up.
Before you start
- The bot already starts on your computer with a single command, such as
node index.jsorpython bot.py. - You have the bot token. It lives in the Discord Developer Portal, under Bot → Reset Token.
- You have a Hyze Cloud account. Every sign-up gets a 7-day trial.
1. Prepare your code
Hyze reads your dependency manifest to find the runtime and the command that starts the bot. Lay out your files like this:- discord.js (Node.js)
- discord.py (Python)
package.json
index.js
- With a
startscript, Hyze starts the bot withnpm run start. - Without it, Hyze looks for an entry file such as
index.js,main.jsorbot.js. - Every library the bot imports must be listed in
dependencies(ordevDependencies). - Include
package-lock.json. It makes the installed versions match your PC.
2. Keep the token out of your code
The token is the bot’s password. Whoever has it controls the bot. So it never goes in your code or your repository: the bot reads it from theDISCORD_TOKEN environment variable.
To test on your PC, create a .env file and add it to .gitignore:
.env
DISCORD_TOKEN to the app’s Environment variables (step 3). The .env file does not need to be uploaded.
3. Deploy from GitHub or a ZIP
1
Create the app
In the dashboard, click New project and choose Import from GitHub or ZIP file.
- GitHub: connect your account and pick the repository and branch. With Automatic deployment on, every push publishes a new version.
- ZIP: files go at the root of the ZIP, not inside a folder. Leave out
node_modules,.venvand.env.
2
Check the configuration
- Memory: 256 MB is the minimum per app and is usually enough for a small bot.
- Public access: leave it off. A bot does not serve HTTP.
- Start command: leave it on Automatic. Use Custom only if the bot starts with a different command, such as
node src/index.js. - Automatic restart: on by default. Keep it that way.
3
Add the token
Under Environment variables, add the
DISCORD_TOKEN key with the bot token. If you already have a .env file, use Import .env.4
Deploy
Click Deploy application. Hyze installs the dependencies, starts the bot and watches the process.
4. Check the logs
Open the app and go to Observability → Console. Logs stream in real time, just like your PC’s terminal. Look for theOnline as ... line: once it shows up, the bot is connected to Discord.
If the deploy failed before the bot started, the reason is in the Deployments tab, under Logs for that deploy.
Stop the copy of the bot on your PC. With the same token running in two places, the bot may answer every command twice.
5. What happens when the bot crashes
With Automatic restart on:- The process died from an error: Hyze restarts the bot on its own.
- The machine rebooted: the bot comes back when the machine is up again.
- The bot died more than 3 times in 10 minutes: Hyze turns the app off and sends you a notification. Restarting in a loop does not fix anything: read the error in the Console, fix it and deploy again.
- The bot went over its memory limit: Hyze stops the app, without a restart loop, and lets you know. Raise the Memory in Settings and start the app again.
catch takes down the whole process. Register a handler so the error goes to the log without taking the bot with it:
index.js
Pricing
Every sign-up gets a 7-day trial. To keep the bot online after that, the Starter plan costs R$ 5.99 per month, paid in Brazilian reais via Pix. Plan memory is shared across your apps, so several small bots fit in the same plan.Put your bot online
Open the dashboard
Create the app, add
DISCORD_TOKEN and run your first deploy.Bot stops when I close the terminal
Why it happens and how the options compare.

