# Farcaster- Hubble node

By [GLCstaked](https://paragraph.com/@glcstaked) · 2023-03-08

---

**Run a hubble client for Farcaster protocol**

[

Farcaster
---------

A sufficiently decentralized social network

Farcaster

![](https://storage.googleapis.com/papyrus_images/65ff64b956bb1d02497cbecda711478c60b73cba1f3d22149948965b1ffd3dba.png)

](https://www.farcaster.xyz/)

**Farcaster** is a decentralized social network, as an open protocol that can support many clients, just like email.

_Users will always have the freedom to move their social identity between applications, and developers will always have the freedom to build applications with new features on the network._

**What is a Hub:** _A Hub is a node in the Farcaster network that synchronizes the delta graph. It's similar to a blockchain node but with a different consensus mechanism. Hubs get deltas from clients broadcast them to other hubs over a peer-to-peer protocol. They listen to updates from the Ethereum blockchain and update the identity state of the delta graph as needed._

**Hubble** is a Typescript implementation of a Farcaster Hub.

[

GitHub - farcasterxyz/hub-monorepo: Implementation of the Farcaster Hub specification and supporting libraries for building applications on Farcaster
-----------------------------------------------------------------------------------------------------------------------------------------------------

Implementation of the Farcaster Hub specification and supporting libraries for building applications on Farcaster - farcasterxyz/hub-monorepo

https://github.com

![](https://storage.googleapis.com/papyrus_images/64f22eb9f1321d61036df502f585b23af1405a0e2d635842b7169caaff7c032e.png)

](https://github.com/farcasterxyz/hubble)

**Hardware Requirements**

2 vCPUs, 8GB RAM, 15GB SSD storage (1TB+ for local eth node). OS: Ubuntu 20.04 (focal)

1\. Setup - Install dependencies
--------------------------------

**Update System**

    sudo apt update && sudo apt upgrade -y
    

**Install Git**

    sudo apt install curl git -y
    

### Install Node

**Install NVM (node version manager)**

NVM or Node version manager, is an open-source manager for node.js and makes it easy to switch between versions of node and NPM. node version 18+ is required for hubble.

**Install Node version manager**

    curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash 
    source ~/.bashrc
    

**Use NVM to install Node.js**

Install a specific version of node and use that version

    nvm install 18.7.0
    nvm use 18.7.0
    

### Install Yarn

Import the repository’s GPG key and add the Yarn APT repository to your system

    curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
    echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
    

update the package list, and install Yarn.

    sudo apt update
    sudo apt install --no-install-recommends yarn
    

_the flag_ `--no-install-recommends` _skips node.js install_

Confirm Installation with `yarn --version`

### Install Flatbuffers

[Flatbuffers](https://google.github.io/flatbuffers/) is a cross platform serialization library for a variety of programming languages

**Install via Apt** (compatible with 20.04 focal)

    sudo apt update
    sudo apt install -y flatbuffers-compiler
    

Alternative methods can be found [here](https://stackoverflow.com/questions/55394537/how-to-install-flatc-and-flatbuffers-on-linux-ubuntu).

2\. Get an Ethereum Endpoint
----------------------------

_Farcaster is currently on Goerli Ethereum testnet before migrating to Ethereum mainnet._

The hub requires a connection to an Ethereum endpoint, this is a node running software that can verify blocks and transaction data on the Ethereum blockchain.

### Method 1: Use a third party service

You can use a trusted service such as the following, these are hosted services

[Infura](https://www.infura.io/) / [Alchemy](https://www.alchemy.com/)

### Method 2: Run your own Node

**Configure Manually**: Step by Step instructions here on how to set up and Ethereum node with nethermind and nimbus clients

[https://mirror.xyz/0xf3bF9DDbA413825E5DdF92D15b09C2AbD8d190dd/vBUNwP0gBiNFq5S\_qKNaa\_a3rqET5h6FebbM9M-KR0w](https://mirror.xyz/0xf3bF9DDbA413825E5DdF92D15b09C2AbD8d190dd/vBUNwP0gBiNFq5S_qKNaa_a3rqET5h6FebbM9M-KR0w)

The RPC port will need to be exposed, you might need to port forward on your router and open 8545 on ufw firewall settings, `sudo ufw allow 8545`

To connect to the node locally `http://<local-ip-address>:8545`

To connect to the node running on the same device as hubble, `https://localhost:8545`

**Easy Setup:** some options for easy one click Ethereum node deployments

[

Stereum | Ethereum Node Setup & Management
------------------------------------------

Stereum makes Ethereum validator and node setup easy, secure, and fast. Manage your Ethereum infrastructure with one tool.

https://stereum.net

![](https://storage.googleapis.com/papyrus_images/b8352049e8efc7acca40969449839c1e11263f2ffd7d5c5eea31248862c051ed.webp)

](https://stereum.net/)

[

GitHub - NethermindEth/sedge: A one-click setup tool for PoS network/chain validators and nodes.
------------------------------------------------------------------------------------------------

A one-click setup tool for PoS network/chain validators and nodes. - NethermindEth/sedge

https://github.com

![](https://storage.googleapis.com/papyrus_images/a1c1d36c412459af8a148362f0c94dc10522d364ccc38eb04625f861bd360d02.png)

](https://github.com/NethermindEth/sedge)

3\. Run Hubble
--------------

**Clone Hubble repository**

    git clone https://github.com/farcasterxyz/hubble.git
    

**Build Hubble**

    cd hubble && yarn install && yarn build
    

![Successful build should look like this](https://storage.googleapis.com/papyrus_images/dae4e6ec8c0c77e19d9a223d267c377d961d223a89173bc42e4340a7a3e1af94.png)

Successful build should look like this

**Create a network identity for your Hub**

Move to Directory

    cd app/hubble 
    

    yarn identity create
    

![](https://storage.googleapis.com/papyrus_images/0b7c54e770dea7de2073812f716c7fc9a5324b61e6772d95b7512417fd7e2967.png)

**Start the Hub**

to boot up the Hub, where eth-rpc-url points to the Goerli node's RPC

    yarn start -e <eth-rpc-url>
    

![](https://storage.googleapis.com/papyrus_images/c501b3a74dd5a813239ffea57f01165d02f8403afe79b81a917aef77f1c3006a.png)

---

*Originally published on [GLCstaked](https://paragraph.com/@glcstaked/farcaster-hubble-node)*
