GeistHaus
log in · sign up

Deploying a Cloudflare R2-Backed Nix Binary Cache (Attic!) on Fly.io

lgug2z.com

I have tried running the Attic Nix Binary Cache on my Hetzner dedicated server in Germany a few times in the past, but the peering issues and the latency to Xfinity in Seattle have always made me throw my hands up in frustration. This morning I noticed a comment by Zhaofeng on the repo issue tracker. As a NixOS aficionado myself, I begrudgingly admit that I've been running my instance on fly.io 😛 I'm not sure if this is comment is still current, but hey, if Zhaofeng is/was running his binary cache on fly.io, there's no reason why we can't too, right? Storage While Attic does support local storage, I figured I'd use Cloudflare's R2 as a storage backend, both as an excuse to try out the free tier (10GB), and because it'll be easy enough to lift-and-shift if I ever decide to move the server from fly.io. It's easy enough to create a new R2 bucket and grab a read-write API token scoped to the bucket on the Cloudflare Dashboard. Server Configuration Once we have our credentials, we can put…

0 pages link to this URL

No pages have linked to this URL yet.