-
-
Notifications
You must be signed in to change notification settings - Fork 312
Kobo Integration & Sync
Calibre-Web Automated (CWA) integrates with Kobo e-readers, allowing you to sync your library, reading progress, and manage your collection directly from your device. This guide covers both user setup and information for developers.
- Kobo e-reader (Clara HD, Libra 2, Sage, etc.)
- Calibre-Web Automated instance accessible from your network
- Administrator access to enable Kobo sync
- Books in EPUB or KEPUB format
-
Enable Kobo Sync
- Navigate to Admin → Basic Configuration → Feature Configuration
- Check "Enable Kobo sync"
- Optionally, enable "Proxy unknown requests to Kobo Store" if you want to use CWA and the Kobo Store
- Save settings
-
User Permissions
- Users need "Download" permission to sync with Kobo devices
- Optionally, enable "Sync only books in selected shelves with Kobo" to limit which books are synced
- Go to your User Settings or have an admin navigate to Admin → Edit Users → [Your User]
- Click "Generate Kobo Auth URL"
- Copy the displayed
api_endpointURL
Set the api_endpoint key in [OneStoreServices] to your generated auth URL.
- Connect your Kobo to a computer via USB
- Navigate to
.kobo/Kobo/folder on your device - Open
Kobo eReader.confin a text editor - Find the
[OneStoreServices]section, or add it if it is not there. - Edit the
api_endpointkey under the[OneStoreServices]section, or add it if it is not there:[OneStoreServices] api_endpoint=https://yourserver.example/kobo/<your-auth-token> - Save and safely eject your Kobo
- Restart your Kobo device
- Connect to WiFi
- The initial sync will begin automatically
- Check your library - CWA books should appear
| Feature | Full Library Sync (Default) | Shelf-Only Sync |
|---|---|---|
| Use case | Having your entire library on the Kobo | Curated syncing of selected books |
| Books synced | All books in CWA library | Only books in designated "Kobo Sync" shelves [1] |
| Setup | Unselect "Sync only books in selected shelves" | Select "Sync only books in selected shelves" |
| "Remove from collection" on Kobo | Removes book from shelf in CWA | Removes book from shelf, removes book from Kobo on next sync |
| "Remove download" on Kobo | No change in CWA, can re-download on Kobo | No change in CWA, can re-download on Kobo |
| "Remove from my books" on Kobo | Archives the book in CWA and removes from shelf (if any) [2] | Unsyncs the book and removes from shelf [3] |
| Removal from CWA shelf | Removes book from Kobo collection, book stays on Kobo | Removes book from Kobo collection and from My Books |
| Archiving in CWA | Removes book from Kobo | Removes book from Kobo |
- [1] Public shelves created by other users are not considered for shelf-only sync. Only shelves owned by the user performing the sync are used.
- [2] If the book is in a Kobo collection, restoring it from the archive in CWA will not automatically return it to the shelf.
- [3] in V3.1.4 and below, the book will also be archived in CWA.
-
Enable Feature
- Go to User Settings → Check "Sync only books in selected shelves with Kobo"
- Save settings
-
Create Sync Shelves
- Navigate to Your Shelves → Create Shelf
- Name your shelf (e.g., "Kobo - To Read")
- Check "Sync this shelf with Kobo device"
- Save shelf
-
Add Books to Sync Shelves
- Add books to your sync-enabled shelves
- Only these books will appear on your Kobo after the next sync
When using shelf-only sync:
- Remove a book from a sync shelf in CWA
- The book is automatically deleted from your Kobo on the next sync
- Creates seamless library management from the web interface
The behavior depends on your sync mode:
Full Library Sync:
- Delete book from Kobo → Book is archived in CWA
- Book remains in library but marked as archived
Shelf-Only Sync:
- Delete book from Kobo → Book is removed from sync status
- Book remains in library and shelves, simply unsynced
- Reading position, bookmarks, and statistics sync automatically
- Progress updates when you:
- Turn pages
- Close a book
- Switch between books
- Connect to WiFi
- Go to Settings → Sync and Share → Sync Now on your Kobo
- Or simply connect to WiFi if auto-sync is enabled
If enabled, CWA will pass requests to the Kobo Store if they cannot be handled from your CWA library. This lets you use your CWA library and the normal Kobo Store features at the same time. If not enabled, CWA will ignore requests for books that are not in your CWA library or functionality that is not supported.
- CWA automatically converts EPUB to KEPUB format when possible
- KEPUB provides better integration with Kobo features
- Requires
kepubifytool to be configured in CWA
- Book covers are automatically downloaded and displayed
- Multiple resolution support for different Kobo models
- Fallback to Kobo store covers if local covers unavailable
- Title, author, series, and description sync automatically
- Tags and series information maintained
- Publication dates and ratings supported
Provided there is a hardcover-slug for the synced books, and there is a Hardcover API key in the user profile; each sync from your Kobo to your server will also update the read status of said books to your Hardcover.app account.
Books not appearing on Kobo:
- Verify user has download permissions
- Check that books are in EPUB/KEPUB format
- Ensure WiFi connection for sync
- Try manual sync from Kobo settings
Sync shelf not working:
- Confirm "Sync only books in selected shelves" is enabled
- Verify shelf has "Sync this shelf with Kobo device" checked
- Check that books are actually in the sync shelf
Authentication errors:
- Regenerate auth token if expired
- Ensure CWA is accessible from non-localhost
- Verify correct api_endpoint in Kobo config
Reading progress not syncing:
- Check WiFi connectivity
- Verify user permissions
- Try manual sync from device
Books appear in Kobo but covers do not appear
Check the value of image_host in Kobo eReader.conf. It should be a URL like https://yourserver.example that is accessible over the network from your Kobo. If it looks like https://yourserver.example:8083, but your CWA server's external address is actually https://yourserver.example, try this:
- For troubleshooting, edit the keys in
Kobo eReader.conf. Reboot your Kobo after making changes, reconnect to WiFi, and check if covers appear.image_host=https://yourserver.example:443 image_url_quality_template=https://yourserver.example:443/kobo/0a3b03aecafebabef27ff99d1b33f/{ImageId}/{width}/{height}/isGreyscale/image.jpg image_url_template=https://yourserver.example:443/kobo/0a3b03aecafebabef27ff99d1b33f/{ImageId}/{width}/{height}/false/image.jpg - When you get it working, change the value of
Server External Port (for port forwarded API calls)in CWA's Admin → Basic Configuration to match the port you used in theKobo eReader.conffile. On your next sync, CWA will update theimage_hostand URL templates on your Kobo automatically.
If you have fixed it and covers are working, but book downloads are not working, go to User Settings and choose "Force Full Sync". On the next sync, CWA will send the correct download URLs for all books to your Kobo.
The situation is more complicated if you are using a reverse proxy or SSL termination (such as Cloudflare) in front of CWA. In that case, you can also try:
- Using
80or443as the Server External Port (try 80 even if you are using https) - Turn off "Proxy unknown requests to Kobo Store" in CWA Admin settings, see what happens
- Check Calibre-Web Kobo Integration Documentation for more ideas
Sync timeouts, especially with a tunnel or reverse proxy:
Verifying whether your Kobo can reach the api_endpoint URL is a good first step. This cuts your troubleshooting in half: if the Kobo cannot reach the URL, the problem is network-related; if it can, the problem is likely on the CWA side. Try this:
- Add your
/v1/initializationendpoint to the Kobo Auth URL, e.g.https://yourserver.example/kobo/your-auth-token/v1/initialization - Set that URL as the homepage in your Kobo's web browser in
Kobo eReader.conf:[Browser] homepage=https://yourserver.example/kobo/your-auth-token/v1/initialization - Open the browser on your Kobo and see if it can load the page. You should see a JSON response with settings similar to the
[OneStoreServices]section of yourKobo eReader.conf.
If you need to reset your sync status:
- Admin can force full sync in user settings
- Or delete auth token and regenerate
Starting with v3.2.0, CWA automatically ensures ON DELETE CASCADE exists for progress sync tables. This prevents foreign key constraint errors when books/users are deleted.
CWA adds ON DELETE CASCADE to these tables when missing:
-
book_format_checksums: Book format checksums for KOReader sync -
kosync_progress: Reading progress data from KOSync protocol
-
On startup: If a table exists and its schema matches, CWA checks for
ON DELETE CASCADE. - If missing: CWA rebuilds the table in place and keeps only rows with valid parent records.
- If already correct: No changes are made.
Normal Case:
- Detect missing
ON DELETE CASCADE - Create a new table with the correct foreign key
- Copy valid rows (drops orphaned rows)
- Swap the tables and recreate indexes
If Migration Fails:
- Error is logged but startup continues
- Check logs at
/config/log_archive/
✅ No data loss for valid rows
Problem: Calibre Desktop (and other tools) enable SQLite foreign key constraints, which caused deletion errors:
FOREIGN KEY constraint failed
Solution: Add ON DELETE CASCADE so deleting a book/user automatically deletes related progress data.
Result: Full compatibility between CWA, Calibre Desktop, and command-line tools.
The Kobo integration implements these key endpoints:
-
/kobo/<auth_token>/v1/library/sync- Main sync endpoint -
/kobo/<auth_token>/v1/library/<uuid>/metadata- Book metadata -
/kobo/<auth_token>/v1/library/<uuid>/state- Reading state -
/kobo/<auth_token>/v1/library/<uuid>(DELETE) - Book deletion
-
kobo_synced_books- Tracks which books are synced per user -
kobo_reading_state- Reading progress and timestamps -
kobo_bookmark- Current reading position -
kobo_statistics- Reading time and progress stats -
archived_book- Archived book status -
remote_auth_token- Authentication tokens
-- User configuration
users.kobo_only_shelves_sync -- Enable shelf-only sync mode
-- Shelf configuration
shelf.kobo_sync -- Mark shelf for Kobo sync
-- Sync tracking
kobo_synced_books.user_id, book_id -- Active sync relationships# For shelf-sync users only
if current_user.kobo_only_shelves_sync:
# Find books on device but not in sync shelves
synced_book_ids = {books currently on Kobo}
allowed_book_ids = {books in sync shelves}
books_to_delete = synced_book_ids - allowed_book_ids
# Send deletion commands to Kobo
for book_id in books_to_delete:
send_archive_command(book_id)if current_user.kobo_only_shelves_sync:
# Shelf-sync users: just remove sync status
pass
elif current_user.check_visibility(32768):
# Full-sync users: archive the book
kobo_sync_status.change_archived_books(book_id, True)
# Always remove from sync tracking
kobo_sync_status.remove_synced_book(book_id)-
config.config_kobo_sync- Enable/disable Kobo integration -
config.config_kobo_proxy- Proxy unknown requests to Kobo store -
config.config_kepubifypath- Path to kepubify conversion tool
-
user.kobo_only_shelves_sync- Enable shelf-only sync mode - User permissions for download and archive access
- Unique tokens per user via
RemoteAuthTokentable - Tokens embedded in API URLs for stateless authentication
- No password storage on device
- User permissions checked on each request
- Download permission required for sync access
- Archive permission required for deletion handling
The Kobo integration is actively developed. Key areas for contribution:
- Enhanced format support
- Improved sync performance
- Additional device compatibility
- Better error handling and user feedback
See the main project repository for contribution guidelines.
This documentation covers Calibre-Web Automated's enhanced Kobo integration. Features may differ from the original Calibre-Web project.