Farcaster
Hubs

Running a Farcaster Hub For ~$50/Month

We've determined Google Cloud to be a great source of cost control for Farcaster Hubs (opens in a new tab) with a plethora of credits.

1. Open a Google Cloud Account with Credits

Start at cloud.google.com (opens in a new tab) to open an account with $300 credits to start. They also have a Web3 Startup Program (opens in a new tab) to earn thousands of more credits. Note this information is from 2023, so credit availability could change.

2. Start a e2-standard-2 instance

Navigate to Compute Engine from the top search bar and configure an e2-standard-2 instance, with 2 vCPUs with 8GB of memory and 20 GB of SSD persistance. This should be ~$50. Make sure to select Ubuntu LTS as the boot image when configuring SSD persistance.

3. Configure your Firewall

Navigate to Firewall from the top search bar and click Create Firewall Rule. We need to create two rules, farcaster-ingress and farcaster-egress:

Rule NameDirectionTargetsDestination FiltersProtocols and Ports
farcaster-ingressIngressAll instances in the networkSource IPv4 ranges: 0.0.0.0/0tcp:22,2281,2282,2283,3000
farcaster-egressEgressAll instances in the networkSource IPv4 ranges: 0.0.0.0/0tcp:80,443,2281,2282,2283,3000

4. Start Your Hub!

Install the gcloud cli (opens in a new tab) or use the ssh button.

Then, run the following command which will walk you through installation, or follow the Hubble guide (opens in a new tab):

curl -sSL https://download.thehubble.xyz/bootstrap.sh | bash

You'll be able to access your hub with the external IP found on your compute instance.

5. Using Your Hub

For monitoring through Grafana, navigate to your external ip at port 3000, or see this guide on additional configuration (opens in a new tab).

To submit messages to your hub, see the submitMessage HTTP API (opens in a new tab).


Congrats on running your hub! This guide is open-source so feel free to update it!

Join our Developer Telegram (opens in a new tab) to follow along!