OPDS and web server for a home e-book library (FB2, EPUB, ZIP), for NAS
1.2K
Lightweight OPDS and web server for a home e-book library: FB2 and EPUB files and ZIP archives (Flibusta and Librusec distributions included), web reader, search, conversion to EPUB and MOBI. This image runs TinyOPDS CLI on Mono for NAS (Synology, QNAP, etc.) and other Linux hosts, amd64 and arm64.
Project, documentation and Windows version: https://github.com/sensboston/tinyopds Step by step installation for Synology, QNAP, CasaOS and others: https://github.com/sensboston/tinyopds/wiki/Docker_en
docker-compose.yml (Synology Container Manager: Project → Create, QNAP Container Station: Applications → Create):
services:
tinyopds:
image: sensboston/tinyopds:latest
container_name: tinyopds
ports:
- "8080:8080"
volumes:
- /volume1/books:/books:ro # your book library
- /volume1/docker/tinyopds:/data # TinyOPDS config, database and log
environment:
- PUID=1000 # user and group the data folder belongs to
- PGID=1000
- TZ=Europe/Moscow
- TINYOPDS_LANGUAGE=ru
restart: unless-stopped
# Icon and title for CasaOS / ZimaOS (other systems ignore x- fields)
x-casaos:
main: tinyopds
title:
en_us: TinyOPDS
icon: https://raw.githubusercontent.com/sensboston/tinyopds/master/TinyOPDS/TinyOPDS.png
port_map: "8080"
Or the same with docker run:
docker run -d --name tinyopds -p 8080:8080 \
-v /volume1/books:/books:ro -v /volume1/docker/tinyopds:/data \
-e PUID=1000 -e PGID=1000 -e TZ=Europe/Moscow -e TINYOPDS_LANGUAGE=ru \
--restart unless-stopped sensboston/tinyopds:latest
Then open http://<NAS address>:8080/ in a browser, and add http://<NAS address>:8080/opds as an OPDS catalog
to a reader app (KOReader, Moon+ Reader, FBReader, etc.)
| Container folder | What is there |
|---|---|
/books | Book library: FB2, EPUB, ZIP archives, subfolders. Read only access is enough |
/data | TinyOPDS.config, database books.sqlite, log. Keep it to keep the library between updates |
| Variable | Default | Meaning |
|---|---|---|
PUID, PGID | 1000 | User and group IDs the files in /data belong to (Synology: usually 1026 and 100, see id in SSH) |
TZ | UTC | Time zone, e.g. Europe/Moscow |
TINYOPDS_WATCHLIBRARY | true | Watch the library: copied, renamed and deleted books are processed when copying is over (about 30 seconds) |
TINYOPDS_SCAN_INTERVAL_HOURS | 24 | Rescan the library at this interval, 0 to switch off (for a library on a network share the watcher doesn't see) |
TINYOPDS_<SETTING> | Any setting of TinyOPDS.config, name in upper case |
The library is scanned on every start: the first scan indexes all books, the next ones add only new books.
Useful settings: TINYOPDS_LANGUAGE (en, ru, uk, de, fr, es, pl), TINYOPDS_SERVERNAME (library name),
TINYOPDS_ROOTPREFIX (OPDS catalog path, opds by default), TINYOPDS_DARKTHEMEONWEB, TINYOPDS_ITEMSPEROPDSPAGE,
TINYOPDS_FILTERBOOKSBYINTERFACELANGUAGE, TINYOPDS_SAVELOGTODISK. Settings can also be changed in /data/TinyOPDS.config
while the container is stopped; environment variables take precedence over the file.
Keep the container port 8080: to use another port, change the left part of ports, e.g. "8090:8080".
Get the encrypted user list (one or more user/password pairs):
docker run --rm sensboston/tinyopds encred user1 password1 user2 password2
and set TINYOPDS_USEHTTPAUTH=true and TINYOPDS_CREDENTIALS=<the printed line>.
Set TINYOPDS_BANCLIENTS=true to ban an address for 24 hours after TINYOPDS_WRONGATTEMPTSCOUNT (5 by default) wrong
passwords in a row. To see who connects, set TINYOPDS_SAVELOGTODISK=true and TINYOPDS_LOGLEVEL=3: the log
(/data/TinyOPDS.log) then keeps only logins, rejected requests, bans and errors.
Books (FB2, EPUB, ZIP with one book) can be added from the web interface: double click (double tap) the logo in the page
header. Set TINYOPDS_ENABLEUPLOADS=true (size limit TINYOPDS_MAXUPLOADSIZEMB, 20 MB by default) and mount the library
without :ro: uploaded books are saved to its Uploads subfolder. Anyone who opens the web interface can upload,
so use password protection if the server is reachable from the internet.
Details.
books.sqlite copied to /data,
if the archives are in the root of the library folder on both computers./data keeps the library. Some releases ask to rescan the library from scratch, see the release notes.ghcr.io/sensboston/tinyopds.OPDS и веб-сервер для домашней библиотеки (FB2, EPUB, ZIP-архивы Флибусты и Либрусека). Папку с книгами подключите в /books,
папку для настроек и базы — в /data, укажите PUID/PGID пользователя NAS и TINYOPDS_LANGUAGE=ru.
Веб-интерфейс: http://<адрес NAS>:8080/, OPDS-каталог для читалок: http://<адрес NAS>:8080/opds.
Если Docker Hub недоступен, тот же образ есть в ghcr.io/sensboston/tinyopds.
Подробная инструкция для NAS: https://github.com/sensboston/tinyopds/wiki/Docker_ru
Content type
Image
Digest
sha256:38d8d858d…
Size
163.4 MB
Last updated
4 days ago
docker pull sensboston/tinyopds