Get started with Bitnode Studio

Fulcrum Server

This chapter describes how to configure and run Fulcrum, a fast and nimble Electrum SPV (Simple Payment Verification) server for Bitcoin.

Getting started with Bitcoin Core

Fulcrum Installation.


Fulcrum is already pre-installed on Bitnode Studio in the Windows Local AppData folder. This Fulcrum directory contains the binary and docs files:

..\Bitnode\AppData\Local\Fulcrum

Fulcrum is set up to store its Mainnet database on the internal SSD storage (D drive) in the following folder:

D:\Fulcrum\mainnet

Setting Up Fulcrum.


Firstly, note that Fulcrum requires a Bitcoin Core full node (bitcoind instance), preferably running on the same machine, either on testnet or mainnet (or regtest for testing), which you must tell it about via the CLI options or via the config file.

Also, the Bitcoin node must have its JSON-RPC service enabled, and txindex enabled (txindex=1), and not be a pruning node. For best results, enable zmq for the "hasblock" topic using e.g. zmqpubhashblock=tcp://0.0.0.0:8433 in your bitcoin.conf file.

To set up your Fulcrum server, you have to edit the configuration file (fulcrum.conf) located in this folder:

D:\Fulcrum\fulcrum.conf

This configuration file is a plain text file consisting of option=value entries, one per line, plus optional comments starting with the '#' character. To edit it, you can use the pre-installed Notepad++ application, a free source code editor.

The Fulcrum configuration file (fulcrum.conf) should point to your bitcoind JSON-RPC server, specify database directory, listening ports, etc.

Fulcrum configuration file fulcrum.conf

Bitnode Studio comes with a configuration file for Fulcrum as follows:

   

     # Fulcrum configuration file.

     # Database directory.
     datadir = D:\Fulcrum\mainnet

     # Bitcoin daemon 'bitcoind' RPC host:port
     bitcoind = 127.0.0.1:8332

     # Bitcoin daemon RPC cookie file location.
     rpccookie = D:\Bitcoin\.cookie

     # TCP bind interface:port
     tcp = 0.0.0.0:50001

     # Peer discovery.
     peering = false

     # Peering: announce self.
     announce = false

     # Admin RPC bind.
     admin = 127.0.0.1:8000

     # Donation Bitcoin Cash address.
     donation = bitcoincash:qplw0d304x9fshz420lkvys2jxup38m9symky6k028

     # Server banner text file.
     banner = D:\Fulcrum\banner.txt

     # Max RocksDB open files.
     db_max_open_files = 40

For more information on configuration options, please see this fully documented example configuration file from the docs directory of the Fulcrum source tree:

..\Fulcrum\docs\fulcrum-example-config.conf

Running Fulcrum.


Fulcrum does not have a GUI (Graphical User Interface), but you have to interact with through a CLI (Command Line Interface) by typing text-based commands. For this, you can use Windows Terminal, a modern host application for command-line shells, including PowerShell by default, Command Prompt, and bash (via Windows Subsystem for Linux).

To launch Windows Terminal, click on the Start menu, Windows taskbar or desktop shortcut. This will open a new PowerShell tab where you can type the commands to run.

Firstly, verify that Fulcrum works on your system by executing the binaries with help argument (-h) to see all the command line options:

> Fulcrum -h

Fulcrum -h

> FulcrumAdmin -h

FulcrumAdmin -h

Now, you can launch the Fulcrum server. Note that before starting Fulcrum, you should ensure that your Bitcoin Core node is running and fully synchronized with the Bitcoin network.

Then, start Fulcrum in Windows PowerShell by typing the below command with the configuration file path as an argument:

> Fulcrum D:\Fulcrum\fulcrum.conf

Fulcrum Start

Fulcrum will now connect to your Bitcoin Core node and create a full database index of all Bitcoin transactions, which Bitcoin Core itself does not do. This synchronization process may take several days, as the current size of the Fulcrum database is close to 130 GB.

As long as the Fulcrum server is still synchronizing, all public-facing ports will not yet be bound for listening and as such an attempt to connect to one of the RPC ports will fail with a socket error such as e.g. "Connection refused".

Please do not stop or shutdown this process until the database creation is complete, as the data files may become corrupted. If the database is in an inconsistent state, to recover it you will need to delete the data directory and perform a full re-sync.

Once Fulcrum finishes synching, it will behave like a private Electrum server. Then it can be connected and receive requests from your Bitcoin wallets, such as Electrum and Sparrow Wallet.

To stop down the Fulcrum server, open a new PowerShell tab and type the following command:

> FulcrumAdmin -p 8000 stop

Please note that it is recommended to make an external backup of the Fulcrum database once in a while, so you won’t have to re-sync it from scratch if any file becomes corrupted. For this, stop the Fulcrum server first, and backup the data files from this folder:

D:\Fulcrum\mainnet

Fulcrum Data Directory

For more information on running Fulcrum, please see the official Fulcrum repository on GitHub.

Upgrading Fulcrum.


It is recommended to upgrade Fulcrum to the latest release whenever it becomes available. If you miss a release, you should upgrade directly to the latest version.

Before upgrading, you need to shut down the Fulcrum server first. Then, download and install the new binaries from the Fulcrum release page on GitHub.

Choose the latest zip package for use on Windows 64bit, and extract the binary files into the Fulcrum bin folder, overwriting the previous binaries.

..\Fulcrum\bin\Fulcrum.exe
..\Fulcrum\bin\FulcrumAdmin.exe

You can now start Fulcrum as usual, and verify that you are using the correct version with the following command:

> Fulcrum -v


◁  Lightning Terminal   |   Get Started  ▷

Back to Get Started