Start with a Bitcoin Cash node on a virtual private server (VPS) you control. Add Fulcrum for wallet history and payment notifications. Add an explorer if you want to inspect your node’s blocks and transactions in a browser.
The examples use Ubuntu Server 24.04 LTS and an operator account with sudo. Substitute your VPS, hostnames, and credentials as you go. Kallisti’s BCH BLAZE 2025 infrastructure workshop · Browse the BCH Ninja configs
Choose a node
| Node | When to choose it |
|---|---|
| BCHN | Use BCHN for wallet and explorer software built for its HTTP JSON-RPC. For block notifications, enable its optional ZeroMQ interface. |
| BCHD | Serve compact filters to Neutrino clients, use Go or gRPC tooling, or run an independent backend for Fulcrum. It provides bchctl, JSON-RPC over TLS by default, and optional gRPC. |
| Knuth | Run an independent validator with UTXO-Z storage or embed node access in your app via C++ or C APIs and language bindings. The RPC interface depends on the build. Knuth 1.8.1’s JSON-RPC requires a block hash to look up a confirmed transaction. Fulcrum’s tested backend list currently omits Knuth. |
System requirements
These VPS sizing tiers assume one unpruned BCH mainnet node with a transaction index and Fulcrum on the same server.
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 2 vCPUs | 4 vCPUs |
| Memory | 8 GB RAM | 16 GB RAM |
| Storage | 500 GB SSD | 1 TB NVMe SSD |
| Network port | 25 Mbps | 100 Mbps or faster |
Use 64-bit Ubuntu Server 24.04 LTS and unmetered transfer for either tier.
Fulcrum hardware and backend requirements
Prepare your VPS
Use SSH keys with an operator account that can use sudo. Verify that a fresh key login works before disabling password and root login. Keep the existing SSH session and the provider’s console available while applying those changes. If your VPS exposes IPv6, apply the same policy there. SSH config · Optional Fail2ban config · Ubuntu OpenSSH guide
sudo apt update
sudo apt upgrade
sudo apt install ufw curl netcat-openbsd
# After installing your SSH drop-in and testing your key
sudo sshd -t
sudo systemctl reload ssh
sudo ufw default deny incoming
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw status verbose
Before enabling UFW, substitute your actual SSH port if it differs from the OpenSSH profile. Use the same rules in any provider firewall. Add a DNS record for each public service. This guide uses electrum.example.com for wallet clients and explorer.example.com for browsers. Point each hostname at the VPS and publish an AAAA record only if that address works.
| TCP port | Who can reach it | Purpose |
|---|---|---|
| 22 by default | Operators | SSH |
| 8333 | Public, if you want inbound peers | Mainnet P2P. The node can sync over outbound connections. |
| 80, 443 | Public when serving HTTPS | Nginx, ACME validation over HTTP, and the explorer |
| 50002, optionally 50004 | Public if you serve remote wallets | Fulcrum’s TLS and secure WebSocket listeners |
| 8332 or 8334, 8433, 50001, 3002 | Loopback in this guide | Node RPC, block notifications, local Electrum TCP, and the explorer backend |
Open each service port when you configure its listener. Never add an inbound public rule for node RPC. Ubuntu firewall guide · Workshop VPS setup
Install a node
Run Bitcoin Cash Node
Choose a BCHN release that supports the active mainnet rules. Download its Linux archive for your VPS architecture and verify it using the release’s signed checksums. From the extracted release directory, install the two executables and create the service user. BCHN downloads · BCHN installation and signature verification
sudo install -m 0755 bin/bitcoind bin/bitcoin-cli /usr/local/bin/
sudo adduser --system --group --no-create-home bitcoind
sudo install -d -o root -g bitcoind -m 0750 /etc/bitcoin
sudo install -o root -g bitcoind -m 0640 /dev/null /etc/bitcoin/bitcoin.conf
sudoedit /etc/bitcoin/bitcoin.conf
On a fresh VPS, put these settings in /etc/bitcoin/bitcoin.conf. The service unit creates /var/lib/bitcoind, keeps the daemon in the foreground, and starts it at boot. Use the published BCH Ninja config as a reference for additional settings.
server=1
txindex=1
prune=0
disablewallet=1
dbcache=2048
rpcbind=127.0.0.1
rpcallowip=127.0.0.1
zmqpubhashblock=tcp://127.0.0.1:8433
txindex=1 makes historical transactions retrievable by ID. An unpruned node retains the blocks Fulcrum needs to build its index. dbcache is in MiB. The ZeroMQ socket gives Fulcrum a local notification when a block arrives. BCHN configuration reference
If you will run Fulcrum or the explorer, generate a separate rpcauth entry per consumer with BCHN’s helper. Use usernames fulcrum and explorer to match this guide. Add the generated rpcauth=... lines to bitcoin.conf and save the corresponding client passwords for the next steps. Local bitcoin-cli commands can use the automatically generated cookie by running as bitcoind. BCHN rpcauth helper
Save the linked unit as /etc/systemd/system/bitcoind.service, then start the node. Add sudo ufw allow 8333/tcp if you want to accept inbound peers. BCH Ninja bitcoind.service · Workshop node configuration
sudo systemctl daemon-reload
sudo systemctl enable --now bitcoind
sudo journalctl -u bitcoind -n 40 --no-pager
sudo -u bitcoind bitcoin-cli -conf=/etc/bitcoin/bitcoin.conf \
-datadir=/var/lib/bitcoind getblockchaininfo
sudo -u bitcoind bitcoin-cli -conf=/etc/bitcoin/bitcoin.conf \
-datadir=/var/lib/bitcoind getindexinfo
During the initial block download, the node may return a warm-up error and the verified block count may trail the headers. Before relying on it, check for chain: main, initialblockdownload: false, a recent tip, and a synced transaction index.
Run BCHD
Download the BCHD Linux release that supports the active BCH rules and verify it using the release’s published integrity information. Install bchd and bchctl from the extracted archive. The example stores configuration, logs, and chain data under /var/lib/bchd. BCHD releases · BCHD sample config
sudo install -m 0755 bchd bchctl /usr/local/bin/
sudo adduser --system --group --home /var/lib/bchd --no-create-home bchd
sudo install -d -o bchd -g bchd -m 0700 /var/lib/bchd/.bchd
sudo install -o bchd -g bchd -m 0600 /dev/null /var/lib/bchd/.bchd/bchd.conf
sudoedit /var/lib/bchd/.bchd/bchd.conf
Set a new RPC password. Keep txindex=1 and leave pruning and fast sync disabled if this node will back Fulcrum. BCHD serves compact filters by default, so leave nocfilters unset for Neutrino. The P2P protocol serves those filters to light wallets. gRPC is a separate interface you can enable with grpclisten when your application needs it. How compact-filter wallet sync works · BCHD gRPC methods
rpclisten=127.0.0.1:8334
rpcuser=operator
rpcpass=REPLACE_WITH_A_UNIQUE_PASSWORD
txindex=1
Save this unit as /etc/systemd/system/bchd.service.
[Unit]
Description=BCHD mainnet node
After=network.target
[Service]
Type=exec
User=bchd
Group=bchd
ExecStart=/usr/local/bin/bchd --configfile=/var/lib/bchd/.bchd/bchd.conf
Restart=on-failure
TimeoutStopSec=5min
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now bchd
sudo journalctl -u bchd -n 40 --no-pager
sudo -H -u bchd bchctl getblockchaininfo
sudo -H -u bchd bchctl getbestblockhash
On first invocation under the bchd account, bchctl can create its client config from the daemon’s RPC credentials. It uses BCHD’s local RPC certificate by default. If you add Fulcrum on the same VPS, set its backend to 127.0.0.1:8334 and use the BCHD RPC credentials. One supported same-host configuration sets notls=1 in BCHD and in any existing bchctl config, leaving Fulcrum’s bitcoind_tls off. Keep that RPC listener on loopback. bchctl source and options · Fulcrum backend TLS settings
Run Knuth
Install the current Knuth 1.x node from its official Conan package. You’ll need a C++23 toolchain if Conan has to build the package for your VPS. On x86-64, check the release’s CPU requirements against the instruction set your VPS exposes. Substitute a published package version for VERSION, without the Git tag’s leading v. Knuth executable quickstart · Knuth releases
sudo apt install python3-venv
python3 -m venv kth-build
. kth-build/bin/activate
python -m pip install conan kthbuild
conan profile detect
conan remote add kth https://packages.kth.cash/api
conan config install https://github.com/k-nuth/ci-utils/raw/master/conan/config2023.zip
conan install --requires=kth/VERSION --build=missing --update \
--deployer=direct_deploy -s compiler.cppstd=23
sudo install -m 0755 direct_deploy/kth/bin/kth /usr/local/bin/kth
sudo adduser --system --group --home /var/lib/kth --no-create-home kth
sudo install -d -o kth -g kth -m 0750 /var/lib/kth
sudo install -o root -g kth -m 0640 /dev/null /etc/kth.cfg
sudoedit /etc/kth.cfg
If your Conan version lays out the package differently, locate bin/kth under direct_deploy. This configuration retains mainnet blocks and runs Knuth in the foreground for systemd. Knuth also offers a full-indexed database mode and pruning. Select storage for the queries your application needs. Knuth configuration example
db.directory = /var/lib/kth/blockchain
db.db_mode = blocks
node.display = log
rpc.enabled = true
rpc.bind = 127.0.0.1
rpc.port = 8332
rpc.user = operator
rpc.password = REPLACE_WITH_A_UNIQUE_PASSWORD
The RPC check below assumes the default JSON-RPC build. Initialize the empty database once before starting the service. Run this node on its own VPS for the example, since it uses the same default mainnet P2P and RPC ports as BCHN.
sudo -H -u kth /usr/local/bin/kth --network mainnet --config /etc/kth.cfg --initchain
Save this unit as /etc/systemd/system/kth.service.
[Unit]
Description=Knuth mainnet node
After=network.target
[Service]
Type=exec
User=kth
Group=kth
WorkingDirectory=/var/lib/kth
ExecStart=/usr/local/bin/kth --network mainnet --config /etc/kth.cfg
Restart=on-failure
TimeoutStopSec=5min
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now kth
sudo journalctl -u kth -n 40 --no-pager
curl --fail-with-body --user operator http://127.0.0.1:8332/ \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"1.0","id":1,"method":"getblockcount","params":[]}'
Enter the RPC password at the prompt. Look for a numeric height in result and compare it with a recent mainnet height. When serving applications, verify the tip hash and read a known confirmed UTXO before treating the node as ready. For embedding, start with Knuth’s native API examples and review the 1.x API changes before upgrading older bindings. Knuth C++ example · Knuth 1.x changes
Add Fulcrum for wallets
Fulcrum reads blocks through your node’s RPC and builds an index keyed by locking script. That gives wallets history, UTXOs, and subscriptions for wallet sync. Pick a current Fulcrum release and verify its downloads. Install Fulcrum from the extracted archive and create a dedicated service account. Fulcrum releases · Workshop Fulcrum walkthrough
sudo install -m 0755 Fulcrum /usr/local/bin/Fulcrum
sudo adduser --system --group --no-create-home fulcrum
sudo install -d -o root -g fulcrum -m 0750 /etc/fulcrum
sudo install -o root -g fulcrum -m 0640 /dev/null /etc/fulcrum/fulcrum.conf
sudoedit /etc/fulcrum/fulcrum.conf
Start with local TCP. Use the credential you created for Fulcrum and the port for your upstream node. The service unit creates /var/lib/fulcrum. BCH Ninja Fulcrum config
datadir = /var/lib/fulcrum
bitcoind = 127.0.0.1:8332
rpcuser = fulcrum
rpcpassword = REPLACE_WITH_THE_FULCRUM_RPC_PASSWORD
tcp = 127.0.0.1:50001
peering = false
announce = false
Save fulcrum.service in /etc/systemd/system/. For BCHD, replace the unit’s Wants= and After= entries with bchd.service and use the RPC settings in the BCHD section. Service ordering starts the node process first. The node and Fulcrum indexes still need time to sync. BCH Ninja fulcrum.service
sudo systemctl daemon-reload
sudo systemctl enable --now fulcrum
sudo journalctl -u fulcrum -n 40 --no-pager
printf '%s\n' '{"id":1,"method":"server.version","params":["vps-check","1.4"]}' \
'{"id":2,"method":"blockchain.headers.subscribe","params":[]}' \
| nc -q 3 -w 5 127.0.0.1 50001
Once Fulcrum serves requests, compare the block hash of its returned header with getblockhash HEIGHT on your node. Double SHA-256 the header bytes and reverse the resulting bytes to get the displayed block hash. Then query a script with known history from your wallet. For a private connection, forward the local Electrum port with ssh -N -L 50001:127.0.0.1:50001 operator@YOUR_VPS and point your wallet at 127.0.0.1:50001.
Publish wallet connections over TLS
Install Nginx and Certbot. Certbot proves you control the hostname by serving a challenge file over HTTP. Enable the HTTP block from the BCH Ninja ACME example with server_name electrum.example.com and the /var/lib/letsencrypt challenge webroot. Enable port 80 and check nginx -t before reload. Leave the HTTPS block out until you have a certificate.
sudo apt install nginx certbot
sudo install -d -m 0755 /var/lib/letsencrypt
# After enabling the HTTP site
sudo nginx -t
sudo systemctl reload nginx
sudo ufw allow 80/tcp
sudo certbot certonly --webroot -w /var/lib/letsencrypt -d electrum.example.com
sudo install -d -o root -g fulcrum -m 0750 /etc/fulcrum/tls
Use a deploy hook to give Fulcrum its own readable certificate files after issuance and renewal. Save the following as /etc/letsencrypt/renewal-hooks/deploy/fulcrum, owned by root and executable. Replace the example hostname with the name shown by sudo certbot certificates.
#!/bin/sh
set -eu
lineage=/etc/letsencrypt/live/electrum.example.com
[ "${RENEWED_LINEAGE:-}" = "$lineage" ] || exit 0
install -o root -g fulcrum -m 0640 "$lineage/fullchain.pem" /etc/fulcrum/tls/fullchain.pem
install -o root -g fulcrum -m 0640 "$lineage/privkey.pem" /etc/fulcrum/tls/privkey.pem
systemctl try-restart fulcrum.service
Run the hook once to install the current certificate, then add the TLS listeners to fulcrum.conf. Certbot deploy hooks
sudo env RENEWED_LINEAGE=/etc/letsencrypt/live/electrum.example.com \
/etc/letsencrypt/renewal-hooks/deploy/fulcrum
sudo certbot renew --dry-run
hostname = electrum.example.com
ssl = 0.0.0.0:50002
wss = 0.0.0.0:50004
cert = /etc/fulcrum/tls/fullchain.pem
key = /etc/fulcrum/tls/privkey.pem
Keep tcp on loopback for local consumers. To serve native Electrum TLS clients, enable ssl and run sudo ufw allow 50002/tcp. For browser clients, enable wss and allow 50004/tcp. These listeners bind IPv4. Add corresponding IPv6 listeners if you publish an AAAA record for Electrum. Restart Fulcrum, then check the TLS hostname and handshake from another machine. For the WebSocket listener, connect with the wallet’s WebSocket client and issue server.version. Workshop certificate setup
openssl s_client -brief -verify_return_error \
-verify_hostname electrum.example.com \
-connect electrum.example.com:50002 < /dev/null
Put a block explorer behind Nginx
BCH RPC Explorer reads blocks and transactions through BCHN’s RPC. For address history, give it the local Fulcrum endpoint as well. Nginx serves the public hostname and forwards requests to the explorer on loopback. Use the upstream install instructions and test the Node.js build on your VPS. BCH RPC Explorer source and install · Workshop explorer recap
- Install the explorer code at
/opt/bch-rpc-explorer. Create a dedicatedexplorerservice account withsudo adduser --system --group --no-create-home explorerand give it read access to the application. Check that the Node.js binary path in the linked unit matches the one you installed. - Put a single
explorer:YOUR_RPC_PASSWORDline in/etc/bch-rpc-explorer/rpc-cookieas a root-owned file with mode0600. Use the password from BCHN’sexplorerentry. The unit uses systemd’sLoadCredentialto pass it to the process. Write the credential without a trailing newline, since the explorer’s cookie reader uses the contents as-is. Keep the explorer’s RPC console disabled. - For address queries, set
BTCEXP_ADDRESS_API=electrumxandBTCEXP_ELECTRUMX_SERVERS=tcp://127.0.0.1:50001in the explorer’s service environment. Save the BCH Ninja explorer unit in/etc/systemd/system/, runsudo systemctl daemon-reloadandsudo systemctl enable --now bch-rpc-explorer, then checkcurl -f http://127.0.0.1:3002/on the VPS. - Adapt the BCH Ninja explorer site config to your hostname and local backend. Use the catch-all config to reject other hostnames. Enable HTTP first and obtain the certificate with Certbot. Open port 443 when HTTPS is ready. The linked HTTPS config expects Certbot’s certificate and includes to exist. Run
sudo nginx -tbefore reloading and check the homepage over public HTTPS. Open a recent block and transaction and compare both with the node.
Keep the VPS running
| Watch | What to check |
|---|---|
| Node and index | Peer count, recent block time, matching BCHN or BCHD and Fulcrum tips, and initial sync progress after reinstalling. |
| Disk and memory | Free space on the data volume, growth in both databases and logs, and swapping during the initial sync. |
| Public endpoints | Resolve DNS and check certificate expiry, HTTPS responses, and a real Electrum protocol query from outside the VPS. |
When a connection fails, start at the upstream process and work outward. Check journalctl -u SERVICE and sudo ss -ltnp, then test from the same host. A refusal from Fulcrum’s upstream usually means the node is down or the port is wrong. An authentication error means the connection reached the node. If loopback works and the public endpoint fails, check both firewalls, DNS, and the certificate. Prometheus scrape and probe config · HTTPS and TCP probes · Journal retention
Before a network upgrade, check your node’s release notes against the activation schedule. After upgrading, verify that the node advances and that each downstream service is on the same tip. Keep the service definitions, configuration, and credentials you would need to recreate the stack. BCH activation specifications
Run the stack on Chipnet
Use a separate public test deployment to exercise wallet connections and broadcasts without using mainnet funds. Assign separate data directories, units, hostnames, and ports. On BCHN, set chipnet=1 at the top level and put network-specific binds in [chipnet]. BCHN’s Chipnet defaults are 48333 for P2P and 48332 for RPC. Point Chipnet Fulcrum at that RPC port. BCHD uses its own ChainParams and ports, and Knuth selects the network with --network chipnet. Check the active listeners before connecting clients.
If Fulcrum fails to connect after you switch its backend to Chipnet, check whether it still points at mainnet’s RPC port 8332. Verify the chain and port on the node, then check the index tip from a wallet using the Chipnet endpoint. Workshop Chipnet troubleshooting · BCHN test networks · BCH Ninja Chipnet faucet