Omegion

Bookhoarder: A Self-Hosted EPUB Library Backed by Object Storage

Introduction

I like reading on a Kindle, but I don’t actually own any of those books. They’re DRM’d, tied to one app, and I have no real guarantee I’ll be able to open them again in twenty years if Amazon decides otherwise. For the books I actually want to keep, I’ve been building an EPUB collection for 9 years, and it’s a proper archive by now, sitting in an S3 bucket. What I never solved was the boring part: browsing that archive and getting a book onto an e-reader without SSHing in and copying a file by hand. So I built Bookhoarder , a self-hosted EPUB library.

I wanted this one open source from the start, not as an afterthought. Anyone with a bucket full of EPUBs has the same problem I did, and there was no reason to keep the fix to myself.

Object storage instead of a database

Every self-hosted EPUB app I tried expected me to import my books into its own database first. I didn’t want a second copy of nine years of files living inside some app’s storage format, with its own backup and migration story on top of the one I already had for the bucket. Bookhoarder skips that step entirely. The storage driver is pluggable, local disk, S3, or Cloudflare R2, and the bucket itself is the only thing that persists. There’s no database to provision, back up, or migrate between versions, because there isn’t one. Point it at the bucket I’ve been using for years, and the library is already there.

Reading it and getting it to a device

The point of the whole thing is getting a book off the shelf and in front of my eyes, so the rest of Bookhoarder is built around that. There’s an in-browser reader, built on epub.js, for when I just want to read something without touching a device. Metadata and covers come from Open Library, looked up automatically and editable by hand when it gets something wrong. And for the actual e-reader, there are two ways in: send a book over SMTP the same way Kindle’s own send-to-device email works, or point any OPDS-compatible reader app at Bookhoarder’s /opds feed and browse the whole library from the device itself, no email round-trip needed.

Conclusion

I still read plenty of things in Kindle’s own app, that isn’t going away. But the books I actually want to keep now live somewhere I control, in a plain format any reader can open, not locked to whichever app happens to still exist in twenty years. The bucket and the OPDS feed are just plumbing. The point was always owning the file.