VyroAI

Loading...

Running Your Bot on Your Own Computer

Run your Discord bot on your own computer instead of paying for hosting: what to install for JavaScript or Python, the commands, and why it stops.

You do not have to pay for hosting

Hosting is one way to run your bot, not the only one. The code VyroAI writes is a normal discord.js (JavaScript) or discord.py (Python) project, and it runs on your own computer too. That costs no credits, and when something breaks you see the real error text straight away.

The bot is only online while the window stays open

Your bot runs as a program in a terminal window. Close that window, shut the computer down or let it sleep, and the bot goes offline in every server. It comes back only when you start it again.

That is fine for testing. For a bot people rely on all day, use Bot Hosting.

Getting the files

  1. Open the bot project in the Code Studio. In the Bot Console under the editor, open Console output — this run and press “Download Bot (.zip)”
  2. Unzip it into a folder of its own.
  3. Open .env and check that DISCORD_TOKEN= is followed by your token. If it is empty, paste the token in after the =. A JavaScript bot also has CLIENT_ID and GUILD_ID there, which its deploy script uses.

Installing and starting it

JavaScript bot (discord.js)Python bot (discord.py)
Install first**Node.js** (the support notes say version 18 or newer)**Python** (the Bot Console says 3.10 or newer)
In the folder, once`npm install``pip install -r requirements.txt`
Start the bot`npm start``python src/main.py`
Slash commandsRun `npm run deploy` once, and again after you add or rename a commandRegistered by the bot itself when it starts

Run the commands in the project folder

Open a terminal in the folder you unzipped, the one with package.json or requirements.txt in it, and type the commands there. The README.md in the same folder has the setup steps for your bot as well, including the token and the invite.

The folder holds your token

With your token in .env, anyone you give the folder to can run your bot as you. Keep it to yourself, and if it ever gets out, reset the token on Discord.

Where to next

8 of 10 in Discord Bots · Last checked 18 September 2026 · Previous: When Hosting Ends