Install
- Download NSSM
- Comment out
#daemon=1
from bitcoin.conf
with comment #incompatible with windows service
- Shut down bitcoin-qt, bitcoind, bitcoin-cli to eliminate any confusion
nssm install BitcoinCore "C:\Program Files\Bitcoin\daemon\bitcoind.exe" -datadir=C:\Documents\Data\Bitcoin
(use your own path of course)
nssm set BitcoinCore DisplayName Bitcoin Core
nssm set BitcoinCore Description Bitcoin node with a JSON-RPC server


Test
- You should be able to see 8333 connections in
netstat
- You will see
bitcoind
in your task list under Details
- If you go to Service(s), it will take you to this service.
- bitcoin-qt still works even in testnet mode
- bitcoin-cli still works even in
-testnet
- Your app still works even in testnet mode
Running mainnet and Testnet both
Repeat the steps for install, but on step 4, use
nssm install BitcoinCoreTestnet "C:\Program Files\Bitcoin\daemon\bitcoind.exe" -testnet=1 -datadir=C:\Documents\Data\Bitcoin
You will then be able to take requests for mainnet on port 8332 and testnet on port 18332