Open Source · MIT License · Zero Third-Party API Keys
Read and post on Farcaster from your own server.
A production-grade, sovereign Farcaster node and web client suite requiring zero third-party API keys. Run your own independent infrastructure in one command.
Just ONE Command!
Deploy a personal Farcaster Snapchain Read Node and Sovereign Web Client on any clean Ubuntu 22.04+ server (or AWS EC2 instance) with a single command:
curl -sSL https://raw.githubusercontent.com/mohammadma98/farcaster-snapchain-node-client/main/scripts/0-provision-compute.sh | bash
How it works: The pipeline executes all 3 stages sequentially: Server Tuning (0) → Snapchain RocksDB Streaming (1) → Web Client & Cloudflare SSL Tunnel (2).
The 3 Sequential Stages
While the single command above runs the entire pipeline end-to-end autonomously, you can also execute each modular script independently:
Server Configuration & Kernel Tuning (0-provision-compute.sh)
Installs prerequisite packages (Docker, Compose plugin, UFW firewall, zstd, jq). Configures ports: 22, 3000, 3381 (HTTP), 3382 (Gossip), 3383 (gRPC), 3005. Dynamically tunes Linux kernel network buffers for sustained P2P throughput.
curl -sSL https://raw.githubusercontent.com/mohammadma98/farcaster-snapchain-node-client/main/scripts/0-provision-compute.sh | bash
Read Node Installation & Concurrent Streaming (1-setup-read-node.sh)
Streams and downloads the Snapchain database snapshot at maximum throughput using a concurrent chunk pipeline. Extracts on-the-fly directly to RocksDB, eliminating duplicate multi-hundred-gigabyte archive files. Monitors :3381/v1/info until synced.
curl -sSL https://raw.githubusercontent.com/mohammadma98/farcaster-snapchain-node-client/main/scripts/1-setup-read-node.sh | bash
Web Client, Data Indexer & Cloudflare SSL Tunnel (2-create-client.sh)
Builds and launches the Next.js web client and fast-indexing layer in isolated Docker containers. Automatically configures a zero-config Cloudflare Edge Tunnel (https://*.trycloudflare.com) with valid SSL certificates for immediate browser access.
curl -sSL https://raw.githubusercontent.com/mohammadma98/farcaster-snapchain-node-client/main/scripts/2-create-client.sh | bash
Key Features & Capabilities
Engineered for minimal resource footprint, maximum reliability, and zero third-party dependencies.
Runs smoothly on drives as low as 600 GB to 750 GB. Memory-assisted streaming extracts directly to RocksDB partitions, reducing peak disk from 1.4 TB+ to ~500–600 GB.
Adaptive hardware detection enables reliable execution even on low-cost servers with as little as 1 vCPU core and 3 GB RAM.
Full snapshot ingestion in under 3 hours on low-end servers and under 1 hour on mid/high-end servers through concurrent streaming.
Deploys a secure Cloudflare Edge Tunnel with valid SSL certificates automatically, requiring zero manual DNS records or port forwarding.
Authorize app signers off-chain via EIP-712 custody signatures without spending Optimism ETH or submitting on-chain transactions.
Filter out or isolate casts by client origin (e.g. exclude Warpcast marketing). Responsive on mobile and desktop.
Tested Server Benchmarks & Hosting Providers
Benchmarked across real-world hardware profiles:
| Server Profile | Hardware Specs | Monthly Cost | Sync & Boot | Status |
|---|---|---|---|---|
| Low-End Entry Tier | 1 vCPU, 3 GB RAM, 750 GB HDD | ~$6 / month | ~3 hours | ✅ Verified |
| Balanced Mid Tier | 2 vCPU, 4 GB RAM, 600 GB SSD | ~$15 / month | ~3 hours | ✅ Verified |
| High-Performance Tier | 4 vCPU, 12 GB RAM, 600 GB NVMe | ~$60 / month | ~1 - 2 hours | ✅ Verified |
Tested on Hetzner, InterServer, and Cloudzy. Also compatible with AWS EC2 (m5.xlarge), DigitalOcean, Vultr, and OVH.
System Architecture & Protocol Mechanics
Direct mempool writes, gasless signing, and CometBFT consensus flow:
┌─────────────────────────────────────────────────────────────────────────────┐
│ Sovereign Farcaster Client │
│ (Web Client at localhost:3000 • Mobile Responsive • Gasless EIP-712) │
└───────────────────────┬─────────────────────────────▲───────────────────────┘
│ POST /v1/submitMessage │ GET /v1/castsByFid
│ (Protobuf Binary) │ GET /v1/info
▼ │
┌─────────────────────────────────────────────────────┴───────────────────────┐
│ Standalone Read Node (:3381) │
│ (Dockerized Snapchain Read Node • Zero API Keys • Local Mempool) │
└───────────────────────┬─────────────────────────────▲───────────────────────┘
│ libp2p Gossip (:3382) │ Block Synchronization
│ (mempool topic) │ (Tendermint / CometBFT)
▼ │
┌─────────────────────────────────────────────────────┴───────────────────────┐
│ Snapchain Validator Network │
│ Shard 0 (Identity & Rent) • Shards 1 & 2 (User Actions) │
└─────────────────────────────────────────────────────────────────────────────┘
1. Why Read Nodes Accept Writes
In Snapchain, read nodes accept writes via POST /v1/submitMessage. The node verifies the Ed25519 signature locally, places the message in its local mempool, and gossips it over libp2p (:3382) to validator nodes for block inclusion.
2. Gasless App Key Cryptography (Engine V16)
App keys are authorized off-chain: (1) Client generates an Ed25519 keypair; (2) The Ethereum custody address signs an off-chain EIP-712 KeyAddBody struct; (3) The Ed25519 private key signs for Proof of Possession (PoP); (4) The KEY_ADD is accepted with zero OP ETH gas.
3. Developer Security Guidance (Unix rm Analogy)
Like entering rm -rf in Unix, developer software taking a mnemonic seed phrase is intended strictly for developer test accounts. Never enter your cold-storage keys in local dev environments.
Sovereign REST API Documentation
The suite exposes a complete, zero-dependency RESTful API on http://localhost:3000/api/...:
Live node health check, latency, peer count, and sync state.
Retrieve protocol casts with client attribution filters (mode, limit, source, viewerFid).
Publish a new cast, quote cast, or thread reply directly to the read node mempool.
Submit or retract likes and recasts to the protocol mempool.
Follow or unfollow users via protocol-level LinkAdd / LinkRemove messages.
Fetch user profile metadata, bio, follower count, and published casts.
Query live on-chain token holdings and valuation across Ethereum and Base.
Upload images for cast embeds with server-side magic byte verification.
Authorize an EIP-712 gasless app signer without blockchain transactions or OP ETH.
Peer Verification & Human Voucher Checklist
A 3-minute reproducible test checklist for community reviewers to endorse on Farcaster:
Run script 0 on clean VPS. Confirm Docker boots.
Confirm curl :3381/v1/info returns 200 OK.
Issue EIP-712 signer with zero OP ETH.
Publish endorsement cast referencing @mohammad98.
Verified @mohammad98's Farcaster Snapchain Suite on a clean Ubuntu VPS. 3 commands booted the node on :3381 and launched the sovereign client with gasless EIP-712 signers. https://github.com/mohammadma98/farcaster-snapchain-node-client