Kobo Sync with BookLore
Goal: to be able to sync my existing eBook library with my new Kobo Libra Colour
Status: Partially successful
Tailscale on Kobo
This part was not too difficult. I was away from home, staying with family when I received my Kobo Libra Color and while I could have simply plugged the new device into my laptop and copied the .epub files over from my NAS at home…I knew long term I was going to want to be able to sync with the library. I run Tailscale on a lot of my devices so I can access my NAS or home gaming PC from anywhere1.
I followed the installation script instructions from this repo. There is one step that is not super clear which is that in order to run the script and enable Tailscale, you’ll need to enable SSH. This reddit post gave me the manually step which just involved renaming a file in the onboard storage (/mnt/onboard/.kobo) from ssh-disabled to ssh-enabled. From there I was able to ssh in and set a password for root.
Everything after that worked swimmingly, and the SSH access came in handy later too.
Initital Sync with Calibre
I’ve been running Calibre-web-automated (CWA) on my NAS for some time now, and had a decent sync with KOReader on my old Kindle Paperwhite. It was a bit convoluted as I was just using the OPDS features, logging in, and pulling down the books I wanted to read. It worked OK but I was only able to download books from my library while I was home, and I found KOReader to be a bit clunky and difficult to use.
When I got my Kobo, I set up a sync with CWA by enabling the feature in Basic Configuration / Feature Configuration, generating an API token in my CWA Profile, and then updating the api_endpoint in the Kobo configuration file (/mnt/onboard/.kobo/Kobo/Kobo eReader.conf) to point toward the Tailscale IP of my NAS. It looked something like this:
api_endpoint=http://{NAS_tailscale_ip_address_here}:8083/kobo/{CWA_api_token_here}
Normally I would access CWA through my custom domain which has DNS entries to point to my Tailscale IP address (which will only really do anything if the client device is on my Tailnet). However this method did not work when I tried it in the Kobo config. After a little research it seems like there are some peculiarities with the API that require more specific reverse proxy settings for this to work, and I was not in the mood to troubleshoot that. So I stuck with just the IP:port method.
I had a few issues with getting the config file to properly save. Sometimes I would save the file, eject the device and restart only for the contents of the config to be reset or unchanged. I’m not sure what was happening here, but after a few tries I was able to get it to work.
Once that was figure out, everything worked! I was able to add books to a shelf in Calibre, run a sync on my Kobo device and download them all.
Migrating to BookLore
Fast forward a week or so, and I was trying to get some graphic novels (Brandon Sanderson’s White Sand, to be specific) into my Calibre library. I spent a few hours and although ostensibly Calibre supports .cbz and .cbr files I was unable to load them in a way where I could see them in my library or add them to a shelf. It seems like they got added to the database, but because they weren’t converted to .epub they couldn’t be displayed. The conversion to .epub removed all color from the novels which was not ideal, since I do have an eReader that supports colors now.
I had heard about BookLore for a while, being the new kid on the block with a bit more modern UI and feature set compared to Calibre or Calibre-web. However this seemed a point where migrating might be worth it, as it has better support for .cbz and .cbr files. Truthfully the migration did not take very long and I regret putting it off. My graphic novels loaded in easily and were visible.
Then I had to update my Kobo sync process. BookLore has better documentation on this, a default Kobo shelf for the sync, and the UI makes it much easier (only one settings page needed). I also took the opportunity to update my reverse proxy settings to see if I could get that to work. BookLore’s documentation specified buffer and header settings for nginx only, but I use Caddy. I added a new subdomain “kobosync” so the settings wouldn’t affect browser access but would still point to my BookLore instance running on port 6060.
kobosync.mydomain.com {
reverse_proxy localhost:6060 {
transport http {
read_buffer 131072
write_buffer 262144
}
}
}
Lastly I had to update my Kobo’s config file to point to kobosync.mydomain.com. This time it gave me even more trouble with changes I made on my PC not saving after I disconnected the device. I ended up SSHing in to the Kobo, confirming the line I needed to change (line 95) using:
sed -n '95p' /mnt/onboard/.kobo/Kobo/"Kobo eReader.conf"
and updating the line via
sed -i '95c\api_endpoint=https://kobosync.mydomain.com/api/kobo/{booklore_kobo_api_token}' /mnt/onboard/.kobo/Kobo/"Kobo eReader.conf"
This method seemed to get the job done and the sync using the reverse proxy was successful! However my graphic novels still did not sync. Turns out Kobo sync doesn’t really support files which are not .epub or .kepub. BookLore is supposedly able to convert them when syncing to Kobo and while the books did appear on my Kobo when I tried this, they were unreadable, not containing any actual content.
Turns out my main reason for switching from CWA was not resolved in BookLore. But I am stil glad it forced me to make the change as I think I’ll be much happier in the long run, and it may be a bug that gets worked out in time.
Footnotes:
If you’re not familiar with Tailscale, I suggest you check it out. It does most of what you could do with a Wireguard VPN, but makes it all dead simple. ↩︎