Getting Started
Follow these four steps for a new site, then optionally configure a recommended access domain. For an existing site, use the update guide. The workflow is named 00 Deploy Worker in newer versions and Deploy Worker in older ones.
1. Prepare Cloudflare
Follow Create a Cloudflare API Token to obtain a token and Account ID. Enable R2 in Cloudflare if you want file uploads.
2. Fork and Add Secrets
Fork the EdgeChat repository to your GitHub account.

Open your fork's Settings → Secrets and variables → Actions → Secrets, click New repository secret, and add:
| Name | Value |
|---|---|
CLOUDFLARE_API_TOKEN | The Cloudflare API token you created |
CLOUDFLARE_ACCOUNT_ID | Account ID of the deployment account |
EDGECHAT_ADMIN_USERNAME | Your initial administrator username |
EDGECHAT_ADMIN_PASSWORD | Your own strong administrator password |

There is no default administrator password. Optionally set EDGECHAT_ADMIN_DISPLAY_NAME; it defaults to the username.
3. Deploy
Open
Actionsand enable workflows for the fork.Select
00 Deploy Worker → Run workflow.Select the default branch.
Leave both boxes unchecked for first-time deployments and routine updates
The options beginning with Apply EDGECHAT_ENCRYPTION_KEYRING and Add a new automatic key are for key maintenance. They apply a manually configured keyring or generate and activate a new key, respectively. Select an option only when you intend to perform that operation.
Keep the default settings and click the green
Run workflowbutton to deploy.Wait for every step to succeed, then find the site URL in the deployment log.

The workflow tests and builds the application, reuses or creates resources, initializes or migrates D1, creates the administrator, and deploys the Worker. Encryption keys are generated on first deployment and preserved afterward. See GitHub Actions Deployment for the workflow details.
4. Sign In and Check
- Open the site and sign in with your administrator credentials.
- Open registration invitations to create users or invitation links.
- Test messages between two users; test file uploads if R2 is enabled.
- Run a self-check under Installation & Maintenance.
Text chat works without R2. Enable R2 and rerun deployment to add attachment support.
5. Configure a Domain (Recommended, Choose One)
Choose one of the following methods; do not apply both to the same access hostname. The domain must already be added to your Cloudflare account.
Add a Custom Domain (Recommended)
In the Cloudflare dashboard, open Workers & Pages, select your deployed Worker, and go to Settings → Domains & Routes → Add → Custom Domain. Enter your hostname, such as chat.example.com, and select Add Custom Domain. Cloudflare configures the DNS record and certificate automatically. See the official guide.
Add a Preferred CNAME Target (Recommended)
Use this alternative to try a third-party preferred route instead of the Custom Domain method above. The preferred hostname is the DNS CNAME target; visitors still use your own chat.example.com.
- In the same Worker's
Settings → Domains & Routes → Add, chooseRoute, select your zone, enterchat.example.com/*, and setFailure modetoFail open (proceed). Save the route. - Open your domain's
DNS → Records → Add record, chooseCNAME, set the name tochatand the target to a preferred hostname, then setProxy statustoDNS only(gray cloud) and save. - Recommended candidates to try first are
saas.sin.fan,chsat.cf.090227.xyz, or Visa hostnameswww.visa.com,www.visa.com.hk,www.visa.com.sg, andwww.visa.co.jp. Choose one as the CNAME target withouthttps://or a path. Test sign-in, real-time messaging, and attachments through your own domain afterward.
Third-party prerequisites
Standard Cloudflare Worker routes require proxied DNS records. The DNS-only alternative above depends on compatible third-party SaaS routing and a valid hostname certificate; an arbitrary CNAME is not sufficient. These are third-party candidates with no guarantee of continued availability or better performance. If certificates or routing fail, use the Custom Domain method above.
Fail open bypasses the Worker when the Workers Free daily request allowance is exhausted. It does not keep EdgeChat running or automatically switch routes. See route requirements and daily requests and failure modes.
Next Steps
- Site Configuration: message retention and other settings outside the admin panel.
- Automatic Updates: sync upstream releases and deploy them.
- Telegram Bridge: connect a Telegram group.
- Administrator Setup and Recovery: missing initial credentials, manual setup, and recovery.
Token instructions now have a separate guide. Manual first-login steps are in Administrator Setup.