Previous: How Bitcoin Works
In the previous chapter, we saw exactly what a node does and how it is vital to the network, perhaps more vital than the miners. In the early days of Bitcoin, running a node and mining was the same bit of software but as mining has become more competitive, miners tend to run the mining part of the node as a separate entity, on dedicated hardware. Node operators on the other hand can run a node on just about any consumer hardware. Anything from a $100 Raspberry Pi to a regular desktop or laptop will do. Whether you’re on Mac, PC, or Linux, you can run a node. I don’t believe there can ever be too many node operators. The more there are the more unfriendly governments and corporations will realise they can’t beat Bitcoin. Furthermore, running a node also allows you to send more private transactions because the interaction with a wallet will be on your personal hardware. You can run a node on a VPN, you can take a node offline, transact with it and then switch it back on again and let it sync with the blockchain and submit the offline transaction. The actual privacy strategies available are easy to search for on the web and simple to implement once you run your own node.
Don’t get thrown in Jail
Many node operators run nodes regardless of what their governments allow. I admire such people immensely but obviously, I do not encourage anyone to break the law. There are enough people who can run nodes legally that there is no need for anyone to martyr themselves. It is therefore important to do some research into whether it is legal for you to participate. You can begin your research here: https://en.wikipedia.org/wiki/Legality_of_cryptocurrency_by_country_or_territory.
For example, Algeria, Morocco, Egypt, Bolivia, Afghanistan, Bangladesh, and Nepal have all criminalized running a node and virtually all Bitcoin activities. I believe these are amongst the countries that need Bitcoin the most. But even the current US administration seems to be turning against crypto although they still seem a long way from an outright ban. The list of banned nations I have given is not comprehensive and there is much nuance from territory to territory. Consider that the Wikipedia list might be out of date or wrong and check for the facts in your jurisdiction.
There are a few ways we can tackle running a node. Some other way to consider before you dive into this tutorial is to use a custom software stack. There are several providers of such software and easily discoverable with a web search and they all offer varying packages from free to premium, designed for PC, Mac, and Raspberry Pi. They can offer multiple different apps like retail transactions, Lightning integration, and more. What we will do is install the bog-standard Bitcoin node, like the one Satoshi mined the first block on back in 2009. Of course, nodes no longer mine but they are responsible for verifying every transaction submitted to the network and every transaction and the format of every block the lucky winning miner produces every ten minutes.
System requirements to run a Bitcoin node
To run a node, you will need the following system requirements: Windows: Windows 7, 8, or 10. I would guess it will run fine on 11 also but I have not tested it.
Network: An unmetered connection. Don’t do this tutorial if you have download or upload limits imposed by your Internet service provider. With regards to network bandwidth, it is surprisingly low. The initial download will be 400 GB while your node syncs to the blockchain and then 20GB download per month and 200-300 GB upload per month if you enable outbound connections. This amounts to upload transfer rates of 400-600 kilobits per second. The cheapest full fiber package I could find in the UK was 20 Mega (million) bits per second. This is around 40x the required amount. If you are on an older infrastructure somewhere, it will probably still be fine, my blockchain synchronization took forever as it is not the download speed of the Internet Service Provider that is likely to be the bottleneck but the limits other nodes put on you to synchronize you. You will probably need to be patient and allow anywhere from a few days to a few weeks to sync the blockchain even if you are on a fast connection. If your upload speed is sufficient, your download speed will also be easily sufficient. Bitcoin nodes, after initial setup, require 10x the upload bandwidth compared to the download bandwidth. Most (probably all) retail Internet connections have much faster download than upload.
CPU: Almost any will do, remember, nodes could run on a Raspberry Pi. If your PC is running smoothly for your day-to-day use, then running a node probably won’t make any difference.
Memory: 2GB RAM
Hard disk space: Between 10 GB and 400 GB. If you want to be a fully active node and stored the complete history of the blockchain allow around 400 GB of storage space. If you don’t have 400GB to spare you can still help the network by verifying every block and every transaction as well as relaying transactions to other nodes with only 10 GB. The reason it is still quite a lot of storage is that you still must store the most recent blocks.
This tutorial will be for Windows PCs but if you are comfortable using Linux or Mac you can probably interpret these instructions.
Installing Bitcoin Core
Go to the download page here: https://bitcoin.org/en/download or if you are in the UK you can get the download from here: https://bitcoincore.org/en/download/. It is quite interesting that the owner of bitcoin.org won’t allow visitors from the UK to download the node software. This is because a 2021 court case involving Craig Wright, the self-proclaimed Satoshi Nakamoto, ruled in favor of Wright and stated that the Bitcoin white paper and software were his intellectual property. Most view Wright as Fake Satoshi.
- Download the file for your system.
Included in the Bitcoin blockchain are several virus signatures. Antivirus software works by matching digital patterns. When a new virus is discovered, its digital pattern is documented and added to a database that all reputable Antivirus software companies use or replicate. The patterns in this database are used to compare with the contents of your hard drive or your downloads. As the data in the blockchain contains patterns recognized as viruses it is likely that your software will warn you a virus has been detected. Note it is the pattern of a virus, not executable software. But it is important that you trust the source of the download or you should not proceed.
- Run the downloaded file and you will see the Welcome to Bitcoin Core… screen.
Welcome to Bitcoin Core
- Read the information and shut down other applications and click Next. You will then see the Choose Install Location screen.
Choose install location
- Browse to a hard disk and folder to install. Note that this is a different choice from choosing where and how much of the blockchain you want to install. That choice comes shortly. I am installing my node in D:/Bitcoin because I have plenty of storage space there. When you have chosen the location click Next.
- On the next screen click Install. Bitcoin Core will now install. When prompted, click Next. Be sure Run Bitcoin Core… is selected as shown next.
Run Bitcoin Core
- Click Finish to run the node.
This next screen, shown in the following image is important.
Bitcoin node configuration
- First, be sure to select the hard drive with spare space. If this is not the same as the default directory, you will need to select Use a custom data directory: and then browse to your preferred location. I browsed my D drive and created a new folder called Blockchain. Furthermore, you can select the Limit blockchain storage to selection box and specify an amount of storage space that is acceptable to you. At the time of writing, 496GB was necessary to store the entire blockchain since 2009. Be sure to think through the best options for you. I chose to download the entire blockchain as shown next. You are still helping the network significantly if you only download a part of the blockchain. Even if your node is only running for part of the day, you are still participating. Obviously, running the full blockchain 24/7 is the most beneficial.
Downloading the full blockchain
Next, you will get a Windows Defender (or other firewall warning).
Windows defender warning
- If you trust the software and the source of the download, click Allow access. To be clear this is a firewall warning regarding allowing network access. It is possible you will also get an antivirus warning while downloading the blockchain. Otherwise, click Cancel. Bitcoin Core is now running as shown in the next image.
Bitcoin Core is running
As you can see in the preceding image my copy of the blockchain is out of date by 14 years and 4 weeks. It will take some time to update.
You can watch the progress of your download by selecting Window | Information from the main menu. Here you can see the following information.
Node information window
I started my synchronization at 11:32 on 27th March 2023. As of 9:27 on 20th April 2023, it is at 97.54% and my node should be ready by the weekend.
Bitcoin takes a while to synchronize
Finally, on the morning of the 22nd of April, I awoke to a fully synchronized blockchain.
Using Bitcoin Core
My node is now verifying the latest blocks in real time. At this point you are done; you are helping to secure the blockchain. If your experience is anything like mine, you will not see any reduced performance either from the hardware itself or the network. There are, however, some minor configurations and tuning that you can do if you like.
I set Bitcoin Core to close to the system tray instead of the taskbar, so it was out of sight and mind while I was working on other things. You can do this by selecting Settings | Window and checking the Minimize to the tray instead of the taskbar checkbox.
I also set Bitcoin Core to start when I turn my PC on and Windows boots up. I leave my PC on 24/7 but occasionally it will need to restart for an update, or it may crash and it is convenient not to have to remember to restart my node. You can do this in Settings | Main and then check the Start Bitcoin Core on system login checkbox.
The other main setting to consider is whether you allow other nodes to use your node to synchronize the blockchain and also allow wallets to use your node to send transactions. The default setting is that you do both of these things, but you might need to configure your network hub/router to allow Bitcoin Core to connect on port 8333. First, you can test if this port is already open by visiting https://bitnodes.io/#join-the-network. Find the CHECK NODE button and click it. This is what it looked like when I did this test.
Port 8333 is blocked
My result came back red meaning the hub provided by my service provider was blocking port 8333. You are still validating transactions and are a valuable part of the network but if you want to be as useful as possible you will need to log into your hub to fix this. There are so many different hubs that I will leave you to Google for yours but the basic steps I followed were as follows:
Log into your hub via a web browser. Mine was at the local IP address 192.168.1.254
Select Advanced | Firewall | Port forwarding. At this point, you will probably need a password, often from the back of your hub.
Configure port 8333 to go to the device running your node. My settings screen looked like this when I was done.
Port config for node
The last thing to consider is using the wallet feature of the node. First things first; a node is a hot wallet. It can be hacked, and it doesn’t even have a PIN to protect it if your PC is stolen so don’t store large amounts of funds on there. Treat it like a wallet with the cash you would carry around the streets. However, there is an interesting use case for your node. If you use your node wallet it does not need to connect to another node to get blockchain data. Your transactions are obviously still on the blockchain, and your transactions still need to be verified by every node to be added to the blockchain but that extra step of transmitting your transaction and revealing the IP address of the wallet is obfuscated. As all the other nodes will know, some wallet or other contacted a node somewhere on the network and now they are validating the transaction. But the IP of the wallet is unrecorded – apart from on your node.
Furthermore, you can also connect some other Bitcoin wallets directly to your own node for the same advantage. You will need an advanced wallet like Sparrow wallet which perhaps I will cover in a later edition of the book.
- To get started download the Sparrow wallet
- Create a wallet and record the seed phrase
- Select File | Preferences | Server | Edit existing connection | Bitcoin Core.
This works when Sparrow is running on the same PC otherwise more advanced options are required.
Congratulations! You are now contributing to the security and availability of Bitcoin, and you have a small layer of extra privacy if you connect to or use your own node for transactions.
Previous: How Bitcoin Works