<!-- canonical: https://hostdc.xyz/host/stoat · last updated 2026-10-23 · HostDC, Hosting for Discord, Stoat and Telegram bots and other always-on apps. -->

# Host a Stoat bot

HostDC runs Stoat bots written with stoat.py on Python or stoat.js on Node.js 22. Stoat is the chat platform that used to be called Revolt, and its bots are ordinary long-running processes that connect out to Stoat.

## Three steps

**1. Create the bot in Stoat.** In the Stoat app open Settings, then My Bots, create a bot and copy its token. The same page has an invite link for adding the bot to your server.

**2. Bring your project.** The quickest start is a template: [Stoat bot (Python)](/templates/stoat-bot-py) or [Stoat bot (JavaScript)](/templates/stoat-bot-js). Both answer `ping` with `pong`. To write your own, two files are enough:

```
requirements.txt
main.py
```

```python
import os
import stoat


class Bot(stoat.Client):
    async def on_ready(self, event, /):
        print(f"Logged in as {event.me.tag}")

    async def on_message_create(self, event, /):
        message = event.message
        if message.author_id != self.me.id and message.content == "ping":
            await message.reply("pong")


Bot().run(os.environ["STOAT_TOKEN"])
```

Put `stoat.py` in `requirements.txt`. With stoat.js the project is `index.js` and a `package.json` with `"type": "module"`, because the library is an ES module:

```js
import { Client } from "stoat.js";

const client = new Client();
client.on("ready", () => console.log(`Logged in as ${client.user?.username}`));
client.on("messageCreate", (message) => {
  if (message.authorId !== client.user?.id && message.content === "ping") message.reply("pong");
});
client.loginBot(process.env.STOAT_TOKEN);
```

**3. Add the token and press Deploy.** On the Secrets tab, add an environment variable named `STOAT_TOKEN` with the token as its value. We store it AES-256-GCM encrypted and never show it again. Press Deploy and we install your packages, start the entry file and stream the console.

## Libraries

- **stoat.py** is on PyPI as `stoat.py` and needs Python 3.10 or newer. Its authors mark it beta.
- **stoat.js** is the official JavaScript library. It needs Node.js 22.15 or newer in ES module mode, so when you create the bot pick "JavaScript or TypeScript" and then "Node.js 22" under "Runs on". The create form for a Stoat bot and the Stoat template page preselect Node.js for you; Bun is still offered there, but stoat.js has not been tried on it yet.
- **revolt.py** and **revolt.js** are the libraries from before the rename. We recognise them as Stoat libraries too. New projects should use stoat.py or stoat.js.

Stoat's own docs warn that its API is still in beta. Pin the library version you tested so an update doesn't change a running bot.

## Limits you should know

The free plan gives a 256 MB RAM pool, 0.25 CPU and 1 GB storage, and needs reactivating every 30 days. Mini, Lite, Pro and Max are the paid plans: Lite is $1.69 a month and Pro is $2.79 a month. The [pricing page](/pricing) lists what each one changes.

## Related

- [Host a Python bot](/host/python)
- [Host a Node.js bot](/host/node)
- [Host a Telegram bot](/host/telegram)
- [Environment variables and tokens](/guides/environment-variables-and-tokens)

## FAQ

### Is Stoat the same as Revolt?
Yes. Revolt was renamed Stoat, and the app now lives at stoat.chat.

### Why does the token go in an environment variable?
The Bot token box on the Secrets tab fills `DISCORD_TOKEN`, which only Discord bots read. A Stoat bot reads `STOAT_TOKEN`, so you add it as an ordinary variable in the list below that box.

### Which Python and Node.js versions should I pick?
Python 3.13 or 3.12 for stoat.py, and Node.js 22 for stoat.js. Node.js 20 is too old for stoat.js.

### Do I need to open a port?
No. The bot connects out to Stoat and receives its events over that connection. Only a bot that serves web pages needs a web address.
