kobobridge
pip install kobobridge
Serves the ebooks in your Audiobookshelf library to a Kobo eReader over the reader's own sync protocol, so books arrive over wifi instead of over a USB cable.
Answers audiobookshelf#3504, where people have been asking for Kobo sync for ebooks.
Not affiliated with Audiobookshelf, and not affiliated with Rakuten Kobo Inc. This is an independent project. "Kobo" is a trademark of its owner and is used here only to say which device the software talks to.
What it does
Your Audiobookshelf server already holds your epubs. Your eReader already knows how to sync a library over the network. kobobridge sits between the two and answers the sync protocol on behalf of your own server:
Kobo eReader -> kobobridge -> Audiobookshelf
(read only)
- New epubs in Audiobookshelf appear on the reader after a sync.
- Covers, authors, series and descriptions come across.
- Reading progress from the reader is stored by the bridge.
- Large libraries are sent in batches, so the first sync completes.
What it does not do
Worth reading before you install.
- It never writes to your library. Every call to Audiobookshelf is a GET. Reading progress the reader pushes is kept in a small file next to the bridge, not pushed into Audiobookshelf, so progress does not yet show up in the Audiobookshelf web player. A test asserts this. The true size of each ebook is kept beside it, in
ebook-sizes.json, and refreshed when the item changes in Audiobookshelf. - It does not touch any account on the manufacturer's store. No store credential, no user key, no device id. The bridge issues its own token and never contacts the store.
- It does not convert anything. Only epub and kepub files are offered. Pdf, mobi and azw3 in your library are skipped rather than converted.
- Audiobooks and podcasts are skipped. The reader cannot play them.
- Highlights and annotations are not carried. The bridge serves no annotation address and never tells the reader about one, so nothing you highlight reaches it. The only things it keeps from what the reader pushes are the reading position, the read status and the reading statistics; anything else the reader sends with them is dropped, and a test asserts that.
- Shelves are not mirrored. One Audiobookshelf collection can be synced instead of the whole library with a paid key, see "Syncing one collection" below.
- The author owns no reader, so nothing here was tested by the author against a device. One reader of this repository has since run a complete sync on one model and one firmware version, and another reports it failing on theirs. See Status below for exactly what was exercised, by whom, and what is still open.
- No telemetry, no analytics. Nothing about your library leaves your machine. The only requests made to anything other than your Audiobookshelf are the key check described in "Syncing one collection", made only if you set a collection and a key, and not repeated once a key is activated.
Setup
1. Get an Audiobookshelf API token
In Audiobookshelf: Settings, Users, pick your user, then copy the API token.
2. Run the bridge
export KOBOBRIDGE_ABS_URL=http://192.168.1.10:13378
export KOBOBRIDGE_ABS_TOKEN=paste-your-token-here
kobobridge check
The check command lists the ebooks the reader will be offered. If that looks right:
kobobridge run
It prints the one line you need to copy.
3. Point the reader at the bridge
Point the eReader at this bridge:
1. Plug the eReader into a computer over USB.
2. Open the hidden folder .kobo/Kobo/ and edit 'Kobo eReader.conf'.
3. Under [OneStoreServices], set the line below. Create that
section if it is not already there.
api_endpoint=http://192.168.1.10:8484/kobo/rG9x2K7pQm4vB1nT8sYw
4. Eject, then sync from the eReader.
Keep a copy of the original api_endpoint value. Putting it back returns the reader to normal.
To keep the same token across restarts, set KOBOBRIDGE_DEVICE_TOKEN to the value the bridge printed. Otherwise a new one is generated each run and the reader has to be pointed again.
Syncing one collection
By default kobobridge syncs every ebook in your Audiobookshelf book libraries, and that stays free, along with every bug fix. A key, 15 euros once with no subscription, lets it sync a single Audiobookshelf collection instead, so a sync only sends the books in that collection. Books already on the reader stay there: the bridge never removes a book from the reader. A book you put in the collection later is sent on the next sync, even if it is older than the reader's last sync; the bridge notes when it first saw each book in the collection, in collection-seen.json beside the reading state.
This code is under the MIT licence like the rest of kobobridge, so you are free to read it, change it or remove the key check. The key is how you pay for this feature if you want it to work as shipped; it is not a permission you need.
Sales are not open yet. To hear when they are, subscribe to issue 7; the opening will be announced there.
Once you have a key:
export KOBOBRIDGE_COLLECTION_ID=the-collection-id
export KOBOBRIDGE_LICENSE_KEY=the-key-from-your-receipt
kobobridge check
The collection id is the last part of the address when the collection is open in the Audiobookshelf web page, after /collection/.
Once sales are open, a start that has both settings asks the Lemon Squeezy license server (api.lemonsqueezy.com) twice: one request to check the key and one to activate it. Those requests carry the key and the name kobobridge, and nothing about your library. When that succeeds, the result is kept in license.json beside the reading state, and later starts read that file without any network call; until it succeeds, each start asks again. The key itself is not stored, only a hash of it. kobobridge check and kobobridge run both make this check, so running one on your machine and the other in a container uses two activations. If the key is missing, refused or the license server cannot be reached, the bridge says why in its log and syncs the whole library as before. If the collection id is wrong, Audiobookshelf answers with an error and the sync fails with that error; there is no fallback to the whole library in that case.
In this version no key unlocks the collection yet, because the product is not on sale, and no request is sent to the license server: every key is refused before anything is contacted. The code that reads the collection and checks the key is covered by tests, with a stand in for the license server; it has not been run against the real one.
Docker
There is no published image yet. The Dockerfile in this repository builds one:
docker build -t kobobridge .
docker run -d --name kobobridge -p 8484:8484 \
-e KOBOBRIDGE_ABS_URL=http://192.168.1.10:13378 \
-e KOBOBRIDGE_ABS_TOKEN=paste-your-token-here \
-e KOBOBRIDGE_DEVICE_TOKEN=pick-a-long-random-string \
-v kobobridge-data:/data \
kobobridge
Settings
Required:
KOBOBRIDGE_ABS_URL: address of your Audiobookshelf server.KOBOBRIDGE_ABS_TOKEN: Audiobookshelf API token.
Optional:
KOBOBRIDGE_DEVICE_TOKEN: pin the reader token instead of generating one per run.KOBOBRIDGE_PUBLIC_URL: the address the reader sees, when behind a reverse proxy.KOBOBRIDGE_LIBRARY_ID: sync one library instead of every book library.KOBOBRIDGE_COLLECTION_IDandKOBOBRIDGE_LICENSE_KEY: sync one collection, with a paid key. See "Syncing one collection".KOBOBRIDGE_PORT: port to bind, default 8484.KOBOBRIDGE_TIMEOUT: seconds to wait on Audiobookshelf, default 30.KOBOBRIDGE_LOG_LEVEL:debug,info,warningorerror, defaultinfo.
Logs
The bridge writes one line per call the reader makes, with the status, the size and how long it took:
2026-09-16T00:17:41 INFO GET /kobo/<token>/v1/library/sync -> 200 48213 bytes in 1840 ms
2026-09-16T00:17:41 INFO sync: 100 of 2,000 books sent, more to come
2026-09-16T00:17:43 INFO GET /kobo/<token>/6f3d3205.../355/530/85/false/image.jpg -> 200 18244 bytes in 96 ms
The reader token is replaced with <token>, so a log can be pasted into a bug report as it is.
--log-level debug, or KOBOBRIDGE_LOG_LEVEL=debug, adds every call the bridge makes to Audiobookshelf. That is the level to use when a cover or a download does not arrive, because it shows whether the reader asked at all and what Audiobookshelf answered:
docker run ... -e KOBOBRIDGE_LOG_LEVEL=debug kobobridge
docker logs -f kobobridge
A cover that failed is logged with the book's name. A cover that was never asked for leaves no line at all, which is a different problem from one that was asked for and failed.
Security
The reader token is the only thing standing between the internet and your library, so:
- Keep the bridge on your home network, or behind a VPN such as Tailscale or Wireguard.
- If you do expose it, put it behind a reverse proxy with TLS and set
KOBOBRIDGE_PUBLIC_URL. The reader sends the token in the URL, which means it lands in access logs. - Pin
KOBOBRIDGE_DEVICE_TOKENto something long and random.
Status
Version 0.2.0. The shapes of the sync protocol were learned by reading the long standing Calibre-Web implementation, which has served this protocol since 2019. Reading only: Calibre-Web is under the GPL, this project is under the MIT licence, and no code was copied from it. The Audiobookshelf side and the batching logic are covered by tests.
The sync protocol has been exercised over HTTP against a real Audiobookshelf holding 1,374 books, by a reader of this repository rather than by the author: initialization, auth, paged sync to completion, downloads and covers.
It has also been run against a physical device, and not by the author, who owns none. One reader ran a complete sync of a three book library on a Libra Colour on firmware 4.46.23836 against version 0.1.4 and posted the trace in issue 6: fifty five requests, none of them a failure, and three files delivered matching their advertised sizes. Another reader reports the opposite on their own device, in issue 3: the books appear on the shelf and the files never arrive. That reader has a Clara B&W on the same firmware, 4.46.23836, so the firmware alone does not explain the difference; which version of kobobridge they ran was never stated. So one model and one firmware version are known to work for a small library, nothing more than that is, and a report of either kind is the single most useful thing you can send.
Development
git clone https://github.com/Rezarys/kobobridge
cd kobobridge
pip install -e ".[dev]"
pytest
License
MIT. Younes Z., built with AI assistance, reviewed and tested by me.
Metadata
Release files for kobobridge 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kobobridge-0.2.0.tar.gz | 48.9 kB | Without provenance | Details for kobobridge-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kobobridge-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for kobobridge-0.2.0-py3-none-any.whl |
Total release size: 84.2 kB
Release files / kobobridge-0.2.0.tar.gz
| Download URL | kobobridge-0.2.0.tar.gz |
|---|---|
| Size | 48.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa0f95c97e541b4a6f8ff19f1b120e33f8379b0e3b235380ca3c11a119a54e0a
|
|
BLAKE2b-256 checksum How to use checksums |
db429a383151ba795d348594dd2db2307cc347ca10027a49b2f7be9f7c79dd0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / kobobridge-0.2.0-py3-none-any.whl
| Download URL | kobobridge-0.2.0-py3-none-any.whl |
|---|---|
| Size | 35.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e37e7cd2a4099ca42f5d065f2dfb421f97aef47b19396819142db8833e639ba0
|
|
BLAKE2b-256 checksum How to use checksums |
8ef3fb4cecc7a9b28010d433a277941a6ae126398a585bd6dfb9ed8a9356b50e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for kobobridge 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.