This tool acts as an Instapaper proxy, so your Kobo can sync with your Readeck articles.
This is a Go port of the original kobeck, evolved to support multiple users, logging, performance improvements and more.
- 📚 Syncs non-archived articles from Readeck to Kobo
- 📰 Downloads article content and image for each bookmark
- 📋️ supports archiving, re-adding, favoriting, and deleting
- 📷️ Converts images to JPEG format for e-reader compatibility
- 👥 Supports multiple Kobo devices and readeck accounts
Getting up and running is a breeze with Docker.
First, copy config.yaml.example to config.yaml and edit it to match your setup.
server:
port: 8080
log_level: info
readeck:
host: "https://your-readeck-instance.com"
users:
- token: "a-random-uuid-token-for-a-kobo"
readeck_access_token: "a-readeck-api-token"Once your configuration is ready, fire it up!
docker-compose build
docker-compose up -dThe server will be available at http://localhost:8080.
For each Kobo device, you will need a unique token. This process involves generating a token and then encrypting it for the Kobo device.
First, find your Kobo's serial number, which is available under Settings -> Device Information on your e-reader.
With readeckobo running, use this command to generate and encrypt the token,
replacing <YOUR_KOBO_SERIAL> with your device's serial number:
docker-compose exec readeckobo bin/generate-encrypted-token.sh <YOUR_KOBO_SERIAL>The script will output two important pieces of information:
- A plain text UUID token to be used in your
config.yaml. - An encrypted token to be used in your Kobo's configuration file.
Follow the output from the script to configure your services.
-
Update
config.yaml: Add the plain text UUID token to theuserssection of yourconfig.yaml.users: - token: "<THE-PLAIN-TEXT-UUID-FROM-THE-SCRIPT>" readeck_access_token: "a-readeck-api-token"
-
Update Your Kobo: Mount your Kobo and find the
.kobo/Kobo/Kobo eReader.conffile. Add or update these settings using the encrypted token from the script's output.[OneStoreServices] api_endpoint=https://readeckobo.example.com/instapaper-proxy/storeapi instapaper_env_url=https://readeckobo.example.com/instapaper-proxy/instapaper [Instapaper] AccessToken=@ByteArray(<THE-ENCRYPTED-TOKEN-FROM-THE-SCRIPT>)
Replace readeckobo.example.com with the hostname of your proxy instance.
readeckobo must be run behind a reverse proxy to handle HTTPS. It's crucial
to proxy three specific location blocks, as shown in our nginx.conf.snippet
example.
Your Kobo device periodically re-syncs its configuration from Kobo's servers, which can overwrite your custom Instapaper endpoint. The proxy rules below ensure this connection is preserved.
| Location Block | Proxies To | Purpose |
|---|---|---|
/instapaper-proxy/instapaper/ |
readeckobo application |
Handles the main Instapaper API requests (sync, download, etc.) to your readeckobo instance. |
/instapaper-proxy/storeapi/ |
storeapi.kobo.com |
Forwards general API requests to Kobo's servers. |
/instapaper-proxy/storeapi/v1/initialization |
storeapi.kobo.com |
Intercepts the Kobo configuration response to rewrite the Instapaper URL back to your proxy endpoint. |
Without these rules, your Kobo will eventually lose its connection to readeckobo.
A little security goes a long way.
- Use HTTPS: deploy behind a reverse proxy that provides HTTPS
- Stay Local: Keep it on your local private network
- Kobo Password: prevent unauthorized mounting with a Kobo password
# Build the docker image
docker-compose build
# Run the server
docker-compose upThe server will be available at http://localhost:8080.
readeckobo emulates the Instapaper API for Kobo devices. Here's a quick overview:
| Endpoint | Description |
|---|---|
POST /api/kobo/get |
syncs non-archived articles from Readeck. |
POST /api/kobo/download |
downloads the content of an article for offline reading. |
POST /api/kobo/send |
handles archiving, favoriting, deleting, or adding new articles. |
GET /api/convert-image |
a helper endpoint to convert all article images to JPEG |
The scripts/e2e-tests/ directory has simple shell scripts for testing each API
endpoint. They're great for checking if everything is working as expected.
# Run the 'get' test
./scripts/e2e-tests/01-test-get.sh <YOUR_DEVICE_TOKEN>The Makefile has some handy targets:
make build: Build the application binary.make test: Run all unit tests.make lint: Run the linter.make vendor: Vendor all dependencies.make ci: Run all CI checks (linting and testing).