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.

Watch on YouTube

Step 1: make your bot on Discord

  1. Open the Discord developer page and log in with your normal Discord account.
  2. Click New Application, give it a name (this becomes your bot’s name), tick the box and press Create.
  3. On General Information, copy the Application ID and paste it on Cubevate’s Finish & host page. It is safe to share.
  4. 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.

IntentYou need it when your bot…
Message Content Intentreads what people write (for example “Someone sends a message” or “Someone types a !command”).
Server Members Intentlooks at the member list, joins and leaves, roles, or counts humans and bots.
Presence Intentreacts 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.

ChoiceMeaning
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.
NothingYou 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:

FileWhat it is
bot.jsYour bot.
my-secrets.txtWhere your secret key goes, after DISCORD_TOKEN=.
start.bat / start.shDouble-click (Windows) or run (Mac, Linux) to start the bot.
package.jsonThe list of helpers the bot needs.
Dockerfile and ProcfileFor Docker and bot hosts.
test-storage.bat / test-storage.shChecks that your bot’s memory works.
README-FIRST.txtShort 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

  1. Unzip the download (right-click, Extract All).
  2. Open my-secrets.txt in Notepad and paste your secret key after DISCORD_TOKEN=. Save.
  3. Windows: double-click start.bat. Mac or Linux: open a Terminal in the folder and type sh start.sh.
  4. The first time it may open the Node.js page. Install the free LTS version, then start again.
  5. 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 tabWhat it does
OverviewIs it awake, for how long, how many servers.
ModulesSwitch blocks on or off live.
Edit settingsChange words, numbers, colours, channels and roles instantly, without a restart.
Send a messageMake your bot post something.
Memory & dataLook at what your bot remembers.
Activity logThe bot’s notes in plain words.
GiveawaysStart giveaways, watch people join live, edit the message, end, cancel or re-roll, and keep or reuse past ones.
PollsPost a question with buttons and watch live result bars.
Scheduled postsHave the bot post a message later, once, daily or weekly.
Server statsPeople joining and leaving, messages per day, busiest hours (counts only).
Scores & listsA leaderboard for coins, points or XP, with give, take and set, and tidy up lists.
TicketsSee open ticket channels and close them.
Mod logBans, kicks and timeouts with private notes (needs the View Audit Log permission).
AlertsHow your feed and Twitch alerts are doing.
HealthRestarts, memory, problems with a fix, and a permission check.
Welcome & goodbyeWelcome message, private hello, goodbye and an automatic role.
RolesRole button panels and automatic roles.
Custom commandsSimple /commands with random answers, questions, buttons and cooldowns.
Warnings & reportsLook people up and clear warnings and reports.
EconomyCoins, /daily, /work, a shop with roles and games.
AchievementsBadges for messages, coins, streaks and time, with role and coin rewards.
Backup & restoreSave and restore your bot memory.
Levels & XPXP for chatting, levels, rewards, level-up message, /rank and /leaderboard.
Member lookupOne card per person: roles, warnings, notes, coins, level, invites and more.
What the bot didA list of what the bot did on its own, with the reason.
Invite trackerWhich invite links bring people, who invited whom, who stayed.
Command managerSwitch commands off, add cooldowns or limit them to roles.
Command LegendA /legend command that lists all your commands in groups.
MaintenanceOne switch that makes every command answer with your message.
Update my botStep-by-step help to upload a new version.
Set up / Connection & helpConnect, 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_KEY line to switch the dashboard link off.

Updating a bot that is already online

  1. Change your blocks and press Download my bot again.
  2. On your host open the file manager and replace only bot.js (and package.json if the README says so).
  3. Do not replace my-secrets.txt or your data folder, so your key, password and memories stay.
  4. Restart the bot and check the Dashboard’s activity log.

Tip: On bot-hosting.net, use the Files tab to upload, put DASHBOARD_KEY in the Environment tab, and press Restart in the Console. The startup file can be bot.js or index.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.

ChoiceGood forThings 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.
PostgreSQLBot hosts. Survives restarts and moves. Free starter plans exist.You need an account on a database website and a connection address.
MySQL / MariaDBWhen your host already gives you one.Some web hosts do not allow outside connections.
MongoDBA beginner-friendly cloud website with a free starter cluster.Allow your bot’s address in “Network Access”. Free clusters have a size limit.
Amazon DynamoDBVery 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.json with you if you move the bot. You can make a copy any time by typing node bot.js --export-data copy.json in 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.