If one wants to have an
Electrum server, one of the options is
Fulcrum.
I already have an Electrum server (Electrs), which I use and for which
I've made a more complete tutorial in the past, but at some point I've made tests with Fulcrum too and it would be a shame to remove it without providing a tutorial for the others who want it.
So... one major advantage of Fulcrum comes on Windows: the user can just get compiled binaries for Bitcoin Core, Fulcrum and Electrum, configure and run them all, without the need of stepping into Windows Subsystem for Linux (WSL). Another good thing is it's performance: it's processing the requests significantly faster than Electrs. Just in my experience (HDD, infrequent use for rather short tasks) Fulcrum gets in the state I can access it significantly slower than Electrs.
But, tbh, I don't like Fulcrum as much as the other option I have (Electrs)
* Fulcrum is made by somebody with BCH ties and it may be much better optimized for BCH (to say the least)
* As I said, Fulcrum starts/syncs slower than Electrs and that's not OK for my use case
Something more about this tutorial. This is made for a Fulcrum as I use it: me, for myself. No discussions with other servers, not announcing my server, also no SSL. I've kept it simple. If one wants to expand the tutorial with that, be my guest.
Since an Electrum server works on top of a Bitcoin Core node, I'll handle Bitcoin Core first, but shortly.
Bitcoin Core is with pretty much the same
as in my other tutorial, but with some tiny bit of change in config:
* already in that topic,
later on, I've switched for use with rpc user and password instead of cookie. If you want to keep using cookie, that's fine too, just pay attention to the config files (both of them)
* Bitcoin core's config needs one more line: zmqpubhashblock=tcp://127.0.0.1:8433
So, I will not insist with Bitcoin Core, it's in the other tutorial, I'll just put here my config:
txindex=1
server=1
rpcbind=127.0.0.1
rpcallow=127.0.0.1
rpcallowip=127.0.0.1
rpcuser=UsErNaMe
rpcpassword=PaSsWoRd
zmqpubhashblock=tcp://127.0.0.1:8433
Fulcrum (
https://github.com/cculianu/Fulcrum)
You download Fulcrum from
https://github.com/cculianu/Fulcrum/releases ; you will get something like Fulcrum-1.9.0-win64.zip
It would be nice to verify your download, which is done with the correcponding *.asc file, like for Electrum.
Unpack the zip into a new folder, maybe FulcrumBinaries. We won't touch that folder from now on.
Now we create a file called Fulcrum.conf with the content:
datadir = x:\FulcrumData_MainNet
bitcoind = 127.0.0.1:8332
rpcuser = UsErNaMe
rpcpassword = PaSsWoRd
tcp = 127.0.0.1:50001
peering = false
announce = false
public_tcp_port = 50001
admin = 8000
stats = 8080
db_max_open_files = 80
fast-sync = 8000
Some details:
* The username and password has to match with the one from Bitcoin
* x:\FulcrumData_MainNet is a folder you create, preferably somewhere fast (SSD), since this is where Fulcrum will keep its data; mine has now ~113 GB, but it may be safe to have some more space there, especially at start
* that fast-sync line should be commented (put a # in front of it) after the initial sync finishes
* the server is set to not discuss with other servers, not announce itself for other clients and so on; also no SSL
I've made a batch file for start and one for stop, but this stop works only after the sync is done. Else you better press the good old CRTL-C.
The content of the batch file is not very useful as it is, maybe as example, because it contains the path to the exe and, as parameter, the path to the config.
In my case it's:
"x:\Fulcrum\FulcrumBinaries\Fulcrum.exe" x:\Fulcrum\Fulcrum.conf
Same goes for the stop.
"x:\Fulcrum\FulcrumBinaries\FulcrumAdmin" -p 8000 stop
After starting Fulcrum (start.bat) it might take an awful lot of time until everything is sync-ed. You may want to look for lines like:
[2023-02-27 21:42:48.964] Starting listener service for TcpSrv 127.0.0.1:50001 ...
[2023-02-27 21:42:48.965] Service started, listening for connections on 127.0.0.1:50001
or
[2023-02-27 22:03:32.758] Block height 778553, up-to-date
Then you can start Electrum. As
I wrote in the other tutorial I'm lazy and I'm using the portable Electrum. For me the command line is:
electrum-4.3.4-portable.exe --oneserver --server 127.0.0.1:50001:t