Start here
Deployment reference
Native deployment commands, required owner inputs and generated host names.
On this page
Use rer deploy from the project root. The exact @runeditrun/rer pin is in
package.json under devDependencies, locked in pnpm-lock.yaml.
rer --version shows the installed CLI first and the checkout's pin second;
commands inside the checkout use that pin after dependencies are installed.
Use rer describe and rer deploy --help there for its command reference.
Deploy to Cloudflare is the guided setup: it asks
for each input below in the order rer deploy --dry-run lists missing ones, and
gives the validation, deploy and removal commands. --env-file values
override the calling shell's exported values.
Inputs you supply and values rer generates
- Free: you run Lamp's open source yourself in your own Cloudflare account, with no Run Edit Run charge. The commands in this guide are this path.
- Assisted: Run Edit Run installs and maintains Lamp for you, while it stays in your own Cloudflare account and GitHub repository (early access).
- Managed: Run Edit Run hosts and runs Lamp for you (waitlist only).
Compare them on Run Edit Run plans.
Hosted Lamp can deliberately turn email off with MAIL_PROVIDER=none; see
mail-off setup for unavailable email
features and the guarded rer signin owner path. Managed hosting can instead
provide enabled mail without an owner provider account or mail key: RER fills and hides MAIL_PROVIDER=rer, MAIL_FROM,
MAIL_RELAY_URL and private MAIL_API_KEY. The key is an installation credential
for the RER relay, not a provider API key; it stays outside application builds.
With email enabled, Free and Assisted hosting keep your own provider account and use
MAIL_FROM_ADDRESS, MAIL_DKIM_SELECTOR and MAIL_PROVIDER_API_KEY. Generated
signing secrets do not replace that provider API key or authenticated sender.
The table below describes native deployment. The CLI's required-input list comes from
requiredEnvironment in OPERATIONS.json, which is the
source of truth for the required names below. Twelve values are owner inputs;
the four runtime secrets can be generated by rer on the first deploy.
Optional values follow the required entries in the table.
| Input | What you supply |
|---|---|
CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_API_TOKEN |
The account ID and an API token with Account Workers Scripts, D1, Workers R2 Storage and Queues set to Edit, plus Zone Workers Routes: Edit for an own domain (step 2). |
LAMP_APP_HOST, LAMP_PAGE_HOST |
Two distinct bare hostnames, without scheme, port or path. Both remain required with LAMP_HOSTING=workers-dev. |
LAMP_PAGE_NAME, LAMP_PAGE_TAGLINE |
Your business's page name and description. |
LAMP_PAGE_TIMEZONE, LAMP_ACCENT_COLOR |
An IANA time zone and a six-digit hex color, such as Europe/London and #16794C. |
SETUP_OPERATOR_EMAIL |
The first owner's email address. Supply it explicitly for Lamp's native deployment. |
MAIL_FROM_ADDRESS, MAIL_DKIM_SELECTOR, MAIL_PROVIDER_API_KEY |
Your provider-authenticated sender, its DKIM selector and the selected provider's API key (step 6). These are required for enabled direct providers and unused with explicit none. |
SETUP_TOKEN, SESSION_SECRET, SUBSCRIBER_TOKEN_SECRET, WEBHOOK_SIGNING_SECRET |
Required runtime secrets. rer deploy generates fresh random values when absent; they are not mandatory manual inputs for a first deployment. rer keeps the values it generates in .rer/ and reuses them. A redeploy keeps the SESSION_SECRET, SUBSCRIBER_TOKEN_SECRET, WEBHOOK_SIGNING_SECRET and OIDC_TRANSACTION_SECRET each Worker already holds, so links, sessions and sign-ins in progress survive it; LAMP_REPLACE_SECRETS=NAME (with the new value in the file) or rer deploy --rotate-secret NAME replaces one on purpose. For restores into a new installation, supply and retain your original values as shown in the deployment guide. Each must be at least 32 characters. |
MAIL_PROVIDER |
none (the rer deploy default) turns email off without sending credentials; rer uses the managed relay; resend, sendgrid, mailgun, ses and postmark enable direct mail with their required inputs. Select an enabled provider explicitly; deferred selections are refused. |
--owner-name |
First-owner display name, 1–120 characters. Pass it to rer deploy or save it with rer setup. Existing owners keep their name. |
LAMP_HOSTING |
custom-domain (default) or workers-dev. |
LAMP_PAGE_HOST_ROUTE_ZONE, LAMP_PAGE_HOST_TARGET |
Optional, set together: serve LAMP_PAGE_HOST as a Worker route on a Cloudflare for SaaS provider zone in your account (LAMP_PAGE_HOST_ROUTE_ZONE) when its own DNS is elsewhere. The target is the proxied name on that zone (a CNAME to the fallback origin) that the page host's DNS points at: the zone or a name under it. Bare lowercase hostnames; the page host must be outside the zone; not valid with LAMP_HOSTING=workers-dev. See a page host whose DNS is elsewhere. |
LAMP_PAGE_WORKER |
Optional public Worker name for workers-dev only: 1–63 lowercase letters, digits and internal hyphens, distinct from the app Worker. Set LAMP_PAGE_HOST to this name under the same account subdomain. Omit it to keep <prefix>-page; retain the choice on redeploy. |
LAMP_RESOURCE_PREFIX |
Legacy native resource namespace: lowercase letters, digits and hyphens, at most 47 characters. Leave unset with rer deploy: a custom prefix and its owner claim do not mix until rer follows the recorded Worker. Name a new copy with --environment instead; resources default to lamp-<environment>. |
SENDGRID_WEBHOOK_PUBLIC_KEY or RESEND_WEBHOOK_SECRET |
Optional at deploy time, required for accepting the selected provider's signed delivery receipts. Without a key or the optional signed SendGrid relay, feedback callbacks are rejected. The delivery log shows Accepted by SendGrid (or Accepted by Resend) as the final email status available; CSV retains the transport outcome and acceptance timestamp. |
With the selected key and the provider's Event Webhook configured at
https://<LAMP_PAGE_HOST>/, verified callbacks can change
email outcomes to delivered, bounced or complained. A delivered receipt records
the provider's report of delivery; it does not prove a person read the message.
See provider setup for the events and keys.
The native pipeline's required-environment list includes the generated secrets
because the runtime needs them; rer supplies them before invoking that pipeline.
Direct setup:cloudflare or deploy:cloudflare scripts do not perform that CLI
generation. They need those values already exported. The native upload uses the
values supplied to that run, so retain the original session, subscriber and
webhook secrets rather than omitting them on a redeploy.
Optional AI draft assistance needs AI_PROVIDER_URL,
AI_PROVIDER_MODEL and private AI_PROVIDER_API_KEY together. Optional
single sign-on uses private
AUTH_PROVIDERS JSON and an independent OIDC_TRANSACTION_SECRET, or an approved
Auth installation link through IDENTITY_PROVIDER. The guides include the
configuration and check steps. Event relay and external heartbeat are described
in the technical operations reference. None is required for
a hosted status page.
Find your workers.dev hostnames
Choose the intended Cloudflare account and open Workers & Pages in its
dashboard. Read Your subdomain on that account page; it identifies the
registered workers.dev subdomain, which is distinct from the account name and
account ID. If the account has none, create its Workers subdomain there before
deploying. Lamp does not create or change this account-wide setting. See
Cloudflare's workers.dev instructions.
You can also read the registered subdomain through the Cloudflare API. With
CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN exported in your private shell,
the following makes a read-only request and prints only the subdomain:
curl --fail --silent --show-error \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
"https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/workers/subdomain" \
| grep -o '"subdomain":"[^"]*"' | cut -d '"' -f 4No output means no subdomain was returned; check the account and token permissions.
The API token needs Workers Scripts Read or Workers Scripts Write for
this subdomain lookup.
A private --env-file is read by rer, not by curl; export these two
credentials for this alternative.
For environment production, the default prefix is lamp-production. If your
registered subdomain is my-account, use these input-file values:
LAMP_HOSTING=workers-dev
LAMP_APP_HOST=lamp-production.my-account.workers.dev
LAMP_PAGE_HOST=lamp-production-page.my-account.workers.devFor another copy, use rer deploy --environment staging and set the hosts to
lamp-staging. and
lamp-staging-page.. Leave LAMP_RESOURCE_PREFIX unset:
a custom prefix and rer deploy's owner claim do not mix until rer follows the
recorded Worker. The two hostname values are still required; Lamp validates
their exact match with the generated Worker names and checks the registered
account subdomain during real setup. A dry run checks the naming pattern but
does not query the account.
To select just the public Worker for a new installation, add
LAMP_ and set
LAMP_. The operator hostname,
app Worker and data resources retain their existing names. Do not change this
selection for an installation with creation records: native setup refuses a
recorded target change or a name occupied by an unrecorded Worker before
provisioning. OPERATIONS.md documents the complete native naming policy.
--environment is the supported way to name a separate installation. The app
Worker is lamp-<environment>, the default public Worker is
lamp-<environment>-page (or the explicit LAMP_PAGE_WORKER), D1 is
lamp-<environment>-db, R2 is lamp-<environment>-files and the Queue is
lamp-<environment>-jobs. Custom-domain hosting uses one Worker for both hosts.
The app Worker has a one-minute cron (* * * * *) for scheduled status work,
notifications and snapshot maintenance. The public Worker in workers-dev
mode shares its storage and has no second scheduler.
Removal and deployment records
Run Lamp's native removal command from the deploying checkout with the original account, environment and private input file:
node scripts/remove-deployment.mjs --environment production --env-file "$HOME/.config/lamp/production.env" --yesIt runs on Node 22 or later, not through rer; see Remove an installation
for getting Node when the Run page's installer kept its Node private.
In workers-dev mode, this removes the public Worker first, then the app Worker
and its owned data resources, reading back their absence. Custom-domain mode has
one Worker. Removal uses separate creation records for the two Workers; it never
infers ownership from matching names. Reused or unrecorded resources need separate
inspection. There is no removal dry run. The generic rer deploy --remove --yes
handles the app's recorded topology and does not retire Lamp's separate public
Worker. Cloudflare can briefly report a deleted Worker or R2 bucket as present,
particularly after a long object purge. If removal ends with remove-incomplete,
keep the records and run the same removal command again.
Lamp's native provisioning records live at .seed/.
They identify resources for archives and recovery but are not creation-ownership
records. New native deployments retain the app's ownership record under
.rer/ and a separate public Worker record when using
workers-dev at .rer/. Keep these private records
with the deploying checkout. Older
installations without creation records are refused by automated removal; resource
names or the archive record alone cannot prove what Lamp created. A missing
record can also follow a preflight failure and does not prove that no resources
exist.
For a native installation without a rer ownership record, back up first,
inspect its .seed/ and the Cloudflare dashboard,
and retire only the confirmed installation resources there. Include both app
and public Workers in workers-dev mode, their hostname attachments, the D1
database, R2 bucket and Queue. Preserve any reused resources belonging to another
installation. Keep the account's shared workers.dev subdomain. After removal,
check that the selected Workers and owned storage resources are gone.
This page is drawn from docs/deployment-reference.md in the repository. Edit it on GitHub.