Swap Pocket out with Omnivore on your Kobo
UPDATE: The developer of Omnivore sold the software and omnivore.app website is closed.
Amazingly, I am still using my Kobo Clara 2E a year after I first posted about it.
This guide is how to setup Omnivore so that you can read articles you find on the Internet using that instead of Pocket. Most of this is a recounting of my experience while following the already superb README from the repo that does this. I am adding my experience so it could be easier for the next person. I also wrote a Dockerfile for myself, which I will probably push to the repo sometime this is published.
Why Not Pocket ?
As most Kobo owners would know, it has Pocket integration. Naturally, I tried Pocket before but I found that their UI was too noisy. It feels like they are trying to sell me something - either via their ads or the subscription or maybe sponsored articles that the algorithm favors? I don’t know for sure. I just got this feeling.
Either way, I looked for alternatives to Pocket which would work with my Kobo. I eventually found Omnivore, which is a promising competitor to Pocket. Along with that, I found a repo that replaces Pocket with Omnivore in Kobo.
How To Do It
As you might imagine, a hack like this will not be straightforward but the author of the repo wrote a good enough README for me to eventually get it working.
I am writing this to remind myself how I set it up on my end. The setup is basically:
-
Run the Node.JS app (which this repo provides) that acts like the Pocket API, but instead routes your requests to your Omnivore account.
-
Tell your Kobo to make its requests to this Node app instead of Pocket.
Installing the Node.JS App
Running a Node.JS app is quite straightforward. As detailed in the guide:
- Clone the repo:
git clone https://github.com/Podginator/KoboOmnivoreConverter. - Run the following commands:
- Enter the repo:
cd KoboOmnivoreConverter. - Install and build:
npm installandnpm build. - Run the app:
node ./index.js.
- Enter the repo:
After doing this, the app should be running on your machine at port 80, despite the log message saying otherwise.
However, we would need the Kobo to eventually interact with this app, which we will setup in the next section.
Redirecting Kobo to the App
I have tried modding the Kobo a little bit and apparently the way to update the system is simply by putting a KoboRoot.tgz file on the hidden folder ~/.kobo.
At this point, you can choose your own adventure. You can either choose to run the server on your local network or host it on a domain.
In both cases, you need to add your Omnivore credentials to Kobo (as mentioned in the guide) by editing ~/.kobo/Kobo/Kobo eReader.conf. Add the following line if you don’t already have [Pocket] somewhere. If you do, just replace it.
[Pocket]
AccessToken=<API Key>
LastSync=0
RemoveContentWhenRead=false
UnsyncedUrls=@Invalid()
Username=<Email>
where <API Key> is an API key which you can generate from your Omnivore account and <Email> is your Omnivore email.
All of this was mentioned in the Repo. And now, as promised, it’s time to choose your own adventure!
Hosting the app on your local network
Needless to say, if you chose this option, you need to have some sort of home server like a Raspberry Pi. I did have a Raspberry Pi, but I opted to just use my laptop just to see if I could make it work before going to Option 2.
First, you must get the address of your server by running hostname -I command on the intended server. Let’s say its IP address was 192.168.1.87.
Second, you must update the /etc/hosts file of the Kobo to make text.fckpocket.com and fckkpocket.com redirect to 192.168.1.87. Note that these domains do not exist and we will be doing some sort of DNS black magic.
To do this, first you must enable Telnet in your Kobo. The author of the repo was kind enough to provide a KoboRoot.tgz file that does exactly this. Simply drop the KoboRoot.tgz file from the resources folder into your Kobo’s ~/.kobo (take note it is a hidden folder) directory and reboot it.
Once rebooted, you should be able to telnet into your Kobo via telnet 192.168.1.87 or whatever your host’s IP address is. The default username is admin and the default password is admin. You can change the password to hunter2 or whatever once you’re in.
Then, add the IP address onto the /etc/hosts/ like so: echo "192.168.1.87 text.fckpocket.com fckkpocket.com" >> /etc/hosts. Don’t forget to change the IP address value in the command.
At this point, you should be able to sync your articles from Omnivore on your Kobo as if it were coming from Pocket. Or maybe you run into one of the Gotchas below?
Hosting the app on a VPS
There has been some discussion on hosting it in Vercel, but since I already have a VPS setup, I choose to host it there.
The first step is of course to install it on the VPS machine. Thanks to some expert ChatGPT prompting that essentially makes one of my old posts obsolete, I made a Dockerfile to automate much of this process:
FROM node:latest
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 80
CMD ["bash", "-c", "node ./index.js"]
I build the image using docker run -t kobo-omnivore . (apologies if this script is wrong, I am in a BlaBlaBus with no Internet as of time of writing) and deploy it using Portainer (which I might talk about in a different post).
Once the container is deployed, setup a domain or subdomain or whatever to point to this Node.JS app. Doing that will not be part of this post.
Once that’s done, we have to point the Kobo to this domain you just setup. If the app is accessible at example.com, you should go to the hook folder’s pocket.cc file and replace all instances of text.fckpocket.com and fckkpocket.com to example.com, your domain hosting the app.
As per the README in that directory:
- Create the hook:
docker run --volume="$PWD:$PWD" --workdir="$PWD" --env=HOME --entrypoint="make" --rm -it ghcr.io/pgaskin/nickeltc:1.0 - Package it into its own
KoboRoot.tgzfile:mkdir -p usr/local/Kobo/imageformats/ && mv libpocket.so usr/local/Kobo/imageformats/ && tar czf KoboRoot.tgz usr/local/Kobo/imageformats/libpocket.so.
Copy-paste this KoboRoot.tgz file onto your Kobo as usual and reboot. Everything should work now!
Gotchas
body-parser problem
There was this issue with the body-parser package that comes up when you actually try to refresh a feed. Something about encoding. The solution is to manually edit one line in node_modules/body-parser/lib/types/json.js to say if (charset.slice(0, 3) !== 'utf') { instead of if (charset.slice(0, 4) !== 'utf-') {. I don’t know a more elegant solution than that so we stick with it.
Adding Pocket configuration to Kobo
My Kobo got wiped (not a big deal, I wasn’t reading anything anyway) around the same time that I added the new Pocket configuration details. This was because I already had a [Pocket] entry in the configuration file.
https
Another gotcha that I encountered was that I had http instead of https in pocket.cc when I compiled it. Apparently that didn’t work for my always-https server.