Host your Discord bot 24/7,from €1.50/month, in Paris.

Your bot runs in an Arkya application: your Docker image, started on our machines in Paris and restarted if the process stops. The token stays in a secret variable, never in your code. You pay by the minute, and nothing while the bot is stopped.

What you need

An application is enough. A database only helps if your bot keeps data from one session to the next.

  • An application

    Your bot's process. No port to open: the bot is the one connecting to Discord.

    from €1.50/monthstopped: €0/month
  • Redis 7if needed

    Cooldowns, response cache, a queue between two processes.

    €1.56/monthstopped: €0.06/month
  • PostgreSQL 16if needed

    Levels, economy, settings specific to each Discord server.

    €1.56/monthstopped: €0.06/month

Online in five steps

The commands come from the ark CLI, which builds and pushes the image for you.

  1. Read the token from a variable

    Your code reads DISCORD_TOKEN from the environment, and stops with a clear message if it is missing. Then write the Dockerfile: two complete templates are below, for discord.js and for discord.py.

  2. Install the CLI and log in

    You need Node.js 20 or newer and Docker. Create an API token on app.arkya.gg/cles, then link your computer.

    Terminal
    npm install -g @arkyanet/cli
    ark login --token ark_xxxxxxxxxxxx
    ark whoami
  3. Describe and deploy the application

    In the bot's folder, ark init writes the arkya.json manifest (name, size). ark deploy builds the image, pushes it to the private registry registry.arkya.gg and starts it.

    Terminal
    ark init
    ark deploy
  4. Set the token, then restart

    On app.arkya.gg, open the application, Variables tab: add DISCORD_TOKEN as a secret. A variable applies at the next start, so restart the bot with ark restart mon-bot.

  5. Follow what it does

    ark logs mon-bot --follow shows the process output live. The line “Connecté en tant que …” confirms the bot has joined Discord. A slash command registered for all servers can take up to an hour to show up in Discord.

The discord.js template

Node.js 24 on Alpine: the security scan run on every image push blocks full Debian images, whose kernel packages have unpatched vulnerabilities. Run npm install once locally to generate package-lock.json.

package.json
{
  "name": "mon-bot",
  "private": true,
  "type": "module",
  "scripts": { "start": "node index.js" },
  "dependencies": { "discord.js": "^14.28.0" }
}
index.js
import { Client, Events, GatewayIntentBits } from "discord.js";

const token = process.env.DISCORD_TOKEN;
if (!token) {
  console.error("DISCORD_TOKEN manquant : ajoute-le dans les variables de l'application.");
  process.exit(1);
}

const client = new Client({ intents: [GatewayIntentBits.Guilds] });

client.once(Events.ClientReady, async (ready) => {
  await ready.application.commands.set([{ name: "ping", description: "Vérifie que le bot répond" }]);
  console.log(`Connecté en tant que ${ready.user.tag}`);
});

client.on(Events.InteractionCreate, async (interaction) => {
  if (!interaction.isChatInputCommand() || interaction.commandName !== "ping") return;
  await interaction.reply(`Pong ! ${client.ws.ping} ms`);
});

process.on("SIGTERM", async () => {
  await client.destroy();
  process.exit(0);
});

client.login(token);
Dockerfile
FROM node:24-alpine
RUN apk upgrade --no-cache
ENV NODE_ENV=production HOME=/home/container NPM_CONFIG_CACHE=/home/container/.npm
WORKDIR /app
COPY --chmod=644 package.json package-lock.json ./
RUN npm ci --omit=dev
COPY --chmod=644 index.js ./
CMD ["node", "index.js"]

The discord.py template

Python 3.13 on Alpine. PYTHONDONTWRITEBYTECODE avoids writing .pyc files on a read-only file system, PYTHONUNBUFFERED makes logs come out right away.

requirements.txt
discord.py==2.7.1
bot.py
import os

import discord
from discord import app_commands

token = os.environ.get("DISCORD_TOKEN")
if not token:
    raise SystemExit("DISCORD_TOKEN manquant : ajoute-le dans les variables de l'application.")


class Bot(discord.Client):
    def __init__(self) -> None:
        super().__init__(intents=discord.Intents.default())
        self.tree = app_commands.CommandTree(self)

    async def setup_hook(self) -> None:
        await self.tree.sync()


bot = Bot()


@bot.tree.command(description="Vérifie que le bot répond")
async def ping(interaction: discord.Interaction) -> None:
    await interaction.response.send_message(f"Pong ! {round(bot.latency * 1000)} ms")


@bot.event
async def on_ready() -> None:
    print(f"Connecté en tant que {bot.user}", flush=True)


bot.run(token)
Dockerfile
FROM python:3.13-alpine
RUN apk upgrade --no-cache
ENV HOME=/home/container PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1 PIP_NO_CACHE_DIR=1
WORKDIR /app
COPY --chmod=644 requirements.txt ./
RUN pip install -r requirements.txt
COPY --chmod=644 bot.py ./
CMD ["python", "bot.py"]

What the image must follow

A bot listens on no port, so the port rule does not apply to it. The other three do.

The rules of an Arkya application, seen from a bot
RuleWhyIn the templates
The container runs as user 988, without rootno application can take control of the machinefiles copied with --chmod=644, readable by everyone
Writes only in /home/container and /tmpthe rest of the file system is read-onlyHOME and the npm cache point to /home/container
Nothing is kept on redeployan application has no disklasting data goes into a database
Clean shutdown on SIGTERMa stop or a restart gives the process 30 secondsdiscord.js closes the connection; Python stops directly

Application, VPS or free host?

All three run a bot. They don't ask for the same work.

Three ways to host a Discord bot
Arkya applicationArkya VPSFree bot host
You manageyour Docker imagethe whole system: updates, firewall, restarting the botwhatever the platform lets you do
Pricefrom €1.50/monthfrom €4.03/monthfree
Stopped, you paynothingthe disk and the IPv4not applicable
The right choice ifyour bot fits in an imageyou also want a VPN, scripts, several toolsyou are testing, and the plan's limits suit you

Free bot plans are often capped in resources or uptime: read their terms before putting a bot your community depends on there. Our options are detailed in where to host a Discord bot.

Keeping the bot's data

What the bot writes to a file disappears at the next deployment. For data that must last, add a database in the same project: it stays private, reachable only by the project's services.

A database is referred to by its name. If your Redis database is called cache, the references ${cache.HOST} and ${cache.PORT} are replaced at startup by its private address. The password is in the database's Connection tab, and goes into a secret variable.

Application variables
DISCORD_TOKEN=…            # secret
REDIS_HOST=${cache.HOST}
REDIS_PORT=${cache.PORT}
REDIS_PASSWORD=…           # secret, onglet Connexion de la base

What it costs

A bot with its cache, running all month. Everything is billed by the minute: if it runs half the time, you pay half the CPU and memory.

What it costs
ServiceRunningStopped
Application, smallest sizethe bot's process€1.50/month€0/month
Redis 7, default size1 vCPU, 1 GB, 10 GB of disk€1.56/month€0.06/month
Total€3.06/month€0.06/month

Prices include VAT, for a 720-hour month. The breakdown of each resource is on the Pricing page.

The questions we get asked

  • Does my bot need to listen on a port?

    No. A bot opens its own connection to Discord. The HTTPS address given to the application only matters if your bot also exposes a web page, a dashboard or a webhook: it must then listen on the PORT variable.

  • Where should I put the bot's token?

    In the application's variables, marked secret. Never in the image or in arkya.json, which often ends up in a Git repository. If a token has leaked, regenerate it on Discord's developer portal, then replace the variable and restart.

  • What happens if the bot crashes?

    The process is restarted automatically. If it crashes again right away, the cause is almost always in the logs: ark logs mon-bot shows the last error, for example a missing token or a privileged intent that isn't enabled.

  • How much does a stopped bot cost?

    Nothing: an application has no disk, so nothing is billed while it is stopped. A stopped database, on the other hand, still pays for its disk, and for its backups beyond the included volume.

  • Can I deploy from GitHub?

    Yes: link your GitHub repository to the bot, in the Versions tab. Every push builds the image (your Dockerfile, or Railpack for a Node or Python bot) and puts it back in service, with no GitHub workflow to write.

  • Python, JavaScript, or something else?

    Anything that fits in a Docker image for linux/amd64: discord.js, discord.py, JDA in Java, Serenity in Rust. The two templates on this page are the most common, not the only ones.