Self-host guide
SharpWrite Self-host runs on your own Cloudflare account: a Worker for the site and admin, a D1 database and an R2 bucket for images. No servers and no Docker. Allow about fifteen minutes.
What you need
- Node.js 22 or newer (check with
node -v). - A Cloudflare account. The Workers Free plan is enough to start. If your site gets heavy traffic and you see "Worker exceeded CPU time" errors (error 1102), switch the Worker to Workers Paid.
- R2 switched on: in the Cloudflare dashboard open R2 > Overview and accept the terms. R2 asks for a payment method; the free tier covers most sites.
- A free Resend account and an API key (it starts with
re_). SharpWrite signs you in with an emailed link, so it needs a way to send email. - Your license key (
SW-XXXXX-XXXXX-XXXXX-XXXXX) and the download link from your purchase email.
Install
Download the bundle with the link from your email (it works for 24 hours; you can always get a new one from the license portal, signed in with your purchase email). Unzip it, open a terminal in the sharpwrite folder and run:
npm install
npm run setupThe setup script logs you in to Cloudflare (it opens your browser the first time), asks for your license key and your Resend key, creates the database and the bucket, creates the tables, builds the site and deploys it. It is safe to run again at any time: it reuses what exists and only changes what is missing.
To skip the questions: npm run setup -- --license-key SW-… --resend-key re_… --email-from "My Site <hello@example.com>". If your Cloudflare login has several accounts, set CLOUDFLARE_ACCOUNT_ID first.
Use your own domain
Your license has no limit on domains: SharpWrite runs on your own Cloudflare account, so you can host as many sites as you like. To put a site on your own domain, open the Cloudflare dashboard > Workers & Pages > your Worker > Settings > Domains & Routes > Add > Custom domain. Then open https://your-domain/setup.
Create your account
Open https://your-site/setup, enter your license key, your email address and a site name. This works once. /status shows whether the database, media storage and license are connected (it never shows secrets). Then use it like the Cloud edition: getting started.
Sign-in emails come from Resend. Until you verify a sending domain in Resend, it only delivers to your own address; set --email-from to an address on a domain you verified.
Team members
Under Team invite people by email as Admin, Editor or Viewer. The invitation link creates their account and signs them in. There is no seat limit.
How the license works
- The install checks its license about once a day (a scheduled Cloudflare Cron Trigger) and also when the admin is used. If the license server cannot be reached, the last answer keeps working for 14 days.
- A refunded, disputed or revoked license turns editing off: the write buttons disappear and a banner says why. Your public API and media keep working.
- There is no domain limit. Single and Agency are the same software; Agency is meant for use on your clients' sites. The domains your license runs on are listed in the license portal, where you can also generate a new key (the old one stops working at once).
Updates
Updates are included for one year from the purchase date. The admin's License page tells you when a newer version is available. To update, download the newest bundle from the license portal, copy your wrangler.jsonc over the new one (it holds your database id), then run npm install and npm run setup. Your content stays in your database; the migrations add only what is new. After the year, the software keeps working; you just do not get newer releases.
If something goes wrong
- "Setup stopped: …" Read the message, fix it and run
npm run setupagain. It continues where it stopped. - R2 must be switched on Dashboard > R2 > Overview > accept the terms, then run the setup again.
- Editing is off, content still loads The license check failed; the banner says why. Check your license in the license portal.
- New license key
npm run setup -- --license-key <new key>stores it and redeploys.
Still stuck? Write to hello@sharpwritecms.com.