1

The problem

  • I have a regtest network running in 127.0.0.1:18443.
  • I can access to regtest with user:123.
  • I would like to use Electrum (v4.0.2) with my local regtest but I cannot realize how to do that.

What I tried

When I run:

electrum --regtest

The Electrum console opens as expected but the status is not connected:

enter image description here

My ~/.electrum/regtest contains:

{
    "auto_connect": false,
    "blockchain_preferred_block": {
        "hash": "0f9188f13cb7b2c71f2a335e3a4...........a11466e2206",
        "height": 0
    },
    "check_updates": false,
    "config_version": 3,
    "dont_show_testnet_warning": true,
    "gui_last_wallet": "/home/xxx/.electrum/regtest/wallets/default_wallet",
    "is_maximized": false,
    "oneserver": false,
    "recently_open": [
        "/home/xxx/.electrum/regtest/wallets/default_wallet"
    ],
    "rpcpassword": "123",
    "rpcuser": "user",
    "server": "127.0.0.1:18443:s",
    "show_addresses_tab": true
}

I changed rpcpassword and rpcuser with the user:pass of my local regtest, but I'm still unable to connect Electrum with my local network.

My questions

  • What am I doing wrong?
  • What does the "s" mean in 127.0.0.1:18443:s?
  • What's running in 127.0.0.1:51002?
2
3

Electrum doesn't connect directly to Bitcoin nodes. Instead it connects to Electrum servers using the Electrum protocol. These servers run Bitcoin nodes and additional Electrum server software in order to provide the data that Electrum actually needs to operate. So you need to be running an Electrum server software that connects to your node and then connect Electrum to that Electrum server.

Some Electrum server software:

  • Electrum Personal Server: EPS is designed for use with a single Electrum wallet and is probably the easiest to get an Electrum wallet connected to a full node
  • Bitcoin Wallet Tracker with Electrum plugin: BWT is like EPS but does more stuff and isn't just limited to Electrum
  • ElectrumX: ElectrumX is the official Electrum server software. It is a full fledged Electrum server software that is intended to be used by any connecting Electrum wallet. As such, it indexes the entire blockchain. If you want to do experimentation with the Electrum protocol, you may want to use this.
  • Electrs: Like ElectrumX but written in Rust.
2
  • Hi, Andrew, thanks for the clarification. I'm able to run electrum --testnet and connect to testnet network (receive funds from faucets, send money to other address, etc) without setting up any of the servers you've mentioned. So, why do I need EPS or ElectrumX when running electrum --regtest? Sounds like a wired design hack. – Cartucho Aug 10 '20 at 15:59
  • 1
    @Cartucho Testnet is a public test network. There are people who run Electrum servers on testnet in the same way that people run Electrum servers on mainnet. When you use testnet, you are connecting to those public testnet servers. However regtest is a private testing network. This means you need to setup all of the relevant infrastructure yourself. – Andrew Chow Aug 10 '20 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.