This Guide will teach us how to download, build, and run Farcaster Hubble.
You need to get your ETH-mainnet-RPC-URL
& Optimism-L2-RPC-URL
from Alchemy, and for FID
you need to have a Farcaster Account setup via Warpcast or any other client.
Next, we must install a few prerequisite libraries to help us build the Hubble.
sudo apt update & sudo apt upgrade
sudo apt install curl -y
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo apt install -y nodejs
node -v
npm install --global yarn
yarn -v
curl -L https://foundry.paradigm.xyz | bash
source ~/.bashrc
foundryup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustc --version
sudo apt install build-essential -y
sudo apt install cmake -y
sudo apt install -y libclang-dev
sudo apt install -y llvm
Goto https://github.com/protocolbuffers/protobuf/releases and navigate the to latest release for Linux and copy it's link
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v28.2/protoc-28.2-linux-x86_64.zip
unzip protoc-28.2-linux-x86_64.zip -d $HOME/.local
export PATH="$PATH:$HOME/.local/bin"
protoc --version
Now after installing all the Prerequisites, it's time to Download & build the Farcaster Hubble.
git clone https://github.com/farcasterxyz/hub-monorepo.git
cd hub-monorepo
yarn install
yarn build
yarn test
Now we have Hubble built and tested locally, Now it's time to Run it and Sync its data
cd apps/hubble
yarn identity create
Next, we need to connect with the Network type, either it's Mainnet or Testnet.
create env file
touch .env
open it using nano
nano .env
paste the following inside .env and save it
FC_NETWORK_ID=2
BOOTSTRAP_NODE=/dns/testnet1.farcaster.xyz/tcp/2282
paste the following inside .env
FC_NETWORK_ID=1
BOOTSTRAP_NODE=/dns/hoyt.farcaster.xyz/tcp/2282
save the .env file
Press ctrl+o
Press enter
Press ctrl+x
Now it's time to Run the Hubble
yarn start --eth-mainnet-rpc-url <your ETH-mainnet-RPC-URL> --l2-rpc-url <your Optimism-L2-RPC-URL> --hub-operator-fid <your FID> -n 2 -b /dns/testnet1.farcaster.xyz/tcp/2282
yarn start --eth-mainnet-rpc-url <your ETH-mainnet-RPC-URL> --l2-rpc-url <your Optimism-L2-RPC-URL> --hub-operator-fid <your FID> -n 1 -b /dns/hoyt.farcaster.xyz/tcp/2282
Now this process of syncing can take several hours depending on the Internet speed