Twitch
Free Twitch bot hosting.
Chat commands, alerts, channel point redemptions and loyalty points, running around the clock whether or not you are live and whether or not your PC is on.
We host the bot. We do not host the stream.
A Twitch bot here is a program that reads and writes chat and listens for channel events. It is not an encoder, a restreaming relay, or anywhere to send video through. Your stream still goes from your own machine to Twitch, exactly as it does now.
That is also why the allocation fits: 25% of a CPU core and 256 MB of memory is a comfortable budget for a chat bot and nowhere near a budget for video.
Choose a runtime
Pick your language
All three are installed and tested. Each page covers the libraries, the deployment and what fits in 256 MB for that runtime specifically.
No public URL, no webhook
Twitch offers two ways to receive channel events. EventSub over webhooks means Twitch makes HTTPS requests to you, which needs a public domain and a valid certificate. EventSub over WebSocket, and chat itself, are connections your bot opens outwards and holds open.
The outbound kind needs nothing but your code and a token, and it is what the libraries on these pages use by default. On a free allocation with a port rather than a hostname, that is the one to use, and it behaves identically from your viewers' side.
Tokens expire, so keep the refresh token
This is the part that catches people who come from Discord. A Discord bot token lasts until you reset it. A Twitch user access token lasts a few hours, and staying signed in means trading a refresh token for a new pair before it runs out.
Every serious library will do that trade for you. What it cannot do is remember the result across a restart unless you let it write somewhere. Store the refresh token in a file in your project directory, which persists across restarts, crashes and redeploys, and a restart is invisible. Hold it only in memory, and the first crash means signing the bot in again by hand in a browser.
Make your bot a moderator
Twitch limits how fast an account may send chat messages, and the limit is considerably higher in channels where that account is a moderator. A bot that answers commands in a busy chat will hit the ordinary limit and have messages dropped silently. /mod your bot in every channel it works in.
Use a separate Twitch account for the bot rather than your own. It keeps its messages visibly distinct in chat, and a token that leaks gives away the bot rather than your channel.
FAQ
Questions
Do I need a domain or a public URL?
Not for chat, and not for EventSub over WebSocket, which covers follows, subscriptions, raids and channel point redemptions. You would only need one for EventSub webhooks, which this is not set up for: you get an allocated port rather than a public HTTPS hostname.
Can one bot work in several channels?
Yes. A single chat connection can join many channels, and the load of a handful of small or medium channels is well inside the allocation. The limit you will meet first is Twitch's message rate, not our CPU.
Where do I get the credentials?
Register an application in the Twitch developer console to get a client ID and secret, then sign in as your bot account through that application to get an access token and a refresh token. All four go into environment variables on your server here, never into your source code.
Does the bot keep running when I am offline?
Yes, that is the point of hosting it. It stays connected around the clock, so commands, timers and loyalty points keep working in an offline chat, and it is already there when you go live.
Node.js, Python, Bun or Ruby for a Twitch bot?
Node has the deepest set of Twitch libraries, and it is where most Twitch bot tutorials are written. Python is solid and the right choice if you already write it. Bun runs the same npm packages as Node.js with TypeScript executed directly; if a library misbehaves under it, Node.js is the fallback. Ruby has no dedicated Twitch library we would recommend, so it means working with IRC and HTTP yourself.
Hosting something else?
Control it from code