Projects / Software
KoBOLD: The Kobold’s Tunnel
Private access to a self-hosted ebook library from a Kobo e-reader, using Tailscale and a browser-based USB installer.
On this page

Sixteen years of Kindle
My first Kindle was the Kindle Keyboard in 2010. Over the years, I owned a Kindle Touch and two generations of the Kindle Paperwhite, including the most recent model available before this year. For the better part of sixteen years, I used Kindles to read books, and earlier this year, somewhat reluctantly, I walked away from the ecosystem.
The reasons for the recent exodus of Kindle users have been fairly well documented. Amazon removed the ability to download purchased Kindle books directly to a computer through its Download & Transfer via USB feature in February 2025, taking away the means by which customers could independently back up their purchases and transfer them to their readers over USB.
In May 2026, Amazon went a step further and discontinued support for Kindle devices released in 2012 or earlier, including the Kindle Keyboard with which I started. Owners of these otherwise perfectly functional devices can no longer register them following a factory reset. Apparently, the technological requirements of reading a book have changed considerably since 2010.
BEGIN RANT
Over sixteen years, I had built up a personal library of 1,155 Kindle books. A great deal of money, time, energy and, above all, love had gone into that collection. Anyone who has spent years building a library will understand what that means. Every one of those 1,155 books was something I had sought out and legally purchased, often with the expectation that I would return to it many years later.
And here was Amazon, having happily accepted my money for sixteen years, deciding that I should no longer be able to independently download and back up those purchases or transfer them directly from my computer to an e-reader that I had also paid for. My future access to those books was increasingly dependent on Amazon continuing to operate its servers, support my devices and permit me to retrieve them. I find that absolutely appalling.
Amazon’s decision to allow EPUB and PDF downloads for a subset of DRM-free titles in January 2026 does practically nothing to address what it took away from customers who had spent years purchasing books through its store. I have very little patience for the notion that a company deserves praise for selectively restoring some of the freedoms it has progressively taken away from its paying customers.
This is capitalism at its worst. A company has found a means of retaining control over something long after it has been paid for, and the very people who have supported that business for years bear the consequences.
I have no particular objection to buying books from an online retailer. I do, however, object to the idea that the continued usefulness of my personal, legally acquired library should depend on the business decisions of that retailer. Books are something I expect to be able to return to decades after purchasing them, and I would quite like my electronic books to afford me much the same privilege.
END RANT
So I bought a Kobo Libra Colour.
Kobo’s support for EPUB and how well its readers work with Calibre were important considerations for me, but one of the things I’ve come to absolutely love about the Kobo is its integration with OverDrive and Libby. Here in Australia, I can link my public library card to my Kobo, browse the library’s digital collection, borrow books and place holds on books that are currently on loan. I can also do much of this through Libby on my phone and have the books appear on my Kobo when I synchronise it.
I’ve found myself making considerably more use of my local library since getting the Kobo, which has been one of the nicest aspects of the move. It’s particularly lovely to be able to discover an author, look up their other books at the library and borrow one to read there and then. I do wish I’d had this functionality on my e-reader years ago.
As for the books I own, I use Calibre to manage my collection and Calibre-Web to make it accessible over my network. Calibre-Web has a particularly useful feature in that it can take advantage of the Kobo’s existing synchronisation mechanism to deliver books to the reader. It means I can maintain my library on my own server and synchronise my Kobo much as I would with books purchased through the Kobo store.
Of course, that works beautifully while I’m at home. I wanted to be able to do much the same thing while travelling, but I had absolutely no intention of exposing my personal library server to the internet to achieve it. Given that I already use Tailscale for a fair amount of my infrastructure, I began wondering whether I could get Tailscale to run on the Kobo itself.
As it turns out, you can.
Tailscale on a Kobo?
Underneath the reading interface, the Libra Colour is a rather interesting little Linux computer, and there is quite a bit that one can do with it. I began by manually installing Tailscale on mine, which was running firmware 4.46.23836 at the time, and enrolled it as a device on my tailnet. Once that was working, I could point the Kobo’s synchronisation endpoint at the private Tailscale address of my Calibre-Web server.
I was particularly pleased to find that I could restart the Kobo, connect it to a different wireless network and still synchronise my books. The reader could establish its own connection to Tailscale without relying on another computer or a router at home to do it on its behalf.

I suspect there are quite a few people with a similar combination of a Kobo, a Calibre library and a Tailscale account who would find this useful. They shouldn’t necessarily have to be comfortable poking around the filesystem of an embedded Linux device to get it working, though. I wanted to see if I could put together an installer that would take someone through the entire process using a web browser and a USB cable.
That’s how KoBOLD came about.
One of the rather useful things that modern Chromium-based browsers can do, courtesy of the File System Access API, is read and write files within a directory that the user has explicitly given them access to. Since the Kobo exposes a portion of its filesystem as a USB storage device, I could use this to build quite a capable installer without having to run a backend for the application. KoBOLD is essentially a static website. All the work involving your books, backups and device configuration takes place on your computer and your Kobo.
There was also the question of how much access the Kobo actually needed to have to the tailnet. In my case, there was very little reason for it to be able to communicate with anything other than my Calibre-Web server, so I incorporated a means of preparing the appropriate Tailscale access policy into the installer. If you’re using KoBOLD, I’d recommend taking the time to understand this part of the process. Tailscale grants are additive and, depending on how you’ve configured your tailnet, simply adding a restrictive rule for the Kobo won’t necessarily prevent it from accessing things permitted by an existing, broader rule.
Once the installation is complete, there’s no need to keep the browser open or even visit the KoBOLD website again to synchronise your books. At that point, Tailscale is running on the reader and the Kobo can talk to Calibre-Web directly.
A few complications with the installer
Given the circumstances under which I came to own a Kobo in the first place, I was particularly concerned about what would happen to someone’s existing library if something went wrong during the installation. Someone might have thousands of books on their reader, along with years of annotations, reading progress, collections and personal settings. I certainly wouldn’t want a piece of software that I’d written to be responsible for someone losing all of that.
I built a backup system into KoBOLD, although it soon became apparent that repeatedly copying the entire contents of an e-reader was going to get rather tedious. Since most of the files remain unchanged between installations or updates, it made far more sense to maintain incremental backups, retaining previous generations and verifying the files that had already been backed up. Some of the system settings that I wanted to preserve aren’t accessible through the Kobo’s USB interface either, so these needed to be collected separately by the software running on the reader. Between the two, there is quite a bit that can be recovered should an installation go awry, although these backups don’t constitute a complete image of the device.
The more interesting problem, from a programming perspective, was getting the browser and the Kobo to communicate with each other. The browser can see the files on the reader while it’s connected over USB, but the software it has placed there needs to run on the Kobo after the cable has been disconnected. At that point the browser has no way of knowing what the Kobo is doing, whether it has finished what was asked of it or whether the operation has failed somewhere along the way.
I ended up writing a controller that runs on the Kobo and understands a predetermined set of operations, such as enrolling the device in Tailscale or enabling automatic startup. The browser places a request on the reader over USB, the controller processes it once the reader has been disconnected, and the browser retrieves the result when it is subsequently reconnected. I also wrote a native helper in Go to handle the verification of installation packages and the generation of signed receipts, which the browser uses to establish that a particular operation has actually been completed on the reader. The controller doesn’t accept arbitrary shell commands from the browser.
During testing, I managed to get myself into a rather peculiar situation where Tailscale was running quite happily on the Kobo, but the installer insisted that the operation hadn’t completed. The device had consumed the request without returning the corresponding signed receipt to the browser. Looking at the Kobo and seeing it connected to Tailscale was useful to me as the person doing the testing, but I couldn’t expect an installer to make decisions on that basis.
To get around this, I had the controller record the request on the reader’s native storage before removing it from the USB-accessible filesystem. It can now retain the result of a completed operation and make it available again when the browser reconnects, without having to perform the operation a second time. Each request has its own identifier, so the browser can distinguish the result it’s waiting for from the remnants of a previous installation attempt.
I also hadn’t quite accounted for what the Kobo itself might do with the files I was putting on it. There was an instance where a signed licence file that had been present on the reader disappeared during the installation. I suspect the Kobo’s library indexer had something to do with this, although I never conclusively established what had deleted the file. The sequence in which the installer prepares the device now accounts for this possibility. It makes the necessary changes to the directory exclusions, gets the user to restart the reader and checks that the changes have taken effect before placing the rest of the installation files on it.
By the time I’d worked through these sorts of problems, what had started as an installer for Tailscale had also become a reasonably elaborate backup, verification and recovery utility for the Kobo.

A kobold for the Kobo
Given that the whole point of the project was to provide a private passage between an ebook reader and its library, a little kobold and its tunnel seemed rather appropriate.
I wanted to have a bit of fun with the design of the installer, which is why it looks more like something out of an illustrated book than a conventional software installation utility. The artwork informed the choice of colours and typefaces, and I spent quite a bit of time working on how the illustrations fit into the different stages of the installation.

There is a tendency with software of this sort to show the user absolutely everything that’s happening, which is quite useful when you’re developing and testing it but can get in the way of someone trying to use it for the first time. Much of the work in refining the interface involved figuring out which bits of information the user actually needed at any given point and what the software could get on with by itself.
If the installer needs you to disconnect the Kobo and restart it, for instance, it should just tell you to do so. I see very little reason to present you with a button that you have to click to reveal the instructions for the next thing you have to do. Similarly, if the installer is busy verifying a large collection of books, I’d much rather it tell you how many files it has got through than leave you staring at a message that simply says ‘Working’.
KoBOLD also maintains a diagnostic log throughout the installation, regardless of whether you’ve chosen to have the log visible on the screen. Having spent a fair amount of time plugging and unplugging Kobos while investigating these problems, I didn’t particularly fancy asking someone to go through an entire installation again simply because we hadn’t collected the information we needed to diagnose a failure the first time around.
The November firmware update
I’d got KoBOLD to a point where I was happy enough with it to publish v0.1.0 on 26 October 2026, only to find myself back working on it in November when an update to Kobo firmware 4.46.23852 broke synchronisation.
While working out what had happened, I discovered that I’d inadvertently tied several aspects of the installation to the firmware version of the reader. One particularly troublesome example involved the .kobo/version file, which I’d been using as part of the means by which KoBOLD associated backups and installation records with a particular device. Of course, the contents of that file change when the firmware is updated. As far as parts of KoBOLD were concerned, I was now presenting it with a different reader, even though all the backups and installation records belonged to the very same device.
I’ve since separated the checks that identify the supported hardware from those that determine whether a particular firmware version has been tested, and reworked the means by which KoBOLD associates those earlier records with the reader. This was particularly important because I wanted to be able to update an installation without losing the system settings I’d originally backed up or having to enrol the reader in Tailscale all over again.
While I was at it, I also had to revisit the way I’d gone about signing and testing the original release. I’d tested the code on the physical readers using a temporary signing key and subsequently signed the public release with the production key. Although the code in both versions was identical, the cryptographic identities of the installations were different, and the updater was quite rightly unwilling to treat them as interchangeable. I’d effectively managed to lock myself out of my own update mechanism by changing the key with which the software had been signed.
For v0.1.1, I signed the release candidate with the production key before testing it on the two Kobo Libra Colours I had available. Both readers completed the update successfully and retained their installation identities and Tailscale registrations. I also confirmed that Calibre-Web synchronisation continued to work. The device archive subsequently made available as the stable release is the exact archive I tested on the readers, down to the individual bytes.
I’ve since tested a fresh installation on firmware 4.46.23852 as well, so both the installation and update processes have now been tested on that firmware.
If you’d like to give KoBOLD a go
You’ll need a Kobo Libra Colour, a working Calibre-Web installation with Kobo synchronisation configured, a Tailscale account and a desktop Chromium-based browser that supports the File System Access API.
I’ve tested the original installation on Kobo firmware 4.46.23836 and have since tested both a fresh installation and an update on 4.46.23852. I haven’t tested KoBOLD on other models of Kobo, so if you own a different reader, please bear that in mind.
I’d recommend having a read through the documentation before installing anything on your reader, particularly the sections dealing with backups and recovery. I’ve also made the source code and the documentation concerning the architecture, security model and release process available on GitHub for anyone interested in how the project works.
User guide | Releases | Source code and technical documentation
KoBOLD is an independent, open-source project released under the MIT licence. It is unaffiliated with Rakuten Kobo or Tailscale. Bundled software and fonts retain their respective licences.