Run & Host
Run & Host Your Bot
From blocks to a bot that is online in your server. This is the same list the Finish & host page shows, with a little more detail.
How it works
Your bot is a small program, and Cubevate writes it for you. To make it work, a computer has to run it. That is called hosting. If that computer is switched off, the bot sleeps. The first time takes about 10 minutes.
Tip: Want to try the bot first with no download? Connect your server on My server and use Live mode, Run my bot here.
Watch the video
Watch the full walkthrough: how to host your Discord bot 24/7 on a bot host and set up the Dashboard, step by step.
Step 1: make your bot on Discord
- Open the Discord developer page and log in with your normal Discord account.
- Click New Application, give it a name (this becomes your bot’s name), tick the box and press Create.
- On General Information, copy the Application ID and paste it on Cubevate’s Finish & host page. It is safe to share.
- Click Bot in the left menu, press Reset Token, then Copy. That is your bot’s secret key, like a password. Discord only shows it once. If you lose it, press Reset Token again.
Careful: Never show your secret key to anyone, never post it in Discord, and never put it in a file you share. Cubevate never puts it in shared files or backups.
Step 2: switch on the right intents
Under Bot, Privileged Gateway Intents are switches that let your bot see more. Cubevate tells you which ones your bot needs on the Finish & host page. Press Save Changes at the bottom after switching.
| Intent | You need it when your bot… |
|---|---|
| Message Content Intent | reads what people write (for example “Someone sends a message” or “Someone types a !command”). |
| Server Members Intent | looks at the member list, joins and leaves, roles, or counts humans and bots. |
| Presence Intent | reacts to people’s online status. |
Step 3: add the bot to your server
On Finish & host choose how many powers to give the bot, then press Add the bot to my server. Discord opens. Choose your server (you need the Manage Server power there), press Continue and Authorize.
| Choice | Meaning |
|---|---|
| Just what it needs (recommended) | Only the powers your blocks use, like View Channel, Send Messages, Embed Links and Read Message History. |
| Everything (Administrator) | Easiest on your own server, but gives the bot every power. |
| Nothing | You set the powers up yourself. |
Careful: After the bot joins, open Server Settings, Roles and drag the bot’s role above any role it should give out or manage. Discord does not let a bot touch roles above its own.
Step 4: connect Cubevate to your server (optional)
On My server, paste the secret key and press Connect, then click your server. Cubevate then shows your real channels, roles, emoji and people. The key goes only to Discord itself and is kept on your computer only. Tick Remember only on your own computer.
Step 5: download your bot
On Finish & host press Download my bot (.zip). You get a folder with everything inside:
| File | What it is |
|---|---|
bot.js | Your bot. |
my-secrets.txt | Where your secret key goes, after DISCORD_TOKEN=. |
start.bat / start.sh | Double-click (Windows) or run (Mac, Linux) to start the bot. |
package.json | The list of helpers the bot needs. |
Dockerfile and Procfile | For Docker and bot hosts. |
test-storage.bat / test-storage.sh | Checks that your bot’s memory works. |
README-FIRST.txt | Short instructions. |
The zip also has index.js, a small starter file for hosts that always start index.js. bot.js and index.js both work, so use whichever your host wants as its startup file.
There are also buttons to download only bot.js, copy the code, or just look at it.
Careful: Only tick Put my secret key inside the download if you will keep the zip private.
Step 6: switch it on
On your own computer
- Unzip the download (right-click, Extract All).
- Open
my-secrets.txtin Notepad and paste your secret key afterDISCORD_TOKEN=. Save. - Windows: double-click
start.bat. Mac or Linux: open a Terminal in the folder and typesh start.sh. - The first time it may open the Node.js page. Install the free LTS version, then start again.
- Wait for the green check mark message. Your bot is online.
The bot is only awake while that black window is open and the computer is on. To turn it off, close the window.
On a bot host, Docker, or an old PC
Finish & host has a tab for each. A bot host keeps your bot online all day. If the host does not install the helpers by itself, your bot installs discord.js the first time it starts, so the first start takes a little longer. Ask the host whether it keeps your files when the bot restarts (look for persistent disk or volume). If it does not, choose a cloud database for your bot’s data.
Step 7: control it from the Dashboard (optional)
The Dashboard page turns Cubevate into a control panel for a bot that runs on a host. Switch it on in the Dashboard’s Set up tab, download your bot again, and follow the four steps there: download, give the bot the dashboard password (the DASHBOARD_KEY line in my-secrets.txt, or a variable on your host), start it, then paste its address and the password and press Connect. Cubevate remembers the connection until you press Forget connection.
| Dashboard tab | What it does |
|---|---|
| Overview | Is it awake, for how long, how many servers. |
| Modules | Switch blocks on or off live. |
| Edit settings | Change words, numbers, colours, channels and roles instantly, without a restart. |
| Send a message | Make your bot post something. |
| Memory & data | Look at what your bot remembers. |
| Activity log | The bot’s notes in plain words. |
| Giveaways | Start giveaways, watch people join live, edit the message, end, cancel or re-roll, and keep or reuse past ones. |
| Polls | Post a question with buttons and watch live result bars. |
| Scheduled posts | Have the bot post a message later, once, daily or weekly. |
| Server stats | People joining and leaving, messages per day, busiest hours (counts only). |
| Scores & lists | A leaderboard for coins, points or XP, with give, take and set, and tidy up lists. |
| Tickets | See open ticket channels and close them. |
| Mod log | Bans, kicks and timeouts with private notes (needs the View Audit Log permission). |
| Alerts | How your feed and Twitch alerts are doing. |
| Health | Restarts, memory, problems with a fix, and a permission check. |
| Welcome & goodbye | Welcome message, private hello, goodbye and an automatic role. |
| Roles | Role button panels and automatic roles. |
| Custom commands | Simple /commands with random answers, questions, buttons and cooldowns. |
| Warnings & reports | Look people up and clear warnings and reports. |
| Economy | Coins, /daily, /work, a shop with roles and games. |
| Achievements | Badges for messages, coins, streaks and time, with role and coin rewards. |
| Backup & restore | Save and restore your bot memory. |
| Levels & XP | XP for chatting, levels, rewards, level-up message, /rank and /leaderboard. |
| Member lookup | One card per person: roles, warnings, notes, coins, level, invites and more. |
| What the bot did | A list of what the bot did on its own, with the reason. |
| Invite tracker | Which invite links bring people, who invited whom, who stayed. |
| Command manager | Switch commands off, add cooldowns or limit them to roles. |
| Command Legend | A /legend command that lists all your commands in groups. |
| Maintenance | One switch that makes every command answer with your message. |
| Update my bot | Step-by-step help to upload a new version. |
| Set up / Connection & help | Connect, forget the connection, and get help. |
The tabs under More tools and the Community pages (Giveaways, Welcome & goodbye, Economy, Achievements and the others) need the newest bot: download your bot again and replace bot.js on your host. With the Dashboard on, the bot also asks for the message and moderation switches, and the invite link adds the View Audit Log permission. Use the new invite link, or turn that permission on in your server settings. The Invite tracker also needs the Manage Server permission, and the pin and unpin blocks need Pin Messages. The newest invite link already includes both. Voice and reaction achievements use extra switches that the bot asks for by itself.
The address looks like http://address:port. It starts with http://, and the port is the one your host shows on its Network or Ports page. Cubevate also tries http:// by itself when https:// does not work.
Careful: The dashboard password lets someone control your bot. Never share it. Delete the
DASHBOARD_KEYline to switch the dashboard link off.
Updating a bot that is already online
- Change your blocks and press Download my bot again.
- On your host open the file manager and replace only
bot.js(andpackage.jsonif the README says so). - Do not replace
my-secrets.txtor your data folder, so your key, password and memories stay. - Restart the bot and check the Dashboard’s activity log.
Tip: On bot-hosting.net, use the Files tab to upload, put
DASHBOARD_KEYin the Environment tab, and press Restart in the Console. The startup file can bebot.jsorindex.js.
Where your bot remembers things (Bot data)
When your bot is switched off it forgets everything, unless it writes things in a notebook. The Memory boxes page decides what to write down. The Bot data page decides where the notebook lives. If you are not sure, answer the three little questions on that page and Cubevate tells you.
| Choice | Good for | Things to know |
|---|---|---|
| A file on the computer (data.json) | Your own computer. The easiest. No sign-up. | Many free bot hosts erase files when the bot restarts. One bot at a time. Slow with tens of thousands of people. |
| SQLite (one database file) | Faster and safer than a plain file. No account needed. | Still a file, so hosts that erase files erase it too. Needs Node.js 22 or newer. |
| PostgreSQL | Bot hosts. Survives restarts and moves. Free starter plans exist. | You need an account on a database website and a connection address. |
| MySQL / MariaDB | When your host already gives you one. | Some web hosts do not allow outside connections. |
| MongoDB | A beginner-friendly cloud website with a free starter cluster. | Allow your bot’s address in “Network Access”. Free clusters have a size limit. |
| Amazon DynamoDB | Very reliable and cheap for small bots, if you already use Amazon. | Needs an Amazon account with a bank card and more setup steps. Set a budget alert. |
After you choose, the download gets a ready-made test-storage checker. Double-click it (or run sh test-storage.sh) and it says The memory works! or tells you in plain words what to fix. Switching later is fine: the bot copies the old notebook over by itself.
Tip: Take
data.jsonwith you if you move the bot. You can make a copy any time by typingnode bot.js --export-data copy.jsonin the bot folder.
Make it official and share it
- On the developer page, General Information: add a picture, a description and tags.
- Under Installation, copy an Install Link to share (it needs Public Bot switched on). Only you will use it? Switch Public Bot off.
- Bot list websites (like top.gg) ask for your Application ID, a description and a link, and your bot must be online.
- When a bot is in many servers (around 75 to 100), Discord asks you to verify it and approve the special switches. Rules change, so check Discord’s page when you get there.
Tip: Test first in your own server. Try every block once and watch the black window for notes. They explain in plain words what went wrong.