Skip to content

Feat/rpc caddy ratelimit hardening#105

Merged
nol4lej merged 7 commits into
mainfrom
feat/rpc-caddy-ratelimit-hardening
Jun 26, 2026
Merged

Feat/rpc caddy ratelimit hardening#105
nol4lej merged 7 commits into
mainfrom
feat/rpc-caddy-ratelimit-hardening

Conversation

@nol4lej

@nol4lej nol4lej commented Jun 26, 2026

Copy link
Copy Markdown
Member

No description provided.

nol4lej added 7 commits June 16, 2026 20:00
Set up the public RPC origin to run behind the Cloudflare proxy with
defense-in-depth, and document the full flow.

- Caddy.Dockerfile: build Caddy with the caddy-ratelimit plugin
- docker-compose.rpc.yml: build the custom Caddy image; cap the node with
  mem_limit/cpus (RPC_MEM_LIMIT default 6g, RPC_CPUS default 1.5, sized for a
  2 vCPU / 8 GB VPS) so a query flood can't starve the host
- Caddyfile: terminate TLS with a Cloudflare Origin Certificate (Let's Encrypt
  disabled — incompatible with the CF proxy) and rate-limit per client IP
  (100 req / 10s, keyed on CF-Connecting-IP)
- .env.rpc.example: document RPC_MEM_LIMIT / RPC_CPUS; correct the RPC_DOMAIN
  note for the origin-cert + proxied setup
- scripts/sync-cloudflare-ufw.sh: idempotent, fail-closed cron script to keep
  the ufw 80/443 allow-list in sync with Cloudflare's edge ranges (v4 + v6)
- rpc-node.md: rewrite for the Cloudflare model — Cloudflare-only firewall,
  origin certificate (with rationale vs Let's Encrypt), custom Caddy build,
  rate limit, and the IP-sync cron
@nol4lej nol4lej merged commit 53431f6 into main Jun 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant