nano133Cloudflare

Nano Unlock · on Cloudflare Workers

A blog that sells for 1¢.
On a Worker.

One button puts a small blog on Cloudflare Workers: one free article and two with a part that costs one cent in Nano. Readers pay straight to your own wallet, and the Worker checks each payment itself at a Nano node. No database, no key on Cloudflare, no middleman.

  • MIT
  • Next.js with the OpenNext adapter
  • No database
  • No custody

One button. Two values.

What the button does

It copies the blog into a new private repository in your own GitHub or GitLab account, builds it, and makes a Cloudflare Worker from it. The blog is yours from then on: its articles are in the file content/posts.tsx.

What it asks for

NANO_ADDRESS: your own Nano address, from your wallet's Receive screen. Readers pay this address. UNLOCK_SECRET: a long random text that only your site knows; it signs the readers' passes. With a value absent or wrong, the site shows a setup page and no way to pay.

For site owners

From button to live blog

  1. Press the button.It opens Cloudflare's form.
  2. Connect your Git account.Only the first time.
    The form goes away

    Cloudflare has no connection to your Git account yet. “New GitHub connection” makes one, and then shows “Select a repository”. Open the button's link again: the form works now.

  3. Type the two values.Your Nano address and a secret. The form hides both.
    One name for one blog

    The form's project name is nano-unlock-blog. A second blog in the same account needs another name.

    Why the address is hidden

    A Nano address is public, but Cloudflare keeps both values as secrets: later its settings show their names only.

  4. Wait for the build.Your blog gets an address under workers.dev.
  5. Check the address once.Press Unlock on your new site. Compare the address with your wallet.
    Why

    A valid address that is not yours would take every payment. Check it before you tell anyone about the site.

The blog runs on Cloudflare Workers.

Limits to know6
  • 5 paying readers at onceOur node counts your Worker by its zone: about 120 calls a minute.

    A Cloudflare zone is your domain, or your account's workers.dev name. All Workers of all sites together get 1,200 calls a minute. A reader who pays costs about 24 calls a minute, so one zone serves about 5 readers who pay at the same moment. A busy site sets its own node (NANO_NODE_URL).

  • No list of salesThe site stores nothing: your wallet's history is the record.

    A Worker has many short instances and each counts for itself, so the site's own limits are weaker than on one server. Use a Cloudflare rate limiting rule for /api/unlock/* if you need a true one.

  • A payment with no unlockIt can happen. You settle it by hand.

    A payment later than 24 hours, a wrong amount, or a browser that lost its cookies. The Worker holds no key, so it cannot send money back. You see every payment in your wallet.

  • No price, no paymentThe price in Nano comes from three public price feeds, kept for 5 minutes.

    With every feed down for longer, no payment starts until one answers again.

  • Next.js 16.3.8The blog uses this version on purpose.

    The adapter that runs Next.js on Workers does not run 16.4.0 yet. The package needs version 0.1.1 or newer on Workers.

  • One browserA pass is a cookie of one browser, for 30 days.

    There is no pass for a second device in this version.

Try the reader's side first

Our own Worker runs the same blog. Open an article there and press Unlock.

Our live Worker has our own address in it: its Unlock button takes a real payment of about 1 cent in Nano, and you can look at it without a payment. “Deploy to Cloudflare” opens Cloudflare, a company that we do not run: nano133 is not a part of Cloudflare and is not endorsed by it. Cloudflare is a trademark of Cloudflare, Inc. Have a Next.js site of your own? The package and its steps. On WordPress? The same idea as a plugin.