Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
3.0 KiB
3.0 KiB
Cloudflare API Setup - Quick Start
Last Updated: 2026-01-31
Document Version: 1.0
Status: Active Documentation
Automated Configuration via API
This will configure both tunnel routes and DNS records automatically using the Cloudflare API.
Step 1: Get Cloudflare API Credentials
Option A: API Token (Recommended)
- Go to: https://dash.cloudflare.com/profile/api-tokens
- Click Create Token
- Use Edit zone DNS template OR create custom token with:
- Zone → DNS → Edit
- Account → Cloudflare Tunnel → Edit
- Copy the token
Option B: Global API Key (Legacy)
- Go to: https://dash.cloudflare.com/profile/api-tokens
- Scroll to API Keys section
- Click View next to "Global API Key"
- Copy your Email and Global API Key
Step 2: Set Up Credentials
Interactive Setup:
cd /home/intlc/projects/proxmox
./scripts/setup-cloudflare-env.sh
Or manually create .env file:
cat > .env <<EOF
CLOUDFLARE_API_TOKEN="your-api-token-here"
DOMAIN="d-bis.org"
TUNNEL_TOKEN="eyJhIjoiNTJhZDU3YTcxNjcxYzVmYzAwOWVkZjA3NDQ2NTgxOTYiLCJ0IjoiMTBhYjIyZGEtOGVhMy00ZTJlLWE4OTYtMjdlY2UyMjExYTA1IiwicyI6IlptRXlOMkkyTVRrdE1EZzFNeTAwTkRBNExXSXhaalF0Wm1KaE5XVmpaVEEzTVdGbCJ9"
EOF
chmod 600 .env
Step 3: Run Configuration Script
cd /home/intlc/projects/proxmox
./scripts/configure-cloudflare-api.sh
What it does:
- ✅ Gets zone ID for
d-bis.org - ✅ Gets account ID
- ✅ Extracts tunnel ID from token
- ✅ Configures 4 tunnel routes (rpc-http-pub, rpc-ws-pub, rpc-http-prv, rpc-ws-prv)
- ✅ Creates/updates 4 DNS CNAME records
- ✅ Enables proxy on all DNS records
What Gets Configured
Tunnel Routes:
rpc-http-pub.d-bis.org→https://192.168.11.251:443rpc-ws-pub.d-bis.org→https://192.168.11.251:443rpc-http-prv.d-bis.org→https://192.168.11.252:443rpc-ws-prv.d-bis.org→https://192.168.11.252:443
DNS Records:
- All 4 endpoints → CNAME →
<tunnel-id>.cfargotunnel.com(🟠 Proxied)
Troubleshooting
"Could not determine account ID"
Add to .env:
CLOUDFLARE_ACCOUNT_ID="your-account-id"
Get account ID from: Cloudflare Dashboard → Right sidebar → Account ID
"API request failed"
- Verify API token has correct permissions
- Check token is not expired
- Verify domain is in your Cloudflare account
"Zone not found"
- Verify domain
d-bis.orgis in your Cloudflare account - Or set
CLOUDFLARE_ZONE_IDin.env
Verify Configuration
After running the script:
-
Check Tunnel Routes:
- Zero Trust → Networks → Tunnels → Your Tunnel → Configure
- Should see 4 public hostnames
-
Check DNS Records:
- DNS → Records
- Should see 4 CNAME records (🟠 Proxied)
-
Test Endpoints:
curl https://rpc-http-pub.d-bis.org/health
Files Created
.env- Your API credentials (keep secure!)- Scripts are in:
scripts/configure-cloudflare-api.sh