Send to reMarkable

August 5, 2025 ยท View on GitHub

A Cloudflare Worker service that lets you upload documents to your reMarkable tablet via email or web upload. A public version is hosted under my domain. Note that signups are disabled on this instance.

Most of the code in this repo was generated by AI, and vetted by me. The method for uploading was found by hand, and structure of the codebase was human-designed.

Key Files

  • src/index.ts - Main API routes and email handler
  • src/auth-do.ts - Durable Object for authentication management
  • src/workflow.ts - Workflow for reMarkable API uploads
  • src/upload-utils.ts - Shared upload logic
  • assets/index.html - Web interface

Self-Hosting Setup

Prerequisites

  • Cloudflare account with Workers and R2 enabled
  • Domain managed on Cloudflare

0. Clone the repo and install dependencies

git clone https://github.com/zegevlier/send-to-remarkable
npm i

1. Create R2 Bucket

npx wrangler r2 bucket create send-to-remarkable-docs

2. Configure Email Routing

  1. Go to Cloudflare Dashboard -> Your Domain -> Email
  2. Enable Email Routing
  3. Enable catch all for the domain. We will point this to the worker later.

3. Deploy Worker

  1. Update wrangler.jsonc:

    • Change name to your preferred worker name
    • Update the route pattern to the (sub)domain you want to use
    • Update R2 bucket name if different
    • Enable sign-ups on your instance by setting the SIGNUP_DISABLED environment variable (at the bottom of the file) to false.
  2. Deploy:

npm run deploy

4. Connect Email Routing

  1. After deployment, go back to Email Routing settings
  2. Select your deployed worker as the destination for the catch-all rule
  3. Save the configuration

Usage

Now you can visit the (sub)domain you configured earlier and start using it! After signing up yourself, I recommend disabling signups by setting the SIGNUPS_DISABLED environment variable to true (or anything other than false).