In front of a meadow, a person holds an eReader with two hands.
Photo by Perfecto Capucine on Unsplash

Install KOReader, NickelMenu, and Syncthing On A Kobo eReader

This is an amalgamation of Anarcat's excellent Hacking My Kobo Clara HD and this MobileRead thread. Hopefully this will prove useful for the eight people in the world with a burning desire to sync their library and highlights/notes across an ereader, Android device, and Linux computer(s). So far this has worked on a Kobo Elipsa and a Kobo Libra Colour. The guide assumes you have an unmodified device, a Fedora Linux computer, and some basic CLI skills. If you run into any problems feel free to contact me below.

The Guide

Part 1: Install KOReader

  1. Connect the Kobo to your computer and tap Connect when the Computer detected prompt appears.
  2. Go to this MobileRead post and download the latest KOReader package under the subsection titled One-Click Kobo Packages. The filename will start with OCP-KOReader.
  3. Go to this MobileRead post for an installation script that will automate the installation of KOReader and NickelMenu. NickelMenu is what you will use to launch KOReader on your Kobo device. 
  4. Extract the install.sh file into the same directory as the OCP-KOReader file and execute the installation script.
  5. For those uninterested in Syncthing please unmount your Kobo; happy reading!

Part 2: Install Syncthing

  1. Add your SSH public key to the following file. You may need to create it. /mnt/onboard/KOBOeReader/.adds/koreader/settings/SSH/authorized_keys
  2. Download the latest Syncthing version for ARM (32‑bit).
  3. Extract the archive.
  4. Copy the syncthing binary from the extracted syncthing-linux-arm-v... folder into /mnt/onboard/KOBOeReader/.adds/.
  5. Unmount the Kobo device from your computer.
  6. Access KOReader SSH settings within KOReader at ⛭ > Network > SSH > SSH server.
    1. Before activating the server 🗹Login without password (DANGEROUS).
    2. After you enable the SSH server pay attention to the popup as it will show your Kobo's IP address which is needed later.
    3. TURN OFF SSH SERVER WHEN FINISHED WITH THIS GUIDE!
  7. SSH into your Kobo device with ssh root@<IP ADDRESS> -p 2222.
  8. Create the directory /root/.config/syncthing/.
  9. Within that directory create a config.xml file with the below contents:
    <configuration version="18">
        <gui enabled="true" tls="false" debugging="false">
            <address>0.0.0.0:8384</address>
        </gui>
    </configuration>
  10. Copy a valid ca-certificates.crt file to your Kobo device's /etc/ssl/certs/ directory; you may need to create the directory: mkdir -p /etc/ssl/certs/. With Fedora the crt file is found at /etc/ssl/certs/ca-certificates.crt.
  11. Launch Syncthing over SSH to make sure everything is working. /mnt/onboard/.adds/syncthing.
  12. At this point you can login to the Syncthing web interface http://<KOBO IP ADDRESS>:8384 and select ⛭Actions > Settings to add a username, password, and enable HTTPS for the GUI.
  13. Now that Syncthing is installed, running, and secured you can Ctrl - C to stop the process and follow next steps to simplify starting and stopping it with Nickel Menu.
  14. Create /mnt/onboard/KOBOeReader/.adds/scripts/syncthing-start.sh and /mnt/onboard/KOBOeReader/.adds/scripts/syncthing-stop.sh then make them executable (chmod 755.)
  15. syncthing-start.sh should contain:
    #!/bin/sh
    
    /mnt/onboard/.adds/syncthing serve &
  16. syncthing-stop.sh should contain:
    #!/bin/sh
    
    /usr/bin/pkill syncthing
  17. Create the file /mnt/onboard/KOBOeReader/.adds/nm/syncthing with the below content:
    menu_item :main :Syncthing Start :cmd_spawn :quiet:/mnt/onboard/.adds/scripts/syncthing-start.sh
    chain_success :dbg_toast :Started Syncthing
    menu_item :main :Syncthing Stop :cmd_spawn :quiet:/mnt/onboard/.adds/scripts/syncthing-stop.sh
    chain_success :dbg_toast :Stopped Syncthing
  18. Another polite reminder: TURN OFF THE KOREADER SSH SERVER!
  19. Once finished there is a new NickelMenu menu on the lower right side.
    Kobo screen with NickMenu open showing KOReader, Syncthing Start, and Syncthing Stop menu items.

Part 3: Kobo Update Broke KOReader!

This setup has been stable for quite awhile but recently, for the first time (06/15/2024,) an update caused KOReader to fail to open. The fix was as simple as running Part 1 steps 2-4 again. 

Comments