Skip to content

GitHub Actions Deployment ​

The workflow is .github/workflows/deploy-worker.yml, displayed as 00 Deploy Worker in newer versions (previously Deploy Worker). For a first deployment, follow Getting Started.

Run a Deployment ​

  1. Open Actions → 00 Deploy Worker in your fork.
  2. Click Run workflow and select the deployment branch.
  3. Leave apply_encryption_keyring and rotate_encryption_key unchecked for a normal deployment.
  4. Check the final Worker URL and deployment status.

Pushes to master or main also trigger deployment when frontend, backend, shared code, tests, or deployment configuration changes. For documentation-only changes, run it manually. Automatic updates dispatch deployment after merging a release.

Deployment Credentials ​

Add these under Settings → Secrets and variables → Actions → Secrets:

Repository SecretPurpose
CLOUDFLARE_API_TOKENCloudflare API access; see token setup
CLOUDFLARE_ACCOUNT_IDTarget Cloudflare account
EDGECHAT_ADMIN_USERNAMEInitial administrator username
EDGECHAT_ADMIN_PASSWORDInitial administrator password

Provide administrator credentials as a pair. Updates can omit them when an active super administrator exists. Initialization creates missing accounts only; see Administrator Setup for setup and recovery.

Workflow Steps ​

  1. Install dependencies, run tests, and build the frontend.
  2. Reuse or create D1, session KV, and R2; generate wrangler.ci.toml.
  3. Apply the full schema for a new database or pending migrations for an existing one, then verify structure.
  4. Initialize an administrator from Secrets and check for an active super administrator and encryption keys.
  5. Deploy the Worker and inject TURN Secrets if configured.

Steps run in order. Expand the failed step to inspect its log.

TaskGuide
Retention, upload limits, and site originsSite Configuration
Attachments, avatars, and enabling R2Attachments and Storage
Voice relay SecretsVoice Calls and TURN
Database upgrades and migration failuresD1 Migrations
Encryption key rotation and backupsEncryption Keys
Post-deployment checksInstallation and Version Checks

Resource Names ​

Defaults reuse the cfchat Worker, cfchat-db database, and cfchat-files bucket by name.

Session KV defaults to cfchat-sessions. If an existing site uses a different namespace title, set the Repository Variable EDGECHAT_KV_NAMESPACE_TITLE to that title to keep the same session store.

Other Workflows ​

The separate deploy-demo.yml uses DEMO_CLOUDFLARE_ACCOUNT_ID and DEMO_CLOUDFLARE_API_TOKEN without touching production databases. See Frontend-only Demo.

Android workflows run separately from the Worker. Build and signing instructions are in the client guide.

Retention settings moved to Site Configuration. Manual database steps are in D1 Migrations.

Built on Cloudflare · Designed for self-hosting