Selfcast Farcaster from your own node, for people and their AI agents

Selfcast

Farcaster from your own Snapchain node, for people and their AI agents. No API keys from anyone.


What you get

Quickstart

You need Docker and about 800 GB of free disk while the snapshot downloads and unpacks; the node then uses 557 GB and grows (details). Each step below is explained in Running the node.

1. Install selfcast

run
git clone https://github.com/cyberchitta/selfcast
cd selfcast
cargo install --path crates/cli --locked

There is no release binary yet, so this builds selfcast from source and needs a Rust toolchain.

2. Install Snapchain, then stop it

run
mkdir -p ~/snapchain && echo SKIP_CRONTAB=true >> ~/snapchain/.env
curl -sSL https://raw.githubusercontent.com/farcasterxyz/snapchain/refs/heads/main/scripts/snapchain-bootstrap.sh | bash

The script asks two questions: whether you agree that a read node earns no rewards, and an operator FID, which you can leave blank because of the first line. Without SKIP_CRONTAB, a blank FID stops the script before it starts the node: it needs the FID to pick a day for its weekly upgrade job (snapchain #1030). With the line, upgrades happen by hand. It installs to ~/snapchain and starts the node, which begins its own snapshot download. That download cannot resume after an interruption (why), so stop it and let selfcast download instead:

run
cd ~/snapchain && ./snapchain.sh down

selfcast node fetch-snapshot refuses to start while the node's container is running, and names this command.

3. Download the snapshot and start the node

run
selfcast node fetch-snapshot
cd ~/snapchain && ./snapchain.sh up
selfcast node status

./snapchain.sh up starts the node and then follows its log; Ctrl-C stops following the log and leaves the node running. The download and unpack took about 12 h 15 min of wall-clock time on the test machine, pauses included, at 8 to 41 MB/s. Once the node is up, it has to catch up from the snapshot's date to now. Four hours after starting, the test node was still catching up:

output
Syncing (Snapchain 0.14.3): 47h07m behind at most.
  shard 0: height 48391469, 23h49m behind
  shard 1: height 49002681, 41h55m behind
  shard 2: height 48819789, 47h07m behind
Disk: 3165 GB free of 3996 GB.

What you just did

  your machine
 ┌──────────────────────────────────────────────┐
 │  selfcast ──HTTP──▶ localhost:3381           │
 │  (you, or your agent)     │                  │
 │                    Snapchain read node       │
 │                    (~/snapchain/.rocks)      │
 └───────────────────────────┬──────────────────┘
                             │ gossip, UDP 3382
                             ▼
                  other Snapchain nodes
                  and the validators

Your node keeps its own copy of the network's messages: casts, reactions, follows and profile data. Ours reports 914,246,336 messages in 557 GB. selfcast reads from the node at http://localhost:3381 unless you point it elsewhere, so what you read does not pass through anyone else's server.

A read node does not decide what goes on the network; validators do. When you post, your node checks the message against what it has, passes it on to the validators, and keeps nothing itself. The message is on the network only once it comes back in a read, which is why selfcast reads every write back before it calls it sent.

The rest of the guide

  1. Running the node
  2. Using the client
  3. Giving your AI agent Farcaster
  4. Safety
  5. Checking a voucher
  6. Testing Selfcast on a clean machine

Not tried yet

Going further


Selfcast is MIT-licensed: github.com/cyberchitta/selfcast.