atproto relay any% speedrun
Having seen enough bizarre claims about the cost/difficulty of running a relay that responding to them was getting annoying, I set one up on a 4GB Raspberry Pi 4 ($50) so I can link this post going forward.
how to do it
- Grab the
indigo
repo —git clone https://github.com/bluesky-social/indigo.git
- Build + deploy the
relay
package — my compose file will do that for you - (optional unless you don't want your relay to be useless) Crawl a bunch of PDSes — script that does that for you thanks to @mary.my.id's scraped PDS list
- ???
- Profit
Of course, if you seriously want to use this, you'll want to configure DATABASE_URL
to point to a Postgres instance instead of using an SQLite file, and you'll probably want to tweak RELAY_EVENT_PLAYBACK_TTL
based on available storage (I'd estimate 10GB of storage per hour of playback you want to store, just to be on the safe side). You can find those and other environnment variables here.
Congratulations, you are now running what is, on its own, the most useless atproto service?
speedrun
https://www.youtube.com/watch?v=U_ReYV3CbSg — 01:32 if you exclude the 8 or so minutes it took to build the container
stats
I forgot to include this in the video, but after a few minutes of leaving the relay going at full throttle, it's running just fine on the Pi — this is the highest it gets, more consistently lingering around 40-50% CPU and 2GB memory