So You Want To Be A Block Explorer? Getting Started with Bitcoin Core & Ord

This guide consists of 4 parts, and is meant to be comprehensive in terms of setting up a Bitcoin node with the ord server running on Linux. Part I covers the hardware needed. Part II covers OS installation. Part III covers Bitcoin client installation and setup. Part IV covers ord installation and setup.

If you encounter any errors/issues along the way, ChatGPT is an invaluable resource for everything except Part IV. If you plan to run this on your everyday machine, you can skip straight to Part III if it’s a UNIX-based system. If you have a Windows PC, may god have mercy on your soul.

Good luck fellow Bitcoin wizards - welcome to the decentralized future 🧙‍♂️🪄🫡


Part I: Hardware

When running a full Bitcoin node with ord, the recommended setup has at least 1 TB of storage space and 4 GB of RAM. Since I thought I might want to do some more complex things with ord later on, I decided to go for a 2 TB setup and 16 GB of RAM. I liked that the Mini PC was small enough to carry around easily, but powerful enough to run more than just Bitcoin.

Step 1: Procure the Hardware

The exact hardware I ordered was a Beelink Mini PC and a 2 TB Samsung SSD. In this guide, you’ll also need a wired keyboard, mouse, monitor, and 8 GB flash drive. If you do not already have these accessories, links are below for convenience.

Key components of my future Bitcoin node.
Key components of my future Bitcoin node.

Step 2: Install the SSD

After those items arrived, the next step was to get the 2 TB SSD into the Mini PC. This was pretty straightforward, though it required having proper screwdrivers tailored for electronics. An instruction video on how to do this can be found here. Below you’ll see me going through the process. It’s very straightforward.

Step 3: Get a bootable version of Ubuntu on the 8 GB flash drive

After the SSD was properly installed, the final step is to get a bootable version of Ubuntu onto the flash drive. Follow the instructions on Ubuntu’s site which include using Etcher to turn the Ubuntu download into a bootable file.

Step 4: Put it all together!

As a final step in this section connect the Mini PC to your keyboard, mouse, and monitor. Voilà! The hardware is ready to go.

Hardware setup complete!
Hardware setup complete!

⭐️ Part I complete! With that, we’ve got hardware all set up. We’re now ready to get Ubuntu installed on the mini PC.


Part II: Installing Ubuntu

Once you’ve got the hardware set up, the next step is getting Ubuntu onto the 2 TB SSD and setting that as the primary boot option. While this may sound easy, it does get into the weeds in a few places. Remember when you got a virus on your parent’s computer growing up? This should take you back to those days.

Step 1: Boot into BIOS

Plug in your flash drive with the bootable version of Ubuntu installed (Part I: Step 3). Start the mini PC and immediately hold down F4 on your keyboard. Note: The exact key may be different depending on your PC. This should get you into the BIOS “Select Boot Device” menu. It should look something like the image below.

Choose to boot off of the flash drive rather than the pre-installed hard drive.
Choose to boot off of the flash drive rather than the pre-installed hard drive.

Step 2: Choose the flash drive as the boot device

Once you’re in the BIOS menu, you’re going to want to boot from the connected flash drive. This will take you to the Ubuntu installation flow.

Step 3: Install Ubuntu on the 2 TB SSD

This step is the most complicated one in the entire flow. ChatGPT is your friend if you get lost or confused here. I recommend following THIS GUIDE to get Ubuntu properly set up on your SSD.

A few notes to help you along the way:

  • I didn’t delete the Windows setup from the mini PC’s native hard drive, though you are welcome to.

  • If you use the same setup as me, the 2 TB SSD came unformatted, so I needed to create new partitions.

  • When in doubt, ask ChatGPT :)

Once you’ve completed this step, your computer should boot into Ubuntu!

Step 4: Update the BIOS to boot into Ubuntu

Finally, my mini PC still wanted to reboot into Windows when it was restarted. If your setup automatically boots into Ubuntu, you can skip this step. If not read on!

Restart your PC and boot into BIOS just like in Step 1. This time, choose the “Enter Setup” option. From there, navigate to the “Boot” menu as in the video below.

After getting to the Boot menu, update the “UEFI Hard Disk Drive BBS Priorities” to have Ubuntu as the first option. Now whenever you restart your computer, it’ll automatically boot into Ubuntu!

The video below will walk you through all of these steps.

⭐️ Part II complete! With that, we’ve got Ubuntu installed on our 2 TB SSD and we’re ready to get our Bitcoin node up and running.


Part III: Running a Bitcoin Node

Now on to the fun part - getting a Bitcoin node up and running! This process is actually relatively straightforward. It’s very well documented in the Running a Full Node guide available on Bitcoin Core’s website. I’ll walk you through my personal journey here, but it was made pretty simple via the guide.

Step 1: Understand the Command Line

The one thing you’re going to need a bit of familiarity with for Part III and Part IV is the command line. Open your terminal by searching for Terminal in Mac or In Unix operating systems (Linus & Mac), there are two key commands I want to highlight that are key to navigating around the filesystem:

  • ls - lists folders in the current directory

  • cd - changes the directory from the current one to a new one

There is a brief example below, and here you can find a full guide on navigating the file system. I also highly recommend ChatGPT for questions around the basics of terminal navigation/commands.

# The ls command lists the folders in the current directory you are in

e.x.
tyler$ ls
>> home bitcoin tylers_work.txt

# The cd command allows you to change directories

e.x. 
# list the current directories to see what we can change to
Users$ ls
>> tyler udi

# Explicitly specify to change from the Users directory to the tyler directory
Users$ cd tyler
tyler$ 

# Use '..' to move back up one directory from the tyler directory
tyler$ cd ..
Users$

Step 2: Downloading Bitcoin Core

Now that you’re a command line wizard, this link will take you to the Bitcoin Core website where you can download the version of Bitcoin right for your machine. In this guide, I’ll be installing for Linux, so I downloaded the Linux (tar.gz) version.

Step 3: Installing Bitcoin Core & Syncing Your Node

The guide on Bitcoin Core’s site contains a set of instructions you can follow in order to get it installed. READ IT AND FOLLOW IT!

Below you’ll see a video of me going through the entire process. I purposefully left it unedited with errors that I made. The point is to show that, yes, you will encounter issues, and yes, everyone does :) Just keep calm and push through.

There are a few notes I want to point out from the video above for those of you who follow along.

  • I successfully ran sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-25.0/bin/*. But when starting bitcoin-qt, I left out the first / in /usr/local/bin/bitcoin-qt. I didn’t catch that error, and instead navigated directly to /usr/local/bin to start bitcoin-qt.

  • Because this is a fresh install of Ubuntu, some packages were missing. I needed to install libxcb-xinerama0 via sudo apt install libxcb-xinerama0 before Bitcoin Core could start.

  • Syncing took ~24 hours, so not bad at all!

🐣 Easter Egg: Pay attention to how long it takes for your node to sync pre-Ordinals blocks and post-Ordinals blocks :)

Step 4: Set tx-index=1 in bitcoin.conf

In order for ord to work properly in Part IV*,* you’ll need to set tx-index=1 in bitcoin.conf. This tells your node to track EVERY transaction, not just the ones that are associated with your wallets.

I missed that this was a needed flag, and it sent me down a rabbit hole of debugging when I was setting up ord. The process is very straightforward.

  • Navigate to Settings > Options > Open Configuration File

  • Click “Continue”

  • Add txindex=1 to bitcoin.conf

  • Click “Save”

This will cause your node to go back and start indexing all transactions from block 0. Video below.

[Optional] Step 5: Start Bitcoin Node on Reboot

If you never want to worry about whether your Bitcoin node is running, a great thing to do is have it start when your computer does. If you read the instructions in the GUI section fully, you’ll see there is an option to specify this in bitcoin-qt.

Use the GUI to set Bitcoin to start when the system starts.
Use the GUI to set Bitcoin to start when the system starts.

⭐️ Part III complete! With that, our node is up and running. Take a victory lap! You’re now contributing to the decentralization of the Bitcoin network. That’s a BIG deal! Bitcoin is now more secure because of you 🫡


Part IV: Ord

Last but not least, we need to get down and dirty to get ord up and running. This is the most technical part of this guide, and will require more use of the terminal.

Step 1: Read the ord documentation

You can find it on Github here. Seriously, read the README first so you’re not confused about what happens next.

Step 2: Install ord :)

This was more complicated for me given this was a brand new machine. I’ve put together the video at the end of this guide with all my steps in it. For the most part, we’ll be following what is in the Github guide that you already read.

From the command line:

  1. Get libssl-dev: sudo apt-get install libssl-dev

  2. If you don’t have rust, install it: sudo apt install rustc

    Note: This diverges from the curl command recommended in the Github READ.ME

  3. If you don’t have git, install it: sudo apt install git

  4. From your home folder, clone the ord repository to your local machine: git clone https://github.com/ordinals/ord.git

  5. Change directories into ord: cd ord

  6. If you don’t have cargo, install it: sudo apt install cargo

  7. If you don’t have pkg-config, install it: sudo apt install pkg-config

  8. Run cargo install --release (instead of cargo build --release)

    Note: This will make ord much easier to access across your system. Only use cargo build if you plan on developing on ord and having multiple local version. I went back and changed this from my video.

WHOO! ord is now installed on your machine. Only a few more steps to get it in sync with our node.

[OPTIONAL] Step 3: Add ~/.cargo/bin to your .bashrc

This step will allow you to call ord from any directory! Kudos to GPT4 on this. Literally couldn’t have said it better myself.

To update your .bashrc file to include the Cargo bin directory (~/.cargo/bin) in your PATH on Ubuntu (or any Linux distribution that uses bash as the shell), you'll need to edit the .bashrc file in your home directory. This ensures that any binary installed via Cargo is readily available from the terminal without needing to specify the full path. Here's how you can do it:

  • Open Your .bashrc File:

    • Open a terminal.

    • Use a text editor to open the .bashrc file located in your home directory. For example, you can use nano (a command-line text editor) by typing:

      nano ~/.bashrc
      
    • If you prefer graphical text editors and your graphical environment is running, you could use something like gedit instead:

      gedit ~/.bashrc
      
  • Add Cargo's bin Directory to the PATH:

    • Scroll to the bottom of the .bashrc file and add the following line:

      export PATH="$HOME/.cargo/bin:$PATH"
      
    • This command appends ~/.cargo/bin to your existing PATH, ensuring that the shell can locate executables in this directory.

  • Save and Close the File:

    • If you're using nano, you can save changes by pressing Ctrl + O, hitting Enter, and then exit by pressing Ctrl + X.

    • If you're using gedit, simply save the file and close the editor.

  • Apply the Changes:

    • For the changes to take effect, you need to reload your .bashrc file. You can do this by opening a new terminal window or by typing the following command in the current terminal window:

      source ~/.bashrc
      
    • This command reloads the .bashrc file, applying any changes you've made.

Now, any executables installed via Cargo will be available system-wide in any new terminal session. You can verify that the PATH has been updated by echoing its value:

echo $PATH

You should see ~/.cargo/bin included in the output. This setup is particularly useful for running Rust tools and applications installed through Cargo without needing to specify their full paths.

Step 4: Indexing ord & starting the server

Because ord is installed on the same machine as Bitcoin core, it should pick up and automatically connect to your node. From here, indexing transactions is simple!

Run ord index update and you should see the magic start to happen!

This process will take ~24 hours similar to the initial Bitcoin node sync.

After the initial index is complete, you can start up the ord server. This will listen for new blocks and sync simultaneously with your Bitcoin node.

Run ord server --http-port 8080 to have ord start listening for new blocks as well. In the video below, you’ll see I have bitcoind running in the terminal on the left, ord server running in the terminal on the right, and mempool.space below both. When block #830294 is mined, you’ll see that both bitcoind and ord server recognize it and index it!

Step 5: Creating your ord wallet

While you could do this at any point after installation, I liked waiting until everything was configured to do this step.

Simply type ord wallet create into the command line, and you’re ready to rock!

⭐️ Part IV complete! With that, our guide is complete. You are now ready to inscribe to your heart’s content. I highly recommend joining the Ordicord for support along the way!


Conclusion

Well, that was fun! It certainly wasn’t a seamless process, but it was a very fulfilling one. If you made it through all of these steps, then you are in the upper echelon of Bitoiners. Not only are you contributing to the decentralization and security of the network, but you are also well on your way to inscribing your own collection!

HUGE thank you to Rijndael who helped me debug some thorny issues with ord along the way.

Resources:

Subscribe to twhittle
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.