How To Run A Bitcoin Node With The Blockstream Satellite

Everything you need to know to install and operate a Bitcoin node connected to the blockchain via satellite, and enjoy full sovereignty.

This article covers the materials needed, installation, configuration and operation of a Bitcoin node connected via satellite using a Raspberry Pi and a Blockstream satellite kit.

Special thank you to Igor Freire from Blockstream, his patience and attention to detail were tremendous resources for the author through this exercise.

How To Run A Bitcoin Node With The Blockstream Satellite

This guide has the following sections:

  • Recommended Materials
  • Satellite Selection And Rough Pointing Angles
  • Antenna Installation
  • Raspberry Pi OS Image
  • Configuring The SSD
  • Installing And Configuring BlockSat-CLI And Bitcoin Satellite
  • Dialing In The Antenna Pointing Angles
  • Running Bitcoin Satellite
  • Conclusion

Recommended Materials:

All together, a setup like this will cost less than $800 for all the required materials. You will also benefit from having a laptop with WiFi capabilities.

Everything needed for the Raspberry Pi comes in the CanaKit listed above, except for the SSD.

View the 3 images of this gallery on the original article

Make sure to first install the supplied heat sinks as shown here:

View the 2 images of this gallery on the original article

Then, start with the lower portion of the case and place the Raspberry Pi circuit board on it. Then, place the middle of the case on the circuit board as shown here:

View the 3 images of this gallery on the original article

Then, connect the red lead from the fan to pin #2, which is the five-volt direct current power supply pin. Connect the black lead from the fan to pin #6, which is the ground pin. The fan itself snaps into place on the underside of the top of the case.

View the 2 images of this gallery on the original article

Then, snap the top of the case onto the middle part and the Raspberry Pi assembly is finished. You can set this aside for now and we’ll come back to it later.

Raspberry Pi case

Satellite Selection And Rough Pointing Angles

Source

Navigate to the Blockstream Satellite network coverage website and make note of the satellite with the strongest signal for your geographic location. You will want to either drop a pin on the map, enter the address where the satellite will be installed, or use a satellite pointer mobile app to get the most accurate elevation, azimuth and polarity numbers that you will need to set up your mounting bracket and antenna.

For example, using the Denver Federal Reserve bank address:

1020 16th Street Mall, Denver, Colorado, 80202, United States

Enter this address into the satellite map website, it will reveal the best numbers for the elevation, azimuth and polarity. Then, use those numbers to set up the correct angles on the mounting bracket and antenna. If you are using the flat panel antenna like the one in this guide, then you will want to make sure your selected satellite has the green check mark, like the Galaxy 18 for example.

Source

You can also download the Satellite Pointer app for iOS or Android to utilize an augmented reality tool to help get all of your angles right. With this app, you can find the satellite you want to point your antenna at by scanning the sky around you. Then, you will be given the best azimuth and elevation to use when you align the cross-hair pointer on screen with the satellite you want to connect with. You can also find the best polarity to use by selecting the appropriate satellite from the list option and scrolling down through the details. It helps too if you allow the app access to your location, or you can also enter the location manually.

Using the Satellite Pointer app

Make sure to notate the ideal pointer angles. You will need to carefully set up your mounting bracket based on these angles as described in the next section; otherwise you may not receive good reception from the satellite.

Also, you can follow the @BlockstreamHelp Twitter account to stay up to date with scheduled satellite maintenance that may briefly interrupt service. The announcements will look like this:

Source

Antenna Installation

The antenna is shipped in an inconspicuous box that has no mention of Blockstream or Bitcoin on it. The label on the outside of the box merely indicates that there is a flat panel antenna inside, which is commonly used for internet reception and televisions, among other things. You can view the complete manual here.

How the Blockstream satellite antenna is shipped

Upon opening the box, you will find that it contains the antenna, the Ethernet power supply, literature, mounting brackets for multiple applications, a compass, hardware and a flat wrench. 

View the 3 images of this gallery on the original article

Be careful while handling the antenna; try not to scratch the surface or drop it. Also do not apply any paint, stickers or anything else to the face of the unit. The back of the unit has the legacy-style coax cable connections and the Ethernet connection.

In this guide, I will be demonstrating the Ethernet connection. The advantage here is that the satellite signal is being converted into a digital signal internally and I do not need additional outboard hardware with this antenna.

View the 2 images of this gallery on the original article

There are a few different mounting options, such as window mounting, railing mounting and surface mounting. The right choice for you will depend on your unique situation. For me, I had an old DirecTV satellite dish installed on my house, so I decided to use the existing stand for it and I went with the railing mounting hardware in the kit.

View the 2 images of this gallery on the original article

After removing the old satellite dish, I mocked up the mounting bracket with the hardware to make sure I had everything I needed before going back up onto the roof.

View the 3 images of this gallery on the original article

Next, I installed the bare mounting bracket onto the existing mounting pole on the roof, leaving the satellite safe on the ground.

A satellite dish roof mount

After I had the new mounting bracket installed and only fastened hand-tight, then I mounted the satellite antenna onto the mounting bracket.

Satellite dish roof mount with antenna

Now that everything is in place and still only hand-tight, the pointing angles all need to be roughly set, these angles will be fine-tuned once it’s powered up. Based on the geographic location example using the Denver Federal Reserve bank, the best pointing angles for the antenna are going to be:

Satellite antenna angles

Elevation: 40.37°

Azimuth: 206.94°

Polarity: 20.39°

Geometry is not my strong suit, but here is my best explanation: This graphic helps illustrate the three-dimensional planes. The vertical XZ plane defines elevation, the flat XY plane defines azimuth and the horizontal YZ plane defines polarity.

Elevation is the vertical degrees of X from Z, with Z being 0.

Satellite antenna elevation

Azimuth is degrees on the XY plane of Y from X, with X being equal to north. With my antenna, I set the main mounting bracket roughly correct and then used the smaller adjustment to fine tune the setting:

View the 2 images of this gallery on the original article

Polarity is the horizontal degrees of Z from Y, with Y being equal to 0.

Satellite antenna polarity

The notches on the mounting hardware will only get you so far. To get as accurate as I could, I used the Satellite Pointer app to provide the angles while my mobile phone was physically placed on the antenna. Since the Satellite Pointer app doesn’t display real-time polarity, I used the Level Tool app on my mobile device for this. Also, to assist with the azimuth reading, I used the Compass app on my mobile device. As each angle was as accurate as I could get it, I would tighten down the hardware with the included flat wrench.

With the antenna installed and the pointer angles roughly set, all that is left for the installation piece is to run the Ethernet cable. About a year ago I ran a new coax cable from this satellite dish to my office in the basement on the other side of the house. Due to stocking levels at Blockstream, Lightning Network payment routing issues on my end and getting busy with other projects, I never did end up ordering the Satellite Kit despite running the cabling for it. I’m glad that I waited though, because the flat panel antenna has a built in LNB and internal satellite signal converter. Running a new Ethernet cable from the new antenna to my office was a worthwhile chore, since I did not want to use the legacy signal and buy an additional piece of hardware to convert it.

If you are not comfortable installing your own cable, then call a licensed professional. Depending on your installation, you may need to terminate your own cables, drill holes in your walls, and crawl inside your attic.

I went to a hardware store and bought 100 feet of outdoor-rated CAT5e Ethernet cable, a box of RJ45 connectors and the crimping tool.

Hardware for Blockstream Satellite antenna installation

Then, you need to decide which standard you want to use for your Ethernet cable. I couldn’t find the standard used for the SelfSat>IP22 antenna but considering it is new, I made a safe assumption that it was the T568B configuration. So long as you terminate both ends of the cable with the same configuration, I don’t think it really matters how the device’s internal configuration is set up. All of the wires are the same color on the inside, after all.

Source

There are some good guides online for making your own Ethernet cables, such as this one. I won’t go into the full details here on how to terminate your Ethernet cables, since there are so many good videos and guides online. But just a few things I do want to point out: Make sure your wire color order is the same on both ends. Make sure the wires go all the way to the end of the RJ45 connector. And make sure there is some of the insulated outer jacket where the pinch point clamps down on the cable in the RJ45 connector.

View the 3 images of this gallery on the original article

Before terminating the end of your Ethernet cable that gets plugged into the antenna, make sure you slip the cord-grip connector over the cable so that once you do have the end terminated, you can still plug it in and tighten down the cord-grip to keep and weather out of the connection.

Cord-grip connector clipped. to Ethernet cable

Next, I used some zip ties to run the cable down along the side of my house and then drilled an inconspicuous hole to pass the cable through to the attic. Then, I crawled inside the attic and ran the cable along the length of the house to the opposite side and then down through the interior wall and then through the floor into the basement where I terminated the other end of the cable in my office. If you are uncomfortable with crawling into confined spaces to do this type of work, then I would recommend contacting a professional installer.

Running cable in the attic

With the cable installed, simply plug it into the Power over Ethernet (PoE) adaptor, making sure that the cable connected to the antenna is in the correct port and that the other port is connected to your Raspberry Pi.

Raspberry Pi OS Image

There are three main steps covered in this section:

  1. Installing a Raspberry Pi Image
  2. Installing the Blockstream Satellite command-line interface (CLI)
  3. Installing the Bitcoin Satellite application, which is a fork of Bitcoin Core with the added capabilities to receive Bitcoin network data from satellites

First, the Raspberry Pi needs an Operating System (OS). To achieve this, the OS image will be downloaded and then flashed to the 32 GB microSD card that came in the CanaKit. Navigate to this website and select the image you want, I recommend downloading the latest available ARM 64 image; you may need to navigate back up the parent directory to get to the latest images. I chose the “2021-05-07-raspios-buster-arm64.zip.” Then, you also want to download the SHA-256 file, as well as the signature file as shown here:

Source

You will also need the Raspberry Pi imager executable file to flash the OS image onto the microSD card. The imager application can be downloaded from here. Unfortunately, I wasn’t able to find any PGP verification tools for the imager executable file.

Source

Save all of the files in the same folder. It is important to verify the software that you can. This is why the SHA-256 file and the signature file were also downloaded in addition to the OS image. I’ll show you how to use a PGP signature and a hash value to cryptographically verify the integrity of the OS image you just downloaded before installing it on your Raspberry Pi. For this, I will be using the Kleopatra key manager.

First, import the Raspberry Pi public PGP key into your key manager and then certify it. The PGP key can be downloaded here:

https://www.raspberrypi.org/raspberrypi_downloads.gpg.key

Then, simply right click on the signature file, select “More GpgEX options” and then select “Verify.”

Verifying Raspberry Pi

The software will run for a moment and it should return a green verified dialog. Now, you know the downloaded .ZIP file is verified with the Raspberry Pi signature.

Green verified dialog

Now, you can run a SHA-256 hashing algorithm on the .ZIP file and compare that to the hash value in the downloaded hash file. I like to use a hex editing program called HxD for calculating hash values. Always be sure to get the latest hash files from the same archive you downloaded the image file.

Comparing hash values

Now that everything is verified, you can delete the SHA-256 hash file and the signature file from that folder, so the only items left are the imager executable file and the .ZIP file. Leave the .ZIP file compressed, the imager executable will take care of decompressing it. Load the microSD card in the USB adaptor and make sure that is available for your computer to communicate with it. Then double click on the imager executable file and the flashing process should start.

The microSD card that comes with the CanaKit already has an image loaded on it. But there is a preference to use the downloaded image in this case. Simply formatting the microSD card is only going to clear out the data in the available disk volume, just to be sure there are no hidden partitions, I’ll do this with the Disk Manager instead. Open the Computer Manager by right clicking on “This PC” from a file explorer. Then navigate to the Disk Manager and then right click on the disk volume in question and select “delete volume.” A warning will pop up indicating that this will delete all the data, select “yes.”

View the 2 images of this gallery on the original article

Next, right click on the unallocated volume and select “start new volume.” Then, follow the prompts in the wizard, leaving all of the default settings as they are. Formatting for FAT32 is fine.

Starting new volume

Navigate back to the folder containing only the .ZIP file and the imager executable, and double click on the executable. Then, follow the prompts to install it and then run it. If everything went according to plan, you should be looking at this screen:

Installing and running Raspberry Pi

Select “Choose OS” then scroll down to “Use Custom” and then navigate to your .ZIP file:

View the 2 images of this gallery on the original article

Select “Choose Storage” and then select your microSD card. Then click on “Write” and select “Yes” to the warning that all data will be erased.

View the 4 images of this gallery on the original article

Then the writing and verification processes will start. This should take approximately ten minutes. When it is finished, you should receive the success notification.

View the 3 images of this gallery on the original article

Once you hit “Continue,” it will eject the microSD card from the computer. However, a blank Secure Shell (SSH) file needs to be written to the root directory of the microSD card so that it can be connected to remotely. Upon reinserting the microSD card, your computer may tell you that the microSD card needs to be reformatted. Do not reformat it, just select “cancel.”

Don’t reformat your microSD card

Using the file explorer, navigate to the root folder on the microSd card, it is probably called “boot.” Then, simply right click in that folder and select “new,” then “text document.” Then, just name it “ssh” without any file extension. You should receive a dialog warning you about changing file extensions, just select “yes.”

View the 2 images of this gallery on the original article

That’s it, you’re done flashing the Raspberry Pi image, you can eject the microSd card. Insert the microSD card into the Raspberry Pi microSD card port, not into the USB port using the adaptor, but on the opposite side of the circuit board from the USB ports, there is a microSD card port. Then, connect an Ethernet cable to your router or switch, and the power cable.

Now you are ready to turn on the Raspberry Pi and next I’ll show you how to remote in via SSH connection and install the Blockstream Satellite command-line interface (CLI) tool.

Do not connect your SSD yet.

Software Compiling

In this step, you will see how to make the SSH connection from your desktop computer to your Raspberry Pi computer. Once this connection is established, you will then build the OS Image, install the Blockstream Satellite CLI, and compile the Bitcoin Satellite application.

I recommend using a simple SSH tool like Putty.exe. Learn more about Putty here and download it here. Verify the download, then run the .MSI file and follow the install wizard prompts.

View the 2 images of this gallery on the original article

Once you run Putty, you will need to enter the IP address of your Raspberry Pi. To find this, log into your home router from a web browser, usually by simply entering 192.168.0.1 in the URL dialog box. Most routers have basic log in credentials like Admin/1234, check online for your brand of router and login instructions.

Once logged into your router, you should be able to locate a list of connected devices on your home network. For example, the connected devices on my home network and their IP address can be viewed from navigating to: “Basic Router” to “DHCP.”

Viewing connected devices

Then in Putty, in the Host Name dialog box, enter your user, which will be “pi” the “@” symbol followed by your RaspberryPi IP local address. For example, all together, mine was: “pi@192.168.0.33” and then select “Open” at the bottom.

Entering host name in Putty

A terminal window will automatically open on your desktop, then you may get a warning about the host key not being registered. Select “Yes” to add this key to your registry.

Adding the key to your registry

Then, you will be asked for the password: “raspberry.”

Putty password request

Then, you should be ready to continue when you see this screen:

Continuing with Putty 

Configuring The SSD

Here is how I configured my SSD. There might be better and/or more efficient ways to do this, but here are the steps I took:

$sudo apt update;

$sudo apt upgrade -y;

A script will run for a few moments and then run the following commands:

$sudo apt install git -y;

$sudo apt install htop -y;

$sudo apt install curl -y;

$sudo apt install bash-completion -y;

$sudo apt install jq -y;

$sudo apt install qrencode -y;

$sudo apt install dphys-swapfile -y;

$sudo apt install hdparm -y;

Now, there are a few things that need to done in order to set up the SSD such as formatting it, mounting it, and setting the permissions:

$sudo dmesg -C;

$sudo dmesg -w;

Now, connect your external drive. Make note of “idVendor” and “idProduct.” For example, “idVendor = 1058” and “idProduct = 0748”

$ctl+c;

$lsblk -o NAME,MOUNTPOINT,UUID,FSTYPE,SIZE,LABEL,MODEL;

Make note of the partition name. For example: “sda” or “sda1.”

Test your external drive’s performance with:

$sudo hdparm -t –direct /dev/XXX;

(Where “XXX” is your partition name).

You should get a result that reads something like: “Timing O_DIRECT disk reads: 902 MB in 3.0 seconds = 300.13 MB/s.”

If your results are less than 50 MB per second (MB/s), then follow the next step with your idvendor and idproduct from above. Otherwise, skip ahead to “$sudo mkfs.ext4…”

First, edit the cmdline text file:

$sudo nano /boot/cmdline.txt;

At the very beginning of the text in the file, insert:

usb-storage.quirks=XXXX:YYYY:u

Where “XXXX” is idVendor and “YYYY” is idProduct. Make sure you leave a single space after the “u” and before the original text.

Save the text file by hitting “control” and “x,” “y” for yes, and then “enter” on your keyboard.

$sudo reboot;

Once you’re all logged back in and back in the shell, re-run the performance test.

$sudo hdparm -t –direct /dev/sda1;

You should have increased performance. If not, get a new external drive and start again.

Format the partition on the external drive.

$sudo mkfs.ext4 /dev/XXX;

Where “XXX” is your partition name, such as “sda.”

In case your external drive was previously mounted, you can use “$ sudo umount /dev/sda” to unmount.

Next, you need the UUID, so run:

$lsblk -o NAME,MOUNTPOINT,UUID,FSTYPE,SIZE,LABEL,MODEL;

Make note of your external drive’s UUID, this should be on the same line as the partition name (sda).

$sudo nano /etc/fstab;

Create a new line below the others that reads the following: where “{tab}” is you hitting the “tab” key on your keyboard.

UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX {tab} /mnt/ext {tab} ext4 {tab} defaults,noatime {tab} 0 {tab} 2

Where the “UUID” is what you copied from above. Hit “control” and “x,” “y” for yes, and then “enter” on your keyboard to save.

$sudo mkdir -p /mnt/ext;

$sudo mount -a;

$df -h /mnt/ext;

It should return something like:

Filesystem Size Used Avail Use% Mounted On

#/dev/sda 916G 77M 870G 1% /mnt/ext

Set the owner:

$sudo chown -R pi:pi /mnt/ext/;

$cd /mnt/ext;

$sudo mkdir -p .bitcoin;

$ls -la;

If “owner” and “group” for the new bitcoin folder are “root” and “root,” then run:

$sudo chown -R pi:pi /mnt/ext/.bitcoin;

$ls -la;

The bitcoin folder should now be owned by pi.

Edit swap file:

$sudo nano /etc/dphys-swapfile;

Scroll down to “CONF_SWAPSIZE=100” and put a (#) hashtag in front of it. Hit “control” and “x,” “y” for yes, and then “enter” on your keyboard to save.

$sudo dphys-swapfile install;

$cd ../..;

Install BlockSat CLI

$sudo apt update;

$sudo pip3 install blocksat-cli;

Install BitcoinSatellite

$blocksat-cli deps install –btc;

$blocksat-cli btc -d /mnt/ext/.bitcoin;

Enter “y” for yes to save the bitcoin.conf file to your bitcoin directory on your SSD.

Configure BlockSat CLI

After that runs for a moment, run the following command and launch the configuration dialog. The terminal will ask you if you want to run the configuration file now, select “y” for yes.

$blocksat-cli sat-ip;

First, you will select the appropriate satellite for your location and then the model of receiver you have. For example, option “0” for Galaxy 18, followed by option “3” for the Base Station receiver.

View the 2 images of this gallery on the original article

Next run this command:

blocksat-cli instructions

Following the instructions, now you can connect the Ethernet cable coming from the satellite to the PoE adapter. Then, plug the other Ethernet port into your router or switch. And then plug the PoE adapter into power. Ensure you have the Ethernet cables connected to the right ports, otherwise you can cause damage to your hardware.

Plugging in your Ethernet cables

When that is connected and powered on, hit “enter” on the terminal window and then you will receive instructions giving you a couple commands you can run once you get back to the main terminal window to complete the configuration.

Now you should be able to run this command:

blocksat-cli sat-ip

And get a return like this:

2021-08-05 04:16:53 Lock = False; Level = -71.67dBm; Signal Quality = 0.0%;

This means that you are ready to run this terminal on your laptop and monitor the values to make the fine tuning alignment adjustments on the satellite receiver.

Dialing In The Antenna Pointing Angles

With your laptop in hand and a connection to your antenna, you can start dialing in the exact angles on your receiver. This is the most time-consuming part of this entire project. Make sure you attempt this when you have plenty of time and are not in a rush. Ensure that you do this on a day when you have a clear, unobstructed view of the sky, preferably with no clouds, smoke or smog in the air.

My basic approach was to loosen the bolts for the azimuth adjustments and then slowly move the antenna side to side ever so slightly, like half a degree at a time. Then, I would wait a few seconds to see if the readings in the terminal window changed to “Lock = True.” If not, then I would move the antenna half of a degree and wait again.

I repeated this process again and again and again. Sweeping from center to one side, then starting back at center and sweeping the other side. When I couldn’t get a locked signal, then I would loosen the elevation adjusting bolts, adjust the elevation angle by half a degree, and lock the elevation adjusting bolts back down. Then, I would start sweeping the azimuth again.

I repeated this process several times over the course of several days. The windows of opportunity to try this were few and far between because of all the wildfire smoke in the air where I lived during this time. My attempts were spread out over several weeks. But finally, during a clear evening around sunset, I got my terminal to print “Lock = True.”

Getting terminal to print “Lock = True”

Once you achieve “Lock = True,” make sure to tighten down all the hardware. The connection should remain locked. Also, keep an eye on the signal quality. If you are not getting 100% quality in clear sky conditions, try adjusting the polarity to dial this in. Be careful not to lose your locked signal.

Running Bitcoin Satellite

With your signal locked, you are now ready to start downloading the Bitcoin blockchain data. You can either use your internet connection to facilitate a quicker Initial Blockchain Download (IBD). Or, if you want to strictly download Bitcoin blocks from the satellite connection and not use any internet connection, you can run bitcoind with the “connect=0” flag. Be aware that if you are doing this for your IBD, this will take approximately 40 days.

You’re going to have three terminal windows open during this part.

1. In the first terminal window you need to have the blocksat-cli running:

$blocksat-cli sat-ip;

“Lock” should “= True” and “Quality” should be as close to 100% as possible.

2. In the second window, you can run Bitcoin Satellite. You want to run this from the directory where you created the /.bitcoin folder on your SSD:

$sudo bitcoind -datadir=/mnt/ext/.bitcoin -connect=0;

In this step you may have encountered an error regarding the maximum receive buffer size. To fix this first check what the buffer size is set to by running:

$sysctl net.core.rmem_max;

If the size is set smaller than 24660008, you can increase it by running:

$ sudo sysctl -w net.core.rmem_max=24660008;

Now, try running this command again:

$sudo bitcoind -datadir=/mnt/ext/.bitcoin -connect=0;

You should see the application start and then it should hesitate on the line ending with “udpread thread start,” like this:

Running the command again

3. Now you can open the third terminal window and run a couple of commands to check if everything is working as expected.

$sudo bitcoin-cli -datadir=/mnt/ext/.bitcoin getudpmulticastinfo;

And then this command…

$sudo bitcoin-cli -datadir=/mnt/ext/.bitcoin getchunkstats;

…should return something like this:

Checking that everything is working

Now you can just let the IBD run. Remember that this will take roughly a month or longer, so check on it often and make sure to address any issues if they happen.

Conclusion

After I get the blockchain synchronized, I plan on setting this up so that my other Bitcoin nodes will continue receiving blockchain data from my satellite node over my local network during an internet outage. But because I’m strictly downloading from satellite signal, this will take roughly a month or longer to get a full sync. That is why I think this is a good stopping point for this guide and I will follow up with shorter guides on useful things you can do with a satellite-connected receiving node.

Having a Bitcoin node configured to receive blockchain data over satellite connection is a censorship-resistant tool that can help mitigate government-enforced internet shutdown like we have been seen in Myanmar recently. Even though the current satellite node configuration only allows for receiving blockchain data and not broadcasting transactions back to the network yet, this can still be a valuable tool to facilitate keeping other internet-connected nodes up to date during times of internet outages, so that when internet communications are back online, valuable time is not wasted syncing.

As this technology continues to develop and get into the hands of those who need it, development of application use cases will grow.

Thanks for reading! I hope that this article helped you get your own Bitcoin Satellite node up and running. Whether you are using a Blockstream satellite kit or sourcing the materials from other places, this is a powerful censorship-resistant tool that helps strengthen the Bitcoin network and helps transfer power from the hands of the few to the hands of the many.

This is a guest post by Econoalchemist. Opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or Bitcoin Magazine.

Source: Bitcoin magazine

Leave a Reply