NickelDrop sends books, articles and links to a Kobo e-reader from any browser. What you send waits on a relay until the Kobo collects it. This is that relay: a small Cloudflare Worker you can run yourself, for free, so what you send only ever passes through your own Cloudflare account.
You need a free Cloudflare account and a free GitHub account.
-
Click the button:
-
Sign in to Cloudflare and GitHub when it asks. Cloudflare makes a copy of this repository in your GitHub account and deploys it from there.
-
RELAY_SETUP_KEY: make up a key, a few random words like
pencil harbour tulip sixty, and keep it somewhere safe. Only someone who knows it can set up a Kobo with your relay. If you leave it empty, anyone who finds your relay's address can use it. -
Click Create and deploy. When it's done, open the address it shows, like
https://nickeldrop-relay.<your name>.workers.dev. The page says the relay is running. -
On that page, click Set up a Kobo with this relay. The installer opens with your relay chosen. Type the setup key when it asks.
Kobos you've already set up with another relay keep that one. To move one to yours, install NickelDrop on it again and choose your relay.
Cloudflare's copy doesn't update by itself. When there's a new version:
- In your copy on GitHub, open Actions, then Update the relay, then Run workflow.
- Cloudflare deploys the new version a minute later.
To update every week without asking, edit .github/workflows/update.yml in your copy and remove
the # in front of the two schedule lines.
All optional. In Cloudflare's dashboard: Workers & Pages, your relay, Settings, Variables and Secrets. They stay when the relay updates.
| Name | What it does | If it isn't set |
|---|---|---|
RELAY_NAME |
What NickelDrop shows for your relay | "NickelDrop relay" |
RELAY_OPERATOR |
Who runs it | nobody shown |
RELAY_CONTACT |
A link or address for questions | none |
RELAY_OPEN |
false: no new Kobos (the ones set up keep working) |
open |
RELAY_NEW_PER_DAY |
New Kobos a day for the whole relay | no cap |
INBOX_MAX_FILE |
Largest file, in bytes | 100 MB |
INBOX_MAX_TOTAL |
Most waiting for one Kobo, in bytes | 300 MB |
INBOX_MAX_ITEMS |
Most things waiting for one Kobo | 50 |
INBOX_KEEP_HOURS |
Hours before something nobody collected is removed | 24 |
RELAY_SETUP_KEY (secret) |
Needed to set up a Kobo with the relay | anyone can |
To change the setup key, add RELAY_SETUP_KEY again as a secret with the new value. Kobos
already set up keep working; the key is only asked for when setting one up.
Nothing for a household. The relay uses Workers and SQLite-backed Durable Objects, which are on Cloudflare's free plan; no payment method is needed. The free plan allows 100,000 requests a day, far more than a few Kobos need.
The Kobo and the browsers that send to it each have their own key, and every request is signed. The relay keeps public keys and hashes, not passwords. But what you send is stored on the relay until the Kobo collects it, and TLS ends at Cloudflare, so whoever runs the relay could read the links and books you send. With your own relay, that's you (and Cloudflare).
You need Node.js.
npm install
npx wrangler login
npx wrangler secret put RELAY_SETUP_KEY
npx wrangler deployTo try it on your computer: copy .dev.vars.example to .dev.vars, run npx wrangler dev, then
npm test (the relay must be running at http://127.0.0.1:8787 with no setup key set).
MIT. See LICENSE.