Configuration reference
This page lists every setting the two amabledata Workers read. Most installations only need what the setup script sets; everything else is optional and turns on one feature.
Overview
Section titled “Overview”amabledata has two Workers, each with its own configuration:
| Worker | Production config (generated) | Template you edit |
|---|---|---|
amable-core |
apps/core/wrangler.self-host.jsonc |
deploy/self-host/core.wrangler.jsonc |
amable-edge |
apps/edge/wrangler.self-host.jsonc |
deploy/self-host/edge.wrangler.jsonc |
The Deploy button uses deploy/cloudflare/wrangler.jsonc (core only). apps/core/wrangler.jsonc and apps/edge/wrangler.jsonc are the local development configs (ENVIRONMENT=dev); do not deploy them to production.
How it works
Section titled “How it works”There are three kinds of setting:
- Bindings connect a Worker to a Cloudflare resource (database, bucket, queue, Durable Object, another Worker). They are declared in the config file.
- Variables are plain text values in the
varsblock of the config file. - Secrets are encrypted values stored on the Worker with
wrangler secret putor in the dashboard. They never appear in a file.
Rules that matter when you change anything:
- The setup script regenerates the production configs from the templates on every run. Edit the templates, not the generated files.
wrangler deployreplaces the Worker’s variables with the ones in the config it deploys, so a variable added only in the dashboard disappears at the next deploy. Secrets are kept.- Any string setting can also be stored as a secret (the Worker reads both the same way). Use a secret for a value you want to survive deploys without editing the template.
- Many settings are honoured only in development (
ENVIRONMENT=dev). They are marked below and ignored in production.
Set a secret
Section titled “Set a secret”pnpm exec wrangler secret put NAME --config apps/core/wrangler.self-host.jsonc # corepnpm exec wrangler secret put NAME --config apps/edge/wrangler.self-host.jsonc # edgeOr in the dashboard: Workers & Pages › the Worker › Settings › Variables and Secrets › Add › type Secret.
Set a variable
Section titled “Set a variable”-
Open
deploy/self-host/core.wrangler.jsonc(or the edge template). -
Add the key to the
varsblock, for example"UPDATE_CHECK": "off". Several optional variables are already there, commented out. -
Rerun
pnpm self-host:setup --deploywith your usual options.
Step by step
Section titled “Step by step”Turn on system email
Section titled “Turn on system email”-
Onboard the domain to Cloudflare Email Sending (
pnpm exec wrangler email sending enable example.com). -
In
deploy/self-host/core.wrangler.jsonc, uncomment"send_email": [{ "name": "SYSTEM_EMAIL" }]and set"SYSTEM_EMAIL_FROM": "no-reply@example.com"invars. -
Rerun the setup script with
--deploy.
Turn on marketing email (own PostShiba account)
Section titled “Turn on marketing email (own PostShiba account)”-
In your PostShiba account, create a team API key with Full access, and note your team id (the
team_idofGET /users/mein the PostShiba API) and the id of the cluster to send from. -
Set the key as a secret on the core:
pnpm exec wrangler secret put POSTSHIBA_API_KEY --config apps/core/wrangler.self-host.jsonc. -
In
deploy/self-host/core.wrangler.jsonc, uncomment"POSTSHIBA_TEAM_ID"and"POSTSHIBA_CLUSTER_ID"invarsand fill them in. -
Rerun the setup script with
--deploy.
You do not create anything else at PostShiba by hand: when a workspace connects its first sending domain in Settings › Domains, amabledata creates a PostShiba tenant for that workspace, an SMTP credential (stored encrypted in the installation database) and a delivery webhook pointing to <APP_ORIGIN>/hooks/email/postshiba/<workspace id>, signed with its own secret. Removing a sending domain in amabledata deletes it at PostShiba too. All three settings are needed: without them (and without a LICENSE_KEY linking the installation to an amabledata account, whose managed email service is then used), marketing email stays off and adding a sending domain answers email_not_configured (“marketing email is not configured: link a license or set POSTSHIBA_API_KEY, POSTSHIBA_TEAM_ID and POSTSHIBA_CLUSTER_ID”).
Rotate the email link secret
Section titled “Rotate the email link secret”-
Copy the current
EMAIL_TOKEN_SECRETvalue intoEMAIL_TOKEN_SECRET_PREVIOUS(comma-separated if there are several). -
Set a new
EMAIL_TOKEN_SECRET. -
Links in emails already sent keep working because the previous secret is still accepted for verification. Remove it from
EMAIL_TOKEN_SECRET_PREVIOUSafter a few months.
Reference
Section titled “Reference”Core Worker (amable-core): bindings
Section titled “Core Worker (amable-core): bindings”| Binding | Type | Resource | Required | Purpose |
|---|---|---|---|---|
ASSETS |
Static assets | apps/web/dist |
Yes | The dashboard. Hashed files under /assets/* are served directly; every other path runs the Worker first (security headers and preferences before first paint). |
DB |
D1 | amable-installation |
Yes | Installation database: users, sessions, workspaces, memberships, invitations, domains, audit log. |
TENANT_DB |
Durable Object | TenantDb |
Yes | One SQLite database per workspace (CRM, sales, commerce, forms, reports). |
ENGINE |
Durable Object | Engine |
Yes | Automation engine, one per workspace. |
MAIL_DB |
Durable Object | MailDb |
Yes | Email data per workspace: templates, messages, suppressions, broadcasts. |
EDIT_SESSION |
Durable Object | EditSession |
Yes | Editing lock of a landing page, one per page. |
BOOKING_CALENDAR |
Durable Object | BookingCalendar |
Yes | One per booking calendar. |
ANALYTICS |
Durable Object (in amable-edge) |
AnalyticsDO, script_name: amable-edge |
No | Web analytics. Without it, analytics routes answer 503 analytics_unavailable. |
EMAIL_SEND |
Queue producer | email-send |
Yes | Outgoing emails. Consumer: batch 10, timeout 5 s, 100 retries (deferrals count as retries; real provider attempts are capped at 5). |
EVENTS_ROLLUP |
Queue producer | events-rollup |
Yes | Event rollups. Consumer: batch 10, timeout 5 s. |
WEBHOOKS_OUT |
Queue producer | webhooks-out |
Yes | Outgoing webhooks. Consumer: batch 10, timeout 5 s. |
FORM_SUBMISSIONS |
Queue producer | form-submissions |
Yes | Form submissions to process. Consumer: batch 10, timeout 2 s, 10 retries. |
ESIGN_SEAL |
Queue producer | esign-seal |
No | Sealing of completed signature requests (the signed PDF and its certificate), one PDF per invocation. Consumer: batch 1, timeout 1 s, 2 retries; a lost job is picked up again by the workspace timer. Without it the workspace timer seals the PDF itself. |
FILES |
R2 | amable-files |
Yes | Files, images, logos, backups. |
RL_AUTH |
Rate limit | namespace 1001, 60 per 60 s |
No | Coarse per-IP limit on sign-in endpoints (D1 counters are the fallback). |
RL_API |
Rate limit | namespace 1002, 600 per 60 s |
No | Coarse limit for API keys (D1 counters are the fallback). |
SYSTEM_EMAIL |
Send email | Cloudflare Email Sending | No | System email sender. Commented out in the template. |
| Cron trigger | Schedule | */5 * * * * |
Yes | Analytics sync, ad spend sync, tracking domain checks, webhook log pruning, daily backups, update check, marketplace catalog sync. |
Core Worker: variables and secrets
Section titled “Core Worker: variables and secrets”| Name | Type | Required | Default | Purpose |
|---|---|---|---|---|
ENVIRONMENT |
Variable | Yes | production (set by the templates) |
dev enables development routes and fakes; production never sets it to dev. |
APP_ORIGIN |
Variable | Yes | From --app-origin |
Public origin of the app: links in emails, CSRF check, OAuth redirect URIs, invitation links. |
EDGE_ORIGIN |
Variable | Recommended | From --edge-origin |
Public origin of the edge Worker, used in tracking snippets and hosted links. |
PASSWORD_PEPPER |
Secret | Yes | Generated by the script | Mixed into every password hash. Never change it once users exist. |
AUTH_ENCRYPTION_KEY |
Secret | Yes | Generated by the script | Base64 of a 32-byte AES-GCM key for secrets at rest (two-factor seeds, OAuth grants). Never change it once users exist. |
EMAIL_TOKEN_SECRET |
Secret | Yes | Generated by the script | Signs click, open and unsubscribe tokens and the contact token of email clicks. |
EMAIL_TOKEN_SECRET_PREVIOUS |
Secret | No | none | Comma-separated previous signing secrets, still accepted for verification. |
EDGE_GATEWAY_SECRET |
Secret | Yes | Generated by the script | Shared HMAC secret for the signed calls from the edge Worker. Must be identical on both Workers. |
ALLOWED_ORIGINS |
Variable | No | none | Extra comma-separated origins accepted by the CSRF check. |
API_CORS_ORIGINS |
Variable | No | none | Comma-separated browser origins allowed to call /api/v2 with an API key (CORS, never with credentials); * means any. |
TURNSTILE_SITE_KEY |
Variable | No | none | Turnstile site key. |
TURNSTILE_SECRET_KEY |
Secret | No | none | Turnstile secret; without it bot verification is disabled (warning at boot). |
HIBP_ENABLED |
Variable | No | On in production | false disables the online breached-password range check (an offline list of common passwords is used instead). In dev it is off unless true. |
ADDRESS_LOOKUP_URL |
Variable | No | The public Photon geocoder | Your own Photon instance URL, or off for manual addresses only. |
SYSTEM_EMAIL_PROVIDER |
Variable | No | auto |
auto, cloudflare, notify or console (console only in dev). |
SYSTEM_EMAIL_FROM |
Variable | With SYSTEM_EMAIL |
none | Sender address of system emails (domain onboarded to Email Sending). |
SYSTEM_EMAIL_FROM_NAME |
Variable | No | none | Sender name of system emails. |
NOTIFY_ENDPOINT |
Variable | No | none | Notify service endpoint override (managed offering). |
GOOGLE_OAUTH_CLIENT_ID |
Variable or secret | No | none | Your Google OAuth client (booking calendars: busy time and booking events, scopes calendar.readonly and calendar.events). |
GOOGLE_OAUTH_CLIENT_SECRET |
Secret | No | none | Secret of that client. Redirect URI <APP_ORIGIN>/oauth/google/callback. |
META_APP_ID, META_APP_SECRET |
Secrets | No | none | Meta ads app. |
GOOGLE_ADS_CLIENT_ID, GOOGLE_ADS_CLIENT_SECRET, GOOGLE_ADS_DEVELOPER_TOKEN |
Secrets | No | none | Google Ads app. |
GOOGLE_ADS_LOGIN_CUSTOMER_ID |
Secret or variable | No | none | Optional Google Ads manager account, digits. |
TIKTOK_APP_ID, TIKTOK_APP_SECRET |
Secrets | No | none | TikTok ads app. |
ADS_OAUTH_REDIRECT_URI |
Variable | No | <APP_ORIGIN>/oauth/ads/callback |
Redirect URI registered on the ad apps. |
POSTSHIBA_API_KEY |
Secret | For marketing email | none | Team API key of your own PostShiba account, with Full access. Used together with POSTSHIBA_TEAM_ID and POSTSHIBA_CLUSTER_ID. Never used with ENVIRONMENT=dev. |
POSTSHIBA_TEAM_ID |
Variable | For marketing email | none | Team id of your PostShiba account (the team_id returned by the PostShiba API GET /users/me). |
POSTSHIBA_CLUSTER_ID |
Variable | For marketing email | none | PostShiba cluster on which the SMTP credentials of the workspaces are issued. |
POSTSHIBA_BASE_URL |
Variable | No | https://app.postshiba.com/api/v1 |
API root override. |
POSTSHIBA_INJECT_URL |
Variable | No | https://inject.postshiba.com/api/inject/v1 |
HTTP inject endpoint of your cluster, through which messages are sent. |
POSTSHIBA_WEBHOOK_SECRET |
Secret | No | none | Extra comma-separated HMAC secrets accepted on delivery webhooks. Not needed normally: each workspace’s webhook has its own secret, created automatically. |
CLOUDFLARE_DNS_API_TOKEN |
Secret | No | none | Token with Zone DNS and Workers Routes edit (and Workers Scripts edit for custom domains) for the domain wizard. |
EDGE_HOSTNAME |
Variable | No | Host of EDGE_ORIGIN |
Hostname custom domains point at. |
EDGE_SCRIPT_NAME |
Variable | No | amable-edge |
Worker used for custom domains and routes. |
CF_ZONE_ID |
Variable | No | none | Zone serving the edge Worker, for CNAME tracking domains. |
CF_API_TOKEN |
Secret | No | none | Token with SSL and Certificates: Edit on that zone. |
TRACKING_CNAME_TARGET |
Variable | No | Host of EDGE_ORIGIN |
Hostname users point their CNAME at. |
ERROR_REPORTING |
Variable | No | local |
local (logs only), control_plane (needs LICENSE_KEY) or an https:// URL. |
ERROR_SAMPLE_RATE |
Variable | No | 1 |
Sampling of repeated errors, 0 to 1. |
APP_VERSION |
Variable | No | Set by the script from the release tag | Version shown and compared by the update check. |
UPDATE_CHECK |
Variable | No | On | off disables the daily “new version available” check. |
APP_CATALOG |
Variable | No | On | off hides the app marketplace and stops the catalog sync (private apps still install). |
APP_CATALOG_URL |
Variable | No | The public catalog | Your own signed catalog index URL. |
APP_CATALOG_PUBLIC_KEY |
Variable | With APP_CATALOG_URL |
none | Extra trusted catalog keys, <key_id>:<base64 raw Ed25519>, comma-separated. |
LICENSE_KEY |
Secret | No | none | Only to link the installation to an amabledata platform account (managed services). Without it the installation runs in open-source mode. |
CONTROL_PLANE_URL |
Variable | No | https://app.amabledata.com |
Control plane origin, used only with LICENSE_KEY. |
CONTROL_PLANE_PUBLIC_KEY |
Variable | No | none | Control plane public key, used only with LICENSE_KEY. |
EMAIL_ALLOW_UNVERIFIED_DOMAIN |
Variable | No | none | Dev only: lets a workspace send without a verified domain. Ignored in production. |
WEBHOOKS_ALLOW_LOOPBACK |
Variable | No | none | Dev only: allows loopback webhook receivers. Ignored in production. |
Edge Worker (amable-edge)
Section titled “Edge Worker (amable-edge)”| Name | Type | Required | Default | Purpose |
|---|---|---|---|---|
ANALYTICS |
Durable Object binding | Yes | AnalyticsDO |
One analytics database per site, plus one site index per workspace. |
ANALYTICS_QUEUE |
Queue producer and consumer | No | analytics (batch 100, timeout 2 s) |
Batches enriched events into the analytics database. Without it, events are written directly. |
AE |
Analytics Engine dataset | No | amable_analytics |
Realtime high-volume counters; without it counts stay in memory. |
FILES |
R2 | No | amable-files |
Raw analytics archive (prefix analytics-archive/) before retention purges. |
CORE |
Service binding | Yes (after bootstrap) | amable-core |
Signed calls to the core for forms, bookings, pages and media. |
ENVIRONMENT |
Variable | Yes | production |
Never dev in production. |
CORE_ORIGIN |
Variable | Yes | From --core-origin or --app-origin |
The core origin, used before the service binding exists and to verify email tokens. |
EDGE_GATEWAY_SECRET |
Secret | Yes | Generated by the script | Same value as on the core. |
Durable Object migrations
Section titled “Durable Object migrations”| Worker | Tag | New SQLite classes |
|---|---|---|
| core | v1 |
TenantDb, Engine |
| core | v2 |
MailDb |
| core | v3 |
EditSession, BookingCalendar |
| edge | v1 |
AnalyticsDO |
These are applied by Cloudflare at deploy time. The databases inside them are migrated by amabledata itself when they start (see Updating).
CPU limit
Section titled “CPU limit”The core Worker declares "limits": { "cpu_ms": 120000 } (120 seconds of CPU per invocation instead of the 30-second default) in deploy/self-host/core.wrangler.jsonc and deploy/cloudflare/wrangler.jsonc, because sealing a long signed PDF can need more than 30 seconds. Keep it when you edit the template; it requires the Workers Paid plan.
Compatibility date
Section titled “Compatibility date”Both Workers use compatibility_date: 2026-10-01. Do not change it: the application is tested with that date.
Limits and permissions
Section titled “Limits and permissions”- Changing
PASSWORD_PEPPERlocks every user out (no password can be verified). ChangingAUTH_ENCRYPTION_KEYmakes two-factor seeds and stored OAuth grants unreadable. EDGE_GATEWAY_SECRETmust be the same on both Workers, otherwise hosted forms, booking pages and landing pages fail. The setup script keeps it equal: when only one Worker has it, it writes one new value to both.- Only someone with access to the Cloudflare account can change these settings. Inside amabledata, workspace settings are managed in General settings.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
| PASSWORD_PEPPER secret is not configured or AUTH_ENCRYPTION_KEY secret is not configured | The secret is missing on the core | Set it (the setup script does it for you on --deploy). |
| Everybody’s password is suddenly wrong | PASSWORD_PEPPER was changed |
Restore the previous value. |
| A variable vanished after an update | It was not in the template | Add it to deploy/self-host/*.wrangler.jsonc or store it as a secret. |
Analytics answers analytics_unavailable |
The core has no ANALYTICS binding (Deploy button only) |
Deploy with the setup script. |
| The update notice never appears | APP_VERSION missing (no release tag) or UPDATE_CHECK=off |
Deploy from a release tag; remove UPDATE_CHECK. |

