--- id: TASK-51.1 title: 'Phase 2: Fix external service URLs (analytics, maps sync, Twenty CRM)' status: Done assignee: [] created_date: '2026-02-25 07:47' labels: - infrastructure - domains - migration dependencies: [] parent_task_id: TASK-51 priority: high --- ## Description Update hardcoded references to standalone domains used as service endpoints. Must be done BEFORE Phase 1 redirects to avoid breaking analytics, maps sync, and network module. Files: website/index.html, website/create-space.html (collect.js), docker-compose.yml (MAPS_SYNC_URL, TWENTY_API_URL), modules/maps/mod.ts, modules/network/mod.ts. DECISION NEEDED: Is Twenty CRM (rnetwork.online) a separate container or proxied through network module? ## Acceptance Criteria - [x] #1 Analytics collect.js loads from relative path on rspace.online - [x] #2 Maps sync WebSocket connects via new URL - [x] #3 Network module reaches Twenty CRM without depending on rnetwork.online domain ## Implementation Notes ### AC#1 — collect.js - Added root-level `/collect.js` proxy route in `server/index.ts` (proxies from Umami at `analytics.rspace.online`) - Replaced `https://rdata.online/collect.js` → `/collect.js` in: server/landing-proxy.ts, server/shell.ts (2x), server/landing.ts (2x), website/create-space.html, website/index.html, website/public/landing.html ### AC#2 — Maps sync - Changed `MAPS_SYNC_URL` in docker-compose.yml: `wss://sync.rmaps.online` → `wss://maps-sync.rspace.online` - Changed fallback in `modules/rmaps/mod.ts` to `wss://maps-sync.rspace.online` - Added `Host(maps-sync.rspace.online)` to rmaps-sync Traefik labels on Netcup - Added `maps-sync.rspace.online` CNAME in Cloudflare DNS - Added `!Host(maps-sync.rspace.online)` exclusion to rspace-canvas wildcard Traefik rule ### AC#3 — Twenty CRM - Already resolved: main docker-compose uses `TWENTY_API_URL=http://twenty-ch-server:3000` (internal Docker DNS) - Fallback in rnetwork module already points to `crm.rspace.online` - Fixed legacy docker-compose.standalone.yml: `https://rnetwork.online` → `https://crm.rspace.online`