---
title: "Free Bun Twitter (X) Bot Hosting"
description: "Host a twitter-api-v2 bot free on Bun with TypeScript and no build step. 25% CPU, 256 MB RAM, 24/7 uptime for scheduled posting bots on X."
url: "https://sillydev.co.uk/bun-twitter-bot-hosting"
updated: "2026-09-26"
---

Bun

# Free Bun Twitter bot hosting.

twitter-api-v2 runs from the same package.json as on Node, and your .ts entry file runs as it is. A posting bot in one file.

!

## Our hosting is free. X's API mostly is not.

Everything on this page is about running your bot here, which costs nothing. What your bot is allowed to do on X is set by X's API tiers, and the free one is small and mostly about posting. Reading mentions, timelines or search needs a paid tier bought from X, whatever host you use. Check the current tiers in X's developer portal before you build a bot that replies to people.

Tools that avoid the API by logging in as a normal user and scraping the site break whenever the site changes and get accounts suspended. We will not stop you running one within our acceptable use policy, and we do not recommend it: an account lost that way is lost, and we accept no responsibility for it.

Libraries

## Libraries that run here

twitter-api-v2

The same client Node bots use, typed and complete. It handles OAuth signing, which is the one part of the X API you should not write yourself.

bun:sqlite

Built in, and the place to record what you have already posted. It needs nothing in package.json and survives restarts.

Deploying

## Getting it running

1. 1
### Upload your project
Drag the folder in or push it over SFTP, without node_modules. It is installed on deploy.
2. 2
### bun install runs for you
Your package.json is read and installed before the bot starts. The same file works under Node, so choosing Bun is not a commitment.
3. 3
### Point us at your entry file
bot.ts, uncompiled. All four keys come from the environment, read with process.env or Bun.env.

Memory

## What actually fits in 256 MB

A posting bot on Bun sits in tens of megabytes and is idle between posts.

The ways one outgrows the allocation are the same as on Node: a headless browser to render images, which will not fit, or a record of every post held in memory rather than in bun:sqlite on your 512 MB of disk.

FAQ

## Questions

**Does twitter-api-v2 work on Bun?**

It runs the same code it runs on Node. If a release ever misbehaves, the same package.json runs unchanged on the Node.js runtime.

**Do I need to compile TypeScript first?**

No. Point us at the .ts file and it runs. Bun strips the types without checking them, so run tsc locally if you want errors caught first.

**Does Bun read a .env file?**

Automatically. A .env uploaded with your code sits in your file manager like any other file, so for four API secrets, environment variables set on the server are the safer home.

More on Twitter (X) bots

- [Node.js→](https://sillydev.co.uk/nodejs-twitter-bot-hosting)
- [Python→](https://sillydev.co.uk/python-twitter-bot-hosting)
- [Ruby→](https://sillydev.co.uk/ruby-twitter-bot-hosting)
- [Twitter (X) bots→](https://sillydev.co.uk/twitter-bot-hosting)

Hosting something else?

- [Discord bots→](https://sillydev.co.uk/discord-bot-hosting)
- [Minecraft bots→](https://sillydev.co.uk/minecraft-bot-hosting)
- [Telegram bots→](https://sillydev.co.uk/telegram-bot-hosting)
- [Twitch bots→](https://sillydev.co.uk/twitch-bot-hosting)
- [Reddit bots→](https://sillydev.co.uk/reddit-bot-hosting)
- [Bluesky bots→](https://sillydev.co.uk/bluesky-bot-hosting)
- [WhatsApp bots→](https://sillydev.co.uk/whatsapp-bot-hosting)

Control it from code

- [Bot hosting with an API→](https://sillydev.co.uk/guides/bot-hosting-with-an-api)
- [API docs→](https://sillydev.co.uk/docs/panel)
