← MasterGantt
Infrastructure

MasterGantt Sync Worker Deployment Guide

10 min deployment — April 2026

Architecture

The worker uses Cloudflare Durable Objects for real-time WebSockets. Each collaboration "room" = 1 Durable Object with persistent WebSocket connections. Changes are broadcast instantly (<1 second) to all collaborators.

The server only sees AES-256-GCM-encrypted blobs — zero knowledge of the data.

Prerequisites

Initial deployment (10 minutes)

1. Install Wrangler (Cloudflare CLI)

npm install -g wrangler

2. Log in

wrangler login

→ Opens the browser; click "Allow"

3. Create the KV namespace (fallback storage)

cd worker/
wrangler kv namespace create ROOMS

→ The command displays an ID. Update wrangler.toml:

[[kv_namespaces]]
binding = "ROOMS"
id = "YOUR_ID_HERE"

4. Deploy the worker

wrangler deploy

→ Displays the worker's URL: https://mg-sync.YOUR-SUBDOMAIN.workers.dev

5. Test

curl "https://mg-sync.YOUR-SUBDOMAIN.workers.dev/room/test/presence?client=test1"
# Should return: {"count":0}

6. Configure MasterGantt

The worker URL is pre-filled in MasterGantt (Settings → Collaboration → Server). To use your own worker, replace the URL.

Updating the worker

After modifying sync-worker.js:

cd worker/
wrangler deploy

That's it — deployment takes ~15 seconds.

Current configuration (reference)

Cloudflare account : steevebecker
Subdomain          : mastergantt.workers.dev
Worker URL         : https://mg-sync.mastergantt.workers.dev
KV namespace ID    : c2fe1889c94b4d55ad68f9d244bd812f
Plan               : Workers Paid ($5/month)

Files

FileRole
sync-worker.jsMain worker + Durable Object SyncRoom
wrangler.tomlDeployment configuration (KV, DO bindings)

Technical architecture

Client A (browser)           Cloudflare Worker         Client B (browser)
     |                            |                          |
     |-- WebSocket connect ------>|                          |
     |                            |<-- WebSocket connect ----|
     |                            |                          |
     |-- WS: encrypted blob ----->|                          |
     |                       DO broadcast                    |
     |                            |---> WS: encrypted blob ->|
     |                            |          decrypt + merge
     |                            |                          |

Costs

ComponentFree planWorkers Paid ($5/month)
Worker requests100k/day10M/day
Durable Objects$0.15/million req
WebSocket messages$0.50/million msg
KV reads100k/dayUnlimited
KV writes1k/dayUnlimited

Realistic estimate: 10 active users × 8 hours = ~$0.05/day = ~$1.50/month in additional costs.

Custom domain (optional)

To use sync.mastergantt.com:

  1. Cloudflare Dashboard → Workers → mg-sync → Triggers
  2. Add Custom Domain: sync.mastergantt.com
  3. Cloudflare manages DNS + SSL automatically

For customers who want their own instance

Provide the worker/ folder — they deploy it to their own Cloudflare account. The worker only sees encrypted blobs, no plaintext data.

Troubleshooting

ProblemSolution
500 Internal Errorwrangler tail to view logs in real time
WebSocket not connectingCheck that the plan is Workers Paid (DO required)
Blobs not receivedCheck that both clients are on the same room/password
"KV put limit exceeded"Switch to the Paid plan or wait for the daily reset
Deployment failswrangler login to renew the token
🔒 Data sovereignty: Whether hosted on Cloudflare or on your own account, the worker never sees your data in plaintext. The AES-256-GCM encryption key is held only by the collaborators — not by the server.

Ready to try collaboration?

The default server is ready to use. Deploying your own worker only becomes useful for specific sovereignty requirements.

Download MasterGantt