OTF Mattermost Can't Connect
resolvedWorkspace
[OTF] Optimified
Created
Tue Mar 24
Updated
Tue Mar 24
Content
## Description
Mattermost client (desktop/browser) showed "couldn't connect to this server" when accessing `comms.optimifed.com`. The server was online in Railway and the default Railway URL worked fine.
## Steps to Reproduce
The `optimifed.com` domain was moved to a new Cloudflare account. This caused:
1. **Stale DNS records** — Cloudflare auto-imported A/AAAA records from the old account's proxy IPs (104.21.59.155, 172.67.179.219). These were circular (Cloudflare pointing to old Cloudflare edge) and not real origin records.
2. **Wrong port** — Railway auto-detected port 8443 (Mattermost's TLS port). Since Railway terminates TLS, the correct internal port is 8065.
3. **Domain verification** — Railway couldn't verify the custom domain because Cloudflare's proxy (orange cloud) hid the CNAME target.
## Resolution
1. Deleted all stale A and AAAA records from the new Cloudflare account
2. Changed Railway port from 8443 to 8065
3. Set Cloudflare SSL/TLS mode to Full (Strict)
4. Temporarily set CNAME to DNS-only (grey cloud) for Railway domain verification
5. Once verified, flipped back to Proxied
Service restored on 2026-03-24.
## Related
- Tech asset: [[otf-mattermost]]
- Related issue: [[otf-n8n-cant-connect]]