Run your own relay
What you send to your Kobo waits on a relay until the Kobo collects it. With a relay of your own, it only ever passes through your own Cloudflare account. It's free, and takes about five minutes.
What you need
- A free Cloudflare account. No payment method is needed.
- A free GitHub account. Cloudflare keeps your relay's code there, so it can update it.
Set it up
- Deploy it. Deploy to Cloudflare Sign in to Cloudflare and GitHub when it asks. Cloudflare makes a copy of the relay in your GitHub account and runs it from there.
- Choose a setup key. Cloudflare asks for
RELAY_SETUP_KEY. Make one up, a few random words likepencil 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. - Open it. Click Create and deploy. When it's done, open the address it shows, like
https://nickeldrop-relay.yourname.workers.dev. The page says the relay is running. - Set up your Kobo. 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. Or open the installer, choose Your own relay and type the address.
A Kobo already set up with another relay keeps that one. To move it to yours, install NickelDrop on it again and choose Set it up again. Browsers connected to it will need to connect again.
Keep it up to date
Your copy doesn't update by itself. When there's a new version, open your copy on GitHub, then Actions, Update the relay, Run workflow. Cloudflare deploys it a minute later. The relay's README says how to update every week without asking.
Change its settings
In Cloudflare's dashboard, open Workers & Pages, your relay, then Settings, Variables and Secrets. You can give the relay a name, set your own limits, or stop it taking new Kobos. They're all listed in the relay's README. Your own relay keeps books up to 100 MB by default, and things wait 24 hours for the Kobo.
Who can see what
The Kobo and each browser have their own key, and every request is signed, so only browsers you allowed on the Kobo can send to it. But books and links sit on the relay until the Kobo collects them, and whoever runs the relay could read them. With your own relay, that's you, and Cloudflare, which runs it.
Doing it by hand
If you'd rather not use the button: clone nickel-drop/relay, then with Node.js run npm install, npx wrangler login, npx wrangler secret put RELAY_SETUP_KEY and npx wrangler deploy.