Bots

How to put a Discord bot online without a server

· 4 min read

In short

You can run a Discord bot without a server of your own: upload the code to a platform that builds the project for you and add the token from the Discord Developer Portal. On Netrun the language is detected automatically, you do not write a Dockerfile, and the token is kept in secrets, separate from the code. On the Free plan a bot runs for a limited time; keeping it online around the clock takes the Pro plan.

  • A Discord bot token is copied in the Discord Developer Portal, in the Bot section of the application you created.
  • A Discord bot in Node.js is usually written with discord.js and a package.json file, and in Python with discord.py and a requirements.txt file.
  • A Discord bot needs no port and no public link: it connects to the Discord servers itself and keeps the connection open.
  • On the Netrun Free plan a bot runs for a limited time, and its code, settings and token are kept after it stops.
  • If the bot crashes, Netrun restarts it automatically, and the logs are visible in the dashboard in real time.

To keep a Discord bot online around the clock, people usually rent a VPS and keep the process running on it — setting up auto-start, making sure the bot does not crash, and paying for the server every month.

Netrun takes that part off your plate: you upload the bot's code and add the token — starting it and keeping it running is on us. Let's walk through it step by step.

  1. Prepare the bot code#

    Gather your project into a single folder with a dependencies file: package.json for Node.js (discord.js) or requirements.txt for Python (discord.py). Read the token from an environment variable, not from the code.

  2. Get the token in the Developer Portal#

    Open the Discord Developer Portal, create an application and a bot, then copy the token in the Bot section. This is the access key to your bot — keep it secret.

  3. Upload the project to Netrun#

    As a ZIP archive or by importing from GitHub. Netrun detects the language and builds the project itself — no need to write a Dockerfile.

  4. Add the token and start it#

    Enter the bot token in the secrets during setup and hit start — Netrun runs the bot on its own servers.

  5. Check that the bot is online#

    Open your server in Discord — the bot should appear in the member list with an "online" status and respond to commands.

On the free plan a bot runs for a limited time and then stops: your code, settings and token stay where they are, nothing is deleted, and you get a warning shortly before it stops. To keep the bot online with no time limit, you need the Pro plan. A Telegram bot is published the same way. Try Netrun.

Common questions

Why is my bot online but not responding to commands?

Often the bot simply cannot see message text: for prefix commands like !help you need to turn on the Message Content Intent in the Developer Portal, in the Bot section, and request it in your code too. Slash commands do not need that access, but they have to be registered. If everything is on, check the logs in the dashboard — the error usually shows up there.

How do I add the bot to my Discord server?

In the Developer Portal open the OAuth2 section and generate an invite link with the bot scope (plus applications.commands if the bot has slash commands) and the permissions it needs. Open the link and pick a server where you have the Manage Server permission.

What should I do if my bot token leaks?

Reset it right away in the Developer Portal with the Reset Token button in the Bot section: the old token stops working. Paste the new one into the Secrets tab in Netrun and publish again so the bot picks up the new value.

How long does a bot run on the Free plan?

For a limited time: it is counted per account and only while the bot is actually running. Then the bot stops, with a warning shortly before. Your code, settings and token are kept, and on the Pro plan the bot runs around the clock.

Can I write a Discord bot in Python instead of Node.js?

Yes. Netrun detects the language from the project files: requirements.txt means Python, package.json means Node.js. Both discord.py and discord.js work, as do bots in other supported languages.

Get your own project online

Upload your code, answer a couple of questions and get a working link. There is a free plan

Try Netrun
All blog articles