Ruby
Free Ruby Bluesky bot hosting.
Skyfall for the firehose and Jetstream, Minisky for posting: Ruby gems written for the AT Protocol, running around the clock.
Libraries
Libraries that run here
skyfall
A Ruby client for the Bluesky streams, firehose and Jetstream. A bot that watches for mentions or new posts subscribes with it and handles each event as it arrives.
minisky
A small client for the AT Protocol HTTP API, which covers logging in, posting and reading. Its sibling gems from the same author build on it.
SQLite
Where the session and the posts already answered belong, on your 512 MB of disk rather than in memory.
Deploying
Getting it running
- 1
Upload your project
Drag the folder into the file manager or push it over SFTP. Gems install into a folder inside your server, so there is no need to upload a vendor directory. Handle and app password come from the environment, not from a file in the folder.
- 2
bundle install runs for you
When a Gemfile is present, Bundler installs it before the bot starts and skips the install on later restarts until the Gemfile changes. Both gems are listed in the Gemfile and installed on start.
- 3
Point us at your entry file
bot.rb or main.rb. Handle and app password come from the environment; the session goes into a file or a SQLite row.
Memory
What actually fits in 256 MB
Plenty for a posting or reply bot. A stream bot stays small if it handles events as they arrive and filters to what it needs instead of keeping them.
Where state has to outlive the process, such as the posts already answered or the session itself, SQLite keeps it on disk rather than in memory.
FAQ
Questions
Do I need the whole firehose?
Usually not. A Jetstream connection can be limited to the collections you care about, which keeps both the bandwidth and the work small.
Where should the session live?
In a file or a SQLite row, written whenever the session changes. Resume from it at start-up so a crash loop does not burn through the login limit.
Do gems with native extensions work?
Yes for the common ones. The image has a compiler and the headers for SQLite, PostgreSQL, MariaDB, libxml and OpenSSL, so gems such as nokogiri, pg, mysql2 and sqlite3 build when bundle install runs. The first start after you change your Gemfile takes longer while they compile; later starts skip the install.
Where should the secrets live?
In environment variables set on the server, read with ENV.fetch. A .env file uploaded with your code sits in your file manager like any other file, and Ruby does not read one by itself unless you add a gem such as dotenv for it.
More on Bluesky bots
Hosting something else?
Control it from code