Drop docs in a folder, read them anywhere: a Catppuccin web app plus an OPDS catalog for Kobo.
88
A self-hosted documentation library for the homelab. Put Markdown, EPUB, PDF, text and HTML in one folder, in any structure you like, and read them in a beautiful web app or on every Kobo in the house.
Quick startโ ยท Featuresโ ยท Kobo setupโ ยท Configurationโ ยท Docsโ

Documentation ends up everywhere: runbooks in Markdown, appliance manuals as PDFs, saved web pages,
a few EPUBs, notes in .txt. SleepyDocs gives all of it one home and one interface, without a
database, an import step or an account. The folder is the library: copy a file in and it's there
seconds later, in the browser and on your e-readers.
| ๐ช | Magic folder. Add, edit, move or delete files and every screen updates within seconds. No import, no rescan button. |
| ๐จ | Beautiful web app. Catppuccin Mocha, a file tree, instant search, keyboard navigation, and the file name with its extension always in view. |
| ๐ | Every format, rendered natively. Highlighted Markdown, sandboxed HTML, the browser's own PDF viewer, readable EPUBs and plain text. |
| ๐ | Built for Kobo. An OPDS catalog that mirrors your folders, with search, for KOReader. A no-JavaScript page covers the stock browser. |
| ๐ | Everything becomes EPUB. Markdown, HTML, text and PDF convert to clean, e-ink-friendly EPUBs with chapters, a table of contents and images. |
| โก | Pre-converted and cached. Conversion runs in the background, so downloads on the Kobo are instant. The cache is disposable. |
| ๐ | Read-only and offline. Your folder is mounted read-only, and nothing is loaded from the internet: no CDN, no telemetry, no account. |
| ๐ณ | One container. A single small Python service. No database, no front-end build, nothing else to run. |
![]() | ![]() |
| Home: what's in the library and what changed | EPUB: books read right in the browser |
![]() | ![]() |
| HTML: saved pages keep their own look, safely sandboxed | Text: spacing and line breaks preserved |

Kobo: big tap targets, high contrast and short pages, built for e-ink
| Format | Extensions | In the browser | On the Kobo |
|---|---|---|---|
| Markdown | .md .markdown | Rendered, with syntax highlighting and tables | EPUB, split into chapters at headings |
| HTML | .html .htm | Its own styles and scripts, in a sandbox | EPUB, cleaned for e-ink |
.pdf | The browser's built-in PDF viewer | EPUB (text) or the original PDF | |
| EPUB | .epub | Rendered as one scrolling page | The original EPUB |
| Text | .txt | Monospace, line breaks preserved | EPUB |
Conversions are done by sleepyconvertโ , a small format-conversion CLI and library from the same author.
docker run -d --name sleepydocs \
-p 8734:8734 \
-v /path/to/your/docs:/library:ro \
-v sleepydocs-cache:/cache \
--restart unless-stopped \
sleepyboy/sleepy-docs:latest
services:
sleepydocs:
image: sleepyboy/sleepy-docs:latest
container_name: sleepydocs
restart: unless-stopped
ports:
- "8734:8734"
volumes:
- /path/to/your/docs:/library:ro # the magic folder
- sleepydocs-cache:/cache # converted EPUBs; safe to delete
volumes:
sleepydocs-cache:
git clone https://github.com/anthonybench/sleepy-docs.git && cd sleepy-docs
mkdir library # put your documents here
docker compose up -d --build
| Where | Address |
|---|---|
| ๐ฅ๏ธ Any browser | http://<server>:8734 |
| ๐ Kobo with KOReader | http://<server>:8734/opds |
| ๐ฑ Kobo stock browser | http://<server>:8734/kobo |
SleepyDocs recommends KOReaderโ . It runs alongside the stock Kobo software, so nothing is erased and you can switch back at any time. It also has a built-in OPDS client and excellent PDF support.
http://<server>:8734/opds.Then browse your folders, search, and tap to download. PDFs offer both an EPUB and the original.
No KOReader? Open http://<server>:8734/kobo in the stock Kobo browserโ and tap a
document to download it straight into My Books.
Everything is an environment variable, and every one has a sensible default.
| Variable | Default | What it does |
|---|---|---|
SLEEPYDOCS_TITLE | SleepyDocs | Name shown in the web app, the catalog and on the Kobo |
SLEEPYDOCS_PREWARM | true | Convert everything to EPUB in the background for instant downloads |
SLEEPYDOCS_FORCE_POLLING | false | Poll for changes. Turn on when the server mounts the folder over NFS/SMB |
SLEEPYDOCS_RESCAN_SECONDS | 300 | Interval of the safety-net full rescan |
SLEEPYDOCS_PORT | 8734 | Port inside the container |
SLEEPYDOCS_LIBRARY | /library | Folder to serve (read-only is fine) |
SLEEPYDOCS_CACHE | /cache | Writable folder for converted files |
your folder (read-only) cache volume
โ โฒ
watcher โดโโบ index โโโโ new or changed files โโโโบ converter โโโบ sleepyconvert
โ โ (โ EPUB)
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ Web app / โ OPDS catalog /opds โ Kobo page /kobo โ
โโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโ
browsers KOReader stock browser
The full story, written for humans, is in docs/โ .
If the server mounts the folder over NFS or SMB, file-change events from other machines never
arrive. Set SLEEPYDOCS_FORCE_POLLING=true. A folder on the server's own disk doesn't need this,
even if you share it out to other machines.
The container runs as UID/GID 1000. It only needs to read your folder, and to write to
the cache.
SleepyDocs has no login. It's designed for a trusted home network. To reach it from outside, put it behind a reverse proxy with authentication, or use a VPN such as WireGuard or Tailscale.
OPDS is browse-and-download, so a copy on the Kobo stays as it was. New and changed files appear in the catalog immediately (see Recently changed). Download them again to update.
docker compose down -v (or delete the sleepydocs-cache volume). It's rebuilt on demand, and
your library is never touched.
uv venv && uv pip install -e ".[dev]"
./tools/dev.sh # http://localhost:8734, serving examples/library
./tools/test.sh # pytest
./tools/format.sh # shfmt, black, prettier
Start with docs/architecture.mdโ . Every part of the system has its own short doc.
FastAPIโ ยท watchfilesโ ยท Python-Markdownโ ยท Pygmentsโ ยท sleepyconvertโ ยท Catppuccinโ ยท and it pairs with KOReaderโ
GNU Affero General Public License v3.0 onlyโ . You're free to use, study, change and share SleepyDocs. If you run a modified version as a network service, you must offer its source code to the people using it.
docker pull sleepyboy/sleepy-docs:latest