Skip to content

Configuration

The bindings, vars and secret of the Chaski Worker, the settings its dashboard keeps, and the options of userRoutes().

A Chaski Worker takes its resources and the facts of its environment from wrangler.jsonc, and its channel settings from its own dashboard. It checks them on every call, and a mistake throws a config error that names what to fix, such as Chaski config: the CHASKI_QUEUE binding is missing.

Bindings

The names are fixed: Chaski reads each binding by its name.

BindingType
CHASKI_DBD1 databaseRequired. Where Chaski keeps its data, with migrations_dir pointing at node_modules/chaskijs/migrations.
CHASKI_QUEUEQueue producer and consumerRequired. Every delivery goes through it. Set the consumer’s max_retries to 5.
CHASKI_EMAILsend_emailRequired by the email channel.
CHASKI_FEEDChaskiFeed Durable ObjectRequired by the in-app channel.
CHASKI_SCHEDULERChaskiScheduler WorkflowRequired by schedule().
CHASKI_EVENTSChaskiEvents Durable ObjectLive updates in the dashboard.
CHASKI_ATTACHMENTSR2 bucketRequired by sends that carry email attachments.

Vars and the secret

Name
CHASKI_ENVIRONMENTVarWhere the Worker runs, such as production, shown in the dashboard’s header and returned by ready(). Unrelated to an APNs app’s environment, which picks the APNs server.
CHASKI_PUBLIC_URLVarThe absolute http(s) URL where your app mounts userRoutes(). Emails load their open-tracking pixel from it; without it, they carry none.
CHASKI_SECRETSecretEncrypts the channel credentials saved in the dashboard. At least 32 characters. chaskijs deploy uploads a random one with the Worker’s first deploy (wrangler deploy --secrets-file). On a Worker that already runs, set it with wrangler secret put CHASKI_SECRET: until the Worker exists, secret put creates an empty one under its name.

access.dev in wrangler.jsonc is the identity wrangler dev signs in to the local dashboard; see Local development.

Channel settings

The Channels page of the dashboard keeps each channel’s settings in Chaski’s database. A channel is on once its settings are saved, and off again when you remove them. The push keys and credentials are encrypted with CHASKI_SECRET, so push can’t be set up without it, and the dashboard never shows them again: it says they’re Saved, and lets you replace them.

A saved setting can stop working after it was saved: a binding it needs left wrangler.jsonc, or CHASKI_SECRET changed and its credentials no longer open. Its channel then shows as Failing, with the reason; its deliveries fail with a config error that says the same, and the other channels and the dashboard carry on. ready() lists them under problems. Save the setting again to fix it.

Email

Field
FromRequired. An address on a domain onboarded to Email Service, which CHASKI_EMAIL allows.
From nameThe sender’s display name.
Reply-toThe address replies go to.

In-app

No fields: turning it on is the setting. It needs CHASKI_FEED.

Push

Set up any of the four. Push is on once one of them is.

Web push
ContactA mailto: or https: address the push services can reach you at.
KeysGenerate keys makes a pair. Use existing keys takes the pair you already send with: the base64url uncompressed P-256 public key (65 bytes) and its private key, as web-push tools print them. Chaski checks that the two belong together.
APNs
Team IDYour Apple team ID.
Key IDThe APNs key’s ID.
Private key (.p8)The .p8 file, uploaded or pasted.
iOS app, macOS appEach app’s Bundle ID and Environment: Sandbox for development builds, Production for TestFlight and App Store builds. Turn on one or both.

A device that registers with an environment of its own overrides its app’s.

FCM
Service account keyThe service account’s JSON key file from the Firebase console, uploaded or pasted.
WNS
Directory (tenant) IDThe tenant of the Microsoft Entra app registration.
Application (client) IDThe app registration’s ID.
Client secretOne of its client secrets.

Muted by default

Types every contact has muted until they save preferences of their own, such as a weekly digest people opt into; see Preferences.

Languages

The languages your templates are written in: the default, which every template starts in, and the others a template can add translations in. With none saved, Chaski sends every template’s content as written, in one language, and the formatting filters write English.

Setting
Default languageA BCP 47 tag, such as en. It changes only while no template has a translation.
Other languagesTags such as es, pt-BR. Taking one off keeps its translations, unused until you add it back.

A template file with translations loads only once the languages are saved, with its defaultLocale as the default.

userRoutes()

The options of the routes your app mounts for its frontend:

Option
chaskiRequired. (c) => c.env.CHASKI: the app’s service binding to ChaskiEntrypoint.
identifyRequired. Returns the signed-in user’s id, null to answer 401, or a Response.
allowedOriginsOrigins of your frontend when it’s served from another origin than these routes. Your app answers CORS for them: see Browser clients.
groupsThe routes the mount serves: ['feed', 'push', 'preferences'] by default. A team inbox identify names team:<id> serves ['feed']: a browser belongs to one contact, so registering it there would take it from the user’s own inbox. Leave out preferences when your app keeps a preferences API of its own, so the browser can’t write around its rules.
allowPush(c, recipientId) => boolean, asked before a device is registered; false answers 403. Removing a device is always allowed.

Mount userRoutes() once per inbox: each mount’s identify names its contact, with a feed, a socket and an unread count of its own.

Updated Oct 30, 2026

MIT License · chaski.sh