20220929T223939.218804Z | INFO | interface.[localhost:50002] | disconnecting due to: ErrorGettingSSLCertFromServer(ConnectError(ConnectionRefusedError(22, 'The remote computer refused the network connection', None, 1225, None)))
20220929T223939.218804Z | INFO | network | couldn't launch iface localhost:50002:s -- CancelledError()
I can finally connect a Ledger Nano to an Electrum Wallet to a Bitcoin Node via Electrum Personal Server on Windows 11! I wanted to follow up in case this helps other Windows users, especially as current documentation is scarce vs. other OS platforms.
It turns out that Electrum Personal Server was not fully starting, which translated to Electrum logs throwing a cert error from a server that wasn't started to provide it. I found special instructions especially for Bitcoin Core v23 which says to run the following command in the Node under 'Help --> Command Line Options' bitcoin-cli createwallet electrumpersonalserver true true "" false false true" BTW, don't make the mistake of trying to run that command from 'Window --> Console' as it doesn't work there.
I then verified that the electrumpersonalserver wallet was created in Bitcoin Node, which it was. I then closed the other wallet on the Node to avoid conflict. After all of this..... Still no connection from Electrum to EPS. Finally I messed with both the EPS config.ini file and the Node's bitcon.conf. The first time I started EPS, I was finally able to connect Electrum to the Bitcoin Node, and I also finally saw the electrum-watchonly-adresses under Bitcoin Node's 'Windows-->Receiving Addressers'.
Here is the successful connection messages from the EPS command line window in case it helps others know what they are looking for:
INFO:2022-10-03 16:27:52,299: Obtaining bitcoin addresses to monitor . . .
INFO:2022-10-03 16:27:52,299: Importing 1 wallets and 0 watch-only addresses into the Bitcoin node
DEBUG:2022-10-03 16:27:57,301: Importing 0 watch-only address[es] and 1 wallet(s) into label "electrum-watchonly-addresses"
INFO:2022-10-03 16:27:57,333: Importing wallet 1/1
DEBUG:2022-10-03 16:27:58,369: Importing done
INFO:2022-10-03 16:27:58,369: Done.
If recovering a wallet which already has existing transactions, then
run the rescan script. If you're confident that the wallets are new
and empty then there's no need to rescan, just restart this script
INFO:2022-10-03 16:57:11,787: Starting Electrum Personal Server 0.2.4
INFO:2022-10-03 16:57:11,787: Logging to C:\Users\edjan\AppData\Local\Temp/electrumpersonalserver.log
DEBUG:2022-10-03 16:57:11,787: Process ID (PID) = 7612
DEBUG:2022-10-03 16:57:11,787: obtaining auth from rpc_user/pass
DEBUG:2022-10-03 16:57:11,803: Checking whether rescan is in progress
INFO:2022-10-03 16:57:11,818: Displaying first 3 addresses of each master public key:
INFO:2022-10-03 16:57:11,818:
xxxxx =>
bc1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx429
bc1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxrzs9
bc1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx8x5
INFO:2022-10-03 16:57:11,850: Obtaining bitcoin addresses to monitor . . .
NOTE: This is where it would stop before I was able to connect successfully. It also stated 'press any key to continue', which would close the window.
But on this attempt, it continued!
INFO:2022-10-03 16:57:13,857: Obtained list of addresses to monitor in 2.0384793281555176sec
INFO:2022-10-03 16:57:13,857: Building history with 2000 addresses . . .
DEBUG:2022-10-03 16:57:13,872: listtransactions skip=0 len(ret)=0
DEBUG:2022-10-03 16:57:13,888: unconfirmed_txes = defaultdict(
DEBUG:2022-10-03 16:57:13,888: reorganizable_txes = []
DEBUG:2022-10-03 16:57:13,888: last_known_wallet_txid = None
INFO:2022-10-03 16:57:13,888: Found 0 txes. History built in 0.031243562698364258sec
DEBUG:2022-10-03 16:57:13,888: Starting electrum server
DEBUG:2022-10-03 16:57:13,894: using cert: certs/cert.crt, key: certs/cert.key
INFO:2022-10-03 16:57:13,894: Synchronizing mempool . . .
INFO:2022-10-03 16:57:15,456: Found 1632 mempool entries. Synchronized mempool in 1.5626723766326904sec
INFO:2022-10-03 16:57:15,456: Listening for Electrum Wallet on ('127.0.0.1', 50002)
Bitcoin.conf
server=1
daemon=1
listen=1
txindex=1
onlynet=onion
proxy=127.0.0.1:9150
bind=127.0.0.1
wallet=electrumpersonalserver
walletbroadcast=0
rpcuser=username
rpcpassword=password
rpcallowip=127.0.0.1
rpcbind=127.0.0.1
datadir=F:\\Bitcoin
EPS config.ini Configuration
# Electrum Personal Server configuration file
# Lines starting with # are called comments which are ignored.
# For a line to have effect it must not start with #
# The most important options are towards the top of the file
[master-public-keys]
# Add electrum wallet master public keys to this section
# In electrum then go Wallet -> Information to get the mpk
#any_name_works = xpub661MyMwAqRbcFseXCwRdRVkhVuzEiskg4QUp5XpUdNf2uGXvQmnD4zcofZ1MN6Fo8PjqQ5cemJQ 39f7RTwDVVputHMFjPUn8VRp2pJQMgEF
anyname= xpub66xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxzZky
# Multiple master public keys may be added by simply adding another line
#my_second_wallet = xpubanotherkey
[bitcoin-rpc]
host = 127.0.0.1
port = 8332
#add the bitcoin datadir to search for the .cookie file created by the
# node, which avoids the need to configure rpc_user/pass
#leave this option empty to have it look in the default location
datadir = F:\Bitcoin
#if you dont want to use the .cookie method with datadir, uncomment to config u/p here
rpc_user = username
rpc_password = password
#to be used with the multi-wallet feature
# see https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.15.0.md#multi-wallet-support
# empty means default file, for when using a single wallet file
wallet_filename =
# how often in seconds to poll for new transactions when electrum not connected
poll_interval_listening = 30
# how often in seconds to poll for new transactions when electrum is connected
poll_interval_connected = 5
# Parameters for dealing with deterministic wallets
# how many addresses to import first time, should be big because if you import too little you may have to rescan again
initial_import_count = 1000
# number of unused addresses kept at the head of the wallet
gap_limit = 25
[electrum-server]
# 0.0.0.0 to accept connections from any IP
#127.0.0.1 to accept from only localhost
host = 127.0.0.1
port = 50002
# space-separated whitelist of IP addresses
# accepts CIDR notation eg 192.168.0.0/16 or 2a01:4f8:1f1::/120
# star (*) means all are accepted
# generally requires host binding (above) to be 0.0.0.0
ip_whitelist = *
#SSL certificate
#uses the default one, which is fine because by default nobody should be
# allowed to connect to your server or scan your packets
#to generate another certificate see https://github.com/spesmilo/electrum-server/blob/ce1b11d7f5f7a70a3b6cc7ec1d3e552436e54ffe/HOWTO.md#step-8-create-a-self-signed-ssl-cert
certfile = certs/cert.crt
keyfile = certs/cert.key
# Option for disabling the fee histogram calculation
# It improves server responsiveness but stops mempool-based Electrum features
# This is useful on low powered devices at times when the node mempool is large
disable_mempool_fee_histogram = false
# How often in seconds to update the mempool
# this mempool is used to calculate the mempool fee histogram
mempool_update_interval = 60
# Parameter for broadcasting unconfirmed transactions
# Options are:
# * tor-or-own-node (use tor if tor is running locally, otherwise own-node)
# * own-node (broadcast using the connected full node)
# * tor (broadcast to random nodes over tor)
# * system
# with file path as parameter %s)
broadcast_method = tor-or-own-node
# For tor broadcasting (broadcast_method = tor) configure
# the tor proxy host and port below
tor_host = 127.0.0.1
tor_port = 9150
# = Notes on tor broadcasting =
# If using tor broadcasting, make sure you set `walletbroadcast=0` in
# your bitcoin.conf file
# If your full node is connected to the internet only via tor then you dont
# need separate tor broadcasting
[watch-only-addresses]
#Add individual addresses to this section, for example paper wallets
#Dont use this section for adding entire wallets, instead use the
# above section `master-public-keys`
#addr = 1DuqpoeTB9zLvVCXQG53VbMxvMkijk494n
# A space separated list is also accepted
#my_test_addresses = 3Hh7QujVLqz11tiQsnUE5CSL16WEHBmiyR 1PXRLo1FQoZyF1Jhnz4qbG5x8Bo3pFpybz bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq
# multiple addresses may also be added in separate lines (like master public keys above)
#addr2 = 3anotheraddress
[logging]
# Section for configuring the logging output
# The log level. Logging messages less severe than this will not be displayed
#options are 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'
#Information printed to the log file is always at level DEBUG
log_level_stdout = INFO
# Location of log file, leave empty to use the default location in temp dir
log_file_location =
# Whether to append to log file or delete and overwrite on startup
append_log = false
# Format to use for logging messages
#see docs https://docs.python.org/3/library/logging.html#formatter-objects
log_format = %(levelname)s:%(asctime)s: %(message)s