So, you’re ready to dive into the world of Farcaster and set up Hubble? Awesome! I recently went through the process myself, and I’m here to share a step-by-step guide to help you get Hubble up and running on your machine. Whether you're a seasoned pro or just getting started, I've got you covered. Let's do this! 💪
Before we jump into installing Hubble, we need to make sure your environment is all set. Hubble runs on Node.js, so if you don’t have that installed yet, let’s take care of it first.
Install Node.js and Yarn:
First, download and install Node.js from the official website. Make sure to grab the LTS version—it’s the most stable one!
Next, we need Yarn, which is a package manager that works great with Node.js. You can install Yarn globally using npm (which comes with Node.js):
npm install --global yarnCheck that everything installed correctly by running:
node -v yarn -vYou should see version numbers pop up—if so, you're good to go! 🎉
Now that our environment is ready, it’s time to bring Hubble onto your local machine.
Clone the repository:
Open your terminal, and run:
git clone https://github.com/farcasterxyz/hubble.gitThis will download all the Hubble code to your local system.
Navigate to the Hubble directory:
After cloning, switch to the Hubble directory:
cd hubble
Let’s get Hubble configured so it can work its magic. We’ll be dealing with some configuration files now.
Copy the sample environment file:
Hubble provides a sample environment file to make configuration easier. Simply copy it like this:
cp .env.sample .envThis creates a new
.envfile where you can put all your custom settings.
Edit your
.envfile:Open the
.envfile in your favorite text editor. Here, you’ll configure things like database connections and API keys.Don’t worry—if you’re not sure what some of these settings should be, the sample values usually work for most setups. 👍
Hubble has a few dependencies that we need to install before it can run.
Install dependencies with Yarn:
While still in the Hubble directory, run:
Yarn will go through and install everything Hubble needs to run. This might take a minute or two, so feel free to grab a coffee while you wait! ☕
Hubble uses a PostgreSQL database, so let’s get that set up.
Set up PostgreSQL:
If you don’t have PostgreSQL installed yet.
After installation, create a new PostgreSQL database:
Make sure your
.envfile has the correct database connection details.
Migrate the database:
With the database ready, let’s apply the migrations:
This will set up the necessary tables and data structures for Hubble to operate.
Now comes the moment we’ve been waiting for—launching Hubble!
Start Hubble:
Simply run:
yarn startIf everything is set up correctly, Hubble should start running smoothly, and you’ll see logs in your terminal.
Check out the logs:
Keep an eye on the terminal output. If anything goes wrong, the logs will give you a clue about what needs fixing.
And that’s it! You’ve successfully installed Hubble and got it up and running. Whether you’re contributing to Farcaster or just exploring what Hubble can do, you’re all set to dive in. If you run into any issues, don’t hesitate to look back at your steps or reach out to the community. They’re super helpful!
Happy coding, and welcome to the Farcaster universe! 🌟

