04 · Public-Safe Operations & Deployment Runbook
SSOT Status: Authoritative Specification
Machine Source:
spec/fiderail.manifest.json(schemaVersion: 1.0.0)Release:
v2.3.5
This runbook is public-safe and never contains server IPs, SSH ports, private keys, or RPC/proxy tokens.
1. Production Topology
Internet / AI Agents
│
▼ HTTPS (Cloudflare Proxy · Full Strict TLS)
┌──────────────────────────────────────────────────────────┐
│ fiderail.com (Trust Radar Web UI + Audit Report) │
│ api.fiderail.com (REST / MCP HTTP / Well-Known Keys) │
└──────────────┬───────────────────────────────────────────┘
│ reverse_proxy (Caddy 2 · TLS :443 / :80)
▼
┌──────────────────────────────────────────────────────────┐
│ 127.0.0.1:8787 (fiderail-api.service, Node.js >= 22.13) │
│ ▲ │
│ [Primary]: PostgreSQL 16 (127.0.0.1:5432, partitioned) │
│ [Dev / CI]: SQLite WAL (FIDERAIL_DB_PATH) │
│ ▲ │
│ fiderail-indexer.service (4-Chain Workers + Bazaar + L1) │
│ ▲ Daily compressed pg_dump (.timer) │
│ /var/backups/fiderail/ │
└──────────────────────────────────────────────────────────┘
Public Endpoints & Contacts
- Web Portal:
https://fiderail.com - API & Streamable HTTP MCP:
https://api.fiderail.com - General Contact:
founder@fiderail.com - Security Contact:
security@fiderail.com
2. Host Baseline & Hardening (Debian 12)
- Recommended Single-Node Baseline: Debian 12 (bookworm),
>= 2 vCPU,8 GiB RAM,30+ GB NVMe, non-privilegedfiderailservice user. - Directory Layout:
/opt/fiderail: Application files (fiderail:fiderail)/var/lib/fiderail: Runtime data (fiderail:fiderail)/var/backups/fiderail: Automated daily backups (fiderail:fiderail)/etc/fiderail/fiderail.env: Restricted environment config (root:fiderail,chmod 640)- PostgreSQL 16 Tuning Baseline (8 GiB RAM single-node, bound strictly to
127.0.0.1:5432): shared_buffers = 2GB,effective_cache_size = 5GB,work_mem = 16MB,maintenance_work_mem = 256MB,max_connections = 100.- Network & Outbound Isolation:
- SSH key-only login +
fail2ban+ default-drop firewall restricting:80/:443to CDN edge CIDRs; - Outbound L1 /
/v1/diagnoseprobing routed through an authenticated fail-closed proxy with strict private-DNS SSRF blocking.
3. Environment Configuration & Ed25519 State Root Signing
Configure /etc/fiderail/fiderail.env from deploy/fiderail.env.example:
- Database: Set
DATABASE_URLto use PostgreSQL 16 (takes priority overFIDERAIL_DB_PATH). - Multi-RPC Failover Pools: Comma-separated RPC lists per chain (
BASE_RPC_URLS,BASE_RECEIPT_RPC_URLS,SOLANA_RPC_URLS,ARBITRUM_RPC_URLS,POLYGON_RPC_URLS) withRPC_PACE_MS=350per-host burst serialization. - Ed25519
stateRootSigning: - Set
FIDERAIL_STATE_ROOT_PRIVATE_KEY_PEM(PKCS#8 PEM with literal\nescapes for single-line systemdEnvironmentFile) and optionalFIDERAIL_STATE_ROOT_PUBLIC_KEY_PEM(SPKI PEM, auto-derived when omitted). - Public verification keys are served automatically at
GET /.well-known/fiderail-keys.json.
4. Backup, Migration, and Verification Checklist
- Daily PostgreSQL 16 Compressed Backup:
pg_dump "$DATABASE_URL" --format=custom --compress=6 --file="/var/backups/fiderail/fiderail-pg16-$(date -u +%Y%m%dT%H%M%SZ).dump"
- Lossless SQLite to PostgreSQL 16 Migration:
npm run migrate:sqlite-to-pg -- ./data/fiderail-backup.db "$DATABASE_URL"
- Post-Deploy Verification:
npm testpasses (TypeScript build + Node test suite + SSOT anti-drift + Python SDK suite);systemctl is-active postgresql fiderail-api fiderail-indexer caddy;curl -sS https://api.fiderail.com/healthzconfirmsstatus: "ok",version: "2.3.5",dataset.storageMode: "postgresql+snapshot",indexer.storageMode: "postgresql+snapshot",stateRootSigning.enabled: true, and all 4 chains signed;curl -sS https://api.fiderail.com/.well-known/fiderail-keys.jsonreturns the active Ed25519 public key for offline signature verification.