Documentation Game servers Updated

Configure your Discord bot in the panel (file, packages, .env)

Host a Discord bot at Artaun: choose the startup file, install npm or PyPI packages, store the token in the .env, or create a starter bot in one click.

On this page
  1. Before you start
  2. Bring your bot online
  3. Change the Node.js or Python version
  4. The bot stops on its own
  5. Frequently asked questions

A Discord bot is configured on the My bot page: enter the Startup file, add your Packages (dependencies), store the token in the Secret variables (.env), then start it. If you do not have any code yet, the Starter bot card creates a working bot in one click.

Before you start

Create your application on the Discord developer portal (discord.com/developers), add a bot, copy its token and invite it to your Discord server. If your bot reads the content of messages or the member list, enable the matching Privileged Gateway Intents on the portal.

Bring your bot online

  1. Upload your code in Files (drag and drop, a .zip archive to extract, or a Git repository from the Git button). Do not upload the node_modules folder or a Python virtual environment: they are recreated on the server.
  2. Open My bot › Startup file and choose the file launched at startup (index.js, bot.py, main.py…).
  3. In Packages (dependencies), type the names of the libraries (discord.js, discord.py, dotenv…). They are installed at the next start. A package.json or a requirements.txt present is also taken into account.
  4. In Secret variables (.env), add DISCORD_TOKEN with your token. Your code reads it with process.env.DISCORD_TOKEN (Node.js) or os.getenv("DISCORD_TOKEN") (Python).
  5. Click Start and follow the Console.

Change the Node.js or Python version

The Language page lists the versions available for your bot. Choose one, install it, then restart.

The bot stops on its own

  • Read the console: a TOKEN_INVALID or Used disallowed intents error is explained by the panel's diagnostic.
  • A missing module error: add the package under Packages.
  • To have it restart after an outage, add the Automatic start task under More options › Automatic tasks.

Frequently asked questions

My bot needs a database. Create a MySQL database under More options › Databases and add its credentials to the .env.

My bot needs a port (API, dashboard)? The ports open for your bot are listed under More options › Ports.

To go further: host a discord.js bot 24/7 and host a Discord bot in Python.

Can’t find your answer? Open a ticket · Discord