Skip to content

Self-Deploy Your PWA

Fork the template and deploy your own DAO Message instance. All platforms are free. Your messages stay end-to-end encrypted regardless of where you host.

Which Platform?

PlatformFree TierChina AccessOne-click?
Cloudflare PagesUnlimited bandwidth, 500 builds/mo🟢 Best (330+ edges)
GitHub PagesUnlimited (public repos)🔴 Unstable✅ (workflow included)
Vercel100 GB/mo🟡 OK
Netlify100 GB/mo🟡 OK

Cloudflare Pages ⭐

Two options — pick one.

⚠️ Do not use deploy.workers.cloudflare.com/?url=... — it creates a Worker, not a Pages project, and the build will fail.

  1. Fork the templategithub.com/daomessage/securechat-pwa → Fork

  2. Open Cloudflare Pagesdash.cloudflare.comCreatePages tab → Connect to Git

  3. Authorize GitHub → select your fork → Begin setup

  4. Build settings (keep defaults):

    FieldValue
    Framework presetVite
    Build commandnpm run build
    Build output directorydist
    NODE_VERSION env var22
  5. Save and Deploy → ~90 seconds → get <name>.pages.dev

    No environment variables needed — the app connects to relay.daomessage.com automatically.

Every git push to main auto-deploys from now on. PRs get preview URLs automatically.

Option B · GitHub Actions + Wrangler

If you want CI visibility or want to add test steps before deploy:

  1. Fork the template (same as above)

  2. In Cloudflare Dashboard, create an empty Pages project via Direct Upload (just set a name, skip the upload step)

  3. Add two GitHub Secrets in your fork: Settings → Secrets → Actions

    SecretValue
    CF_ACCOUNT_IDCloudflare Dashboard → right sidebar Account ID
    CF_API_TOKENAPI Tokens → use "Cloudflare Pages: Edit" template
  4. The workflow .github/workflows/deploy-cloudflare-pages.yml is already included in the template. Trigger it: Actions tab → Deploy to Cloudflare Pages → Run workflow

Custom Domain (both options)

Pages project → Custom domainsSet up a custom domain → enter chat.yourdomain.com → follow CNAME instructions (auto if domain is on Cloudflare DNS).


GitHub Pages

No third-party account needed — just GitHub.

  1. Forkgithub.com/daomessage/securechat-pwa → Fork

  2. In your fork: Settings → Pages → Source → "GitHub Actions" (not "Deploy from a branch")

  3. Trigger the first deploy:

    • Actions tab → Deploy to GitHub Pages → Run workflow, or
    • Push any commit to main
  4. Visit https://<your-username>.github.io/securechat-pwa/

The workflow handles the /<repo>/ base path automatically — no code changes needed.

China Access

github.io is frequently blocked or slow in mainland China. Use Cloudflare Pages for China-accessible deployments.


Vercel

Deploy with Vercel

Step 1 · Click the button above

Vercel takes you to vercel.com/new/clone and automatically forks the template into your GitHub account.

Step 2 · Sign in to Vercel

Sign in with GitHub (recommended). Vercel will request GitHub authorization.

Step 3 · Configure the project

FieldValue
Project NameChange to your preferred name (becomes <name>.vercel.app)
Framework PresetAuto-detected as Vite — leave as-is
Build Commandnpm run build (pre-filled)
Output Directorydist (pre-filled)

No environment variables needed.

Step 4 · Click Deploy

~60 seconds. When done, click <name>.vercel.app to open your app.

Auto-deploy: Every push to main in your forked repo triggers a rebuild automatically.

Custom domain: Project dashboard → Settings → Domains → enter your domain → follow CNAME instructions.


Netlify

Deploy to Netlify

Step 1 · Click the button above

Netlify takes you to app.netlify.com/start/deploy and automatically forks the template into your GitHub account.

Step 2 · Sign in to Netlify

Sign in with GitHub (recommended). Netlify will request GitHub authorization.

Step 3 · Name your repository

Netlify asks what to name the forked repo. Default is securechat-pwa — change if you like.

Step 4 · Click Save & Deploy

~90 seconds. When done, click the <random-name>.netlify.app link to open your app.

Build config (build command = npm run build, publish directory = dist) is provided automatically by netlify.toml in the repo — nothing to fill in manually.

Auto-deploy: Every push to main triggers a rebuild. PRs get automatic preview URLs.

Custom domain: Site dashboard → Domain settings → Add custom domain → enter domain → configure DNS as instructed.


Troubleshooting

Build fails — "npm ci EUSAGE" or lock file mismatch Sync your fork with upstream: your fork on GitHub → Sync fork → Update branch → redeploy.

CORS error on login/register The relay's CORS policy is fully open as of 2026-04-21. If you still see this: clear browser cache and reload.

Refresh on sub-routes returns 404

  • Cloudflare Pages: handled by public/_redirects (already included)
  • GitHub Pages: handled by 404.html trick (the workflow copies index.html → 404.html automatically)
  • Vercel/Netlify: handled by their built-in SPA rewrite

iOS Safari — notifications don't work Web Push on iOS requires the PWA to be added to home screen first (Safari → Share → Add to Home Screen). The app shows an install prompt automatically.

How do I update to the latest template version? Your fork on GitHub → Sync fork → Update branch. Your hosting platform rebuilds automatically.

Last updated:

Zero-Knowledge E2EE Protocol — Decentralized Communication