HTTPS and Custom Domains
Understand Synora's strict HTTPS requirements and choose between Permanent Cloudflare Tunnel and direct Caddy 2 TLS.
HTTPS Policy in the Obsidian Plugin
plugin/src/pairing.ts validates every Server URL before storing credentials or sending API requests:
- Remote servers must use
https://. - Plain
http://is rejected for remote hosts and permitted only for local loopback testing (localhost,127.0.0.1,[::1]). - URLs containing embedded usernames/passwords, query strings (
?), or fragments (#) are rejected.
WebSocket connections (/ws) automatically upgrade to wss:// for https:// servers.
Method A: Permanent Cloudflare Tunnel (Lite & Standard)
- Works behind NAT or strict firewalls without opening ports
80or443. - Cloudflare terminates TLS at the edge and forwards traffic over an outbound tunnel to
http://api:3000. - Supported in both Lite Mode and Standard Mode.
Method B: Direct Caddy HTTPS (Standard Mode Only)
If you prefer direct TLS termination on your VPS without proxying through Cloudflare:
- Point an
A(and optionallyAAAA) DNS record for your hostname (e.g.sync.example.com) to your VPS public IP. - Ensure ports
80/tcp,443/tcp, and443/udpare open in your VPS firewall and not occupied by nginx/Apache. - Run
installer/install.shin Standard Mode and select [3] Direct Caddy HTTPS. - Provide your hostname (
SYNORA_DOMAIN) and certificate notice email (ACME_EMAIL).
Caddy uses deployment/shared/configuration/Caddyfile:
{
email {$ACME_EMAIL}
}
{$SYNORA_DOMAIN} {
encode zstd gzip
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains"
X-Content-Type-Options "nosniff"
Referrer-Policy "no-referrer"
}
reverse_proxy api:3000
}
Note that Caddy stores certificates and state in deployment/standard/data/caddy and deployment/standard/config/caddy.