This service provides a convenient way to monitor and manage a Bitcoin node daemon on a Windows system. It ensures that the Bitcoin daemon (bitcoind
) is running and provides RPC authentication credentials for secure communication.
Starting bitcoind for the first time takes ages to complete the initial block download. A little-known bottleneck on Windows is that writing to the Console is a blocking operation. The synchronization process is slowed down significantly by writing to it. Launching bitcoind manually, explicitly without a window speeds up the process significantly. From there, I had the itch to wrap it into a service that could start automatically, and even run unattended.
- Automatic start of the Bitcoin node daemon (
bitcoind
) as a Windows service. - Generation of RPC authentication credentials for secure communication with the Bitcoin node.
- Support for custom arguments passed to
bitcoind
andbitcoin-cli
.
- bitcoind and bitcoin-cli. Both are provided by installing bitcoin core
- If you plan on using the unattended startup, install bitcoin core and this application to a location that is not within a User directory, specifically, it needs to be accessible to NT AUTHORITY\NetworkService. This is an identity with minimal privilege, one step above Local Service, so that it can access the network.
- This documentation only covers the wrapper service. bitcoind requires additional configuration. Please reference bitcoin.org for complete documentation of bitcoind.
- Any command line arguments you would need to pass to either bitcoind or bitcoin-cli can be instead placed in appsettings.json.
-
Download the latest release from the Releases page.
-
Extract the contents of the downloaded ZIP archive to a desired location. (You may not change this location after the service is installed!)
-
Right-Click
install.bat
and select Run as Administrator to install the Bitcoin Node Daemon service. The install script is interactive and will prompt you to generate RPC credentials if desired. It will also offer to start the service for the first time.install.bat
Before starting the service, ensure that the appsettings.json
file is updated correctly for your system. The most important properties to configure are:
BitcoinD.BinPath
: The file path to thebitcoind
executable.BitcoinD.StartArgs[]
: An array of arguments to pass to thebitcoind
executable.BitcoinCli.BinPath
: The file path to thebitcoin-cli
executable.BitcoinCli.StartArgs[]
: An array of arguments to pass to thebitcoin-cli
executable.
Each argument is passed literally to the executables, so any arguments they support are also supported by this service.
To uninstall the Bitcoin Node Daemon service, Right-Click uninstall.bat
and select Run as Administrator:
uninstall.bat
- If the service does not start after installation, verify that the
appsettings.json
file is correctly configured with the correct paths and arguments forbitcoind
andbitcoin-cli
. - Ensure that the service is installed and run with Administrator privileges.