Here are the steps required to run electrumX for BitcoinGold wallet ElectrumG. Replace the variables according to your setup.
- $username is the username under which electrumX will run
-
$rpcuser$ and $rpcpass are form the conf of bitcoindgold.conf
Make sure you have at least 30G ~ 40G free space on your device, and you have enabled txindex=1 in bitcoingold.conf
Assume that you have clone the electrumX source code to your local machine. BitcoinGold can run with the latest electrumX
sudo apt-get install python3-setuptools python3-multidict python3.7 python3.7-dev libleveldb-dev
cd electrumX
sudo python3 setup.py install
Both python3.7x and python3.8x can work
sudo cp contrib/systemd/electrumx.service /etc/systemd/system/
sudo nano /etc/systemd/system/electrumx.serviceFill the following contents into the file:
[Unit]
Description=Electrumx
After=network.target
[Service]
EnvironmentFile=/etc/electrumx.conf
ExecStart=<your electrumX code root>/electrumx_server
User=<username>
LimitNOFILE=8192
TimeoutStopSec=30min
[Install]
WantedBy=multi-user.targetCreate electrumX data folder. Here we create /mnt/blockstorage/electrumx-data on our machine
Create service config file
nano /etc/electrumx.confFill the following contents into the file:
COIN = BitcoinGold
DB_DIRECTORY = /mnt/blockstorage/electrumx-data
DAEMON_URL = http://<rpcuser>:<rpcpass>@<daemon url>:8332/
SERVICES = tcp://:50001,ssl://:50002,wss://:50004,rpc://0.0.0.0:8000
SSL_CERTFILE = /mnt/blockstorage/electrumx-data/electrumx.crt
SSL_KEYFILE = /mnt/blockstorage/electrumx-data/electrumx.key
EVENT_LOOP_POLICY = uvloop
PEER_DISCOVERY = self
INITIAL_CONCURRENT = 50
COST_SOFT_LIMIT = 10000
COST_HARD_LIMIT = 100000
BANDWIDTH_UNIT_COST = 10000
ALLOW_ROOT = 1Put your own ssl cert files into electrumX data directory, now you can run electrumX with command
sudo systemctl start electrumx.serviceAnd check electrumX log info with command
journalctl -f | grep electrumx_server