Author

Topic: Cannot connect wallet to my own ElectrumX server (Read 148 times)

member
Activity: 86
Merit: 28
I was inspecting the electrum wallet code:

Code:
help="set server host:port:protocol, where protocol is either t (tcp) or s (ssl)")
Source: https://github.com/spesmilo/electrum/blob/bb2e4109422dc46652bc6579bcfc8149e3c86758/electrum/commands.py

There is no option to create a WSS connection, only TCP and SSL (through tor). Then i presume it is the correct configuration.
legendary
Activity: 1932
Merit: 1273
it works also with ssl connection, i configured already SSl certificates, with the command:
~
at least not plain text
Yup that's good Wink

That should explain why the OP configurations doesn't work. I thought the wss:// electrum server protocol can be used with Electrum wallet tcp/tls config.
member
Activity: 86
Merit: 28
it works also with ssl connection, i configured already SSl certificates, with the command:
Code:
./electrum-4.1.5-x86_64.AppImage -1 -s y32svarehxecrpvg62upqq7lgqhcrr3m35y4cqogy4nubsic2y3fofyd.onion:50002:s -p socks5:localhost:9050

at least not plain text
legendary
Activity: 1932
Merit: 1273
Yes but you are connecting over an unencrypted network.

The reason why I suggest using :s instead of :t[1] is to make the Electrum wallet make an SSL/TCP connection as OP ElectrumX configuration(wss://:50001)[2].

If you are following the Reddit thread, with
Code:
SERVICES = tcp://127.0.0.1:50001,ssl://127.0.0.1:50002,rpc://127.0.0.1:8000
REPORT_SERVICES = tcp://xxxxxxxx.onion:50001,ssl://xxxxxxxx.onion:50002
Code:
./electrum-4.1.5-x86_64.AppImage -1 -s y32svarehxecrpvg62upqq7lgqhcrr3m35y4cqogy4nubsic2y3fofyd.onion:50001:t -p socks5:localhost:9050
Then it is should work, but you are transferring data over an unencrypted protocol, which surely not the recommended way.

[1] https://electrum.readthedocs.io/en/latest/protocol.html?highlight=tcp#server-peers-subscribe
[2] https://electrumx.readthedocs.io/en/latest/environment.html#services

the connection must be throught TCP, not explicitly TOR.
The connection is using TCP over Tor.

I still investigating if use TCP+SSL instead TOR have implications in privacy, but works.
Other than the two references above, try to see https://electrumx.readthedocs.io/en/latest/HOWTO.html#creating-a-self-signed-ssl-certificate
member
Activity: 86
Merit: 28
Found the solution, following the reddit post:
https://www.reddit.com/r/Electrum/comments/ggmduo/electrumx_over_tor_configuration_help/
but with a slight difference in the command:

Code:
./electrum-4.1.5-x86_64.AppImage -1 -s y32svarehxecrpvg62upqq7lgqhcrr3m35y4cqogy4nubsic2y3fofyd.onion:50001:t -p socks5:localhost:9050
the connection must be throught TCP, not explicitly TOR.

I still investigating if use TCP+SSL instead TOR have implications in privacy, but works.

thanks for all help
legendary
Activity: 1932
Merit: 1273
Add -v when you execute the command, the log will be outputted into the CLI.

Code:
$./electrum-4.1.5-x86_64.AppImage -v -1 -s y32svarehxecrpvg62upqq7lgqhcrr3m35y4cqogy4nubsic2y3fofyd.onion:50001:s -p socks5:localhost:9050

Code:
Apr 22 01:14:27 electrumx_server[5086]: INFO:PeerManager:detected SOCKS5 proxy at 127.0.0.1:9050, auth: none
Possible missing user and password.
I believe there isn't any something wrong about that.
member
Activity: 86
Merit: 28
Using your default config, try to connect using this:

Code:
$./electrum-4.1.5-x86_64.AppImage -1 -s y32svarehxecrpvg62upqq7lgqhcrr3m35y4cqogy4nubsic2y3fofyd.onion:50001:s -p socks5:localhost:9050

If that doesn't work, try to post your Electrum and Electrum server logs.

the ElectrumX log:

Code:
.
.
.
Apr 22 01:14:26 electrumx_server[5086]: INFO:PeerManager:accepted new peer vps5.hsmiths.com from coins.py
Apr 22 01:14:26 electrumx_server[5086]: INFO:PeerManager:accepted new peer electrum.emzy.de from coins.py
Apr 22 01:14:27 electrumx_server[5086]: INFO:PeerManager:detected SOCKS5 proxy at 127.0.0.1:9050, auth: none
Apr 22 01:14:37 electrumx_server[5086]: INFO:PeerManager:blacklist from https://electrum.org/blacklist.json has 689 entries

the electrum wallet prints nothing, neither i found logs.

Possible missing user and password.
legendary
Activity: 1932
Merit: 1273
Using your default config, try to connect using this:

Code:
$./electrum-4.1.5-x86_64.AppImage -1 -s y32svarehxecrpvg62upqq7lgqhcrr3m35y4cqogy4nubsic2y3fofyd.onion:50001:s -p socks5:localhost:9050

If that doesn't work, try to post your Electrum and Electrum server logs.
member
Activity: 86
Merit: 28
Can you try to change your Daemon URL into localhost instead and edit the services replace them with the configuration below?


Also, try to change Peer_discovery on or off and check if your server will show up automatically in "electrumx_rpc peers".

With this configuration i lost the RPC connection, adding
Code:
SERVICES = tcp://0.0.0.0:50001,rpc://
i can run "electrumx_rpc peers" wich shows a list of peer only if  PEER_DISCOVERY = on.

Check this Reddit post below to get some idea about configuration.
- https://www.reddit.com/r/Electrum/comments/ggmduo/electrumx_over_tor_configuration_help/
I've tried this already, not worked, i believe is outdated, old electrum version.

I search more and it seems it's not easy to set up ElectrumX through TOR I have never seen someone succeed or share a guide on how they succeed in configuring their ElectrumX with TOR.
Run the server through ssh tunnel is a half solution already.

Unfortunately the suggested conf file not worked, the same behavior trying to connect be through ssh tunnel or TOR.
legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
Can you try to change your Daemon URL into localhost instead and edit the services replace them with the configuration below?

Code:
DB_DIRECTORY = /electrumx/db
DAEMON_URL = rpcusername:rpcpassword@localhost
SERVICES = tcp://0.0.0.0:50001
COIN = Bitcoin
PEER_DISCOVERY = off
Source: https://www.youtube.com/watch?v=QiX0rR_o_fI


Also, try to change Peer_discovery on or off and check if your server will show up automatically in "electrumx_rpc peers".
Check this Reddit post below to get some idea about configuration.
- https://www.reddit.com/r/Electrum/comments/ggmduo/electrumx_over_tor_configuration_help/

I search more and it seems it's not easy to set up ElectrumX through TOR I have never seen someone succeed or share a guide on how they succeed in configuring their ElectrumX with TOR.
member
Activity: 86
Merit: 28
Hi all.

I installed the ElectrumX server but i can not connect to my server from my electrum wallet. I am behind CG-NAT, so it is a pure Tor server. I create the tor service in /etc/tor/torrc:

Code:
.
.
.
HiddenServiceDir /var/lib/tor/electrumx/
HiddenServicePort 50001 127.0.0.1:50001
HiddenServicePort 50002 127.0.0.1:50002
.
.
.

and this is my ElectrumX configuration file:


Code:
DB_DIRECTORY = /electrumx/db
DAEMON_URL = :@127.0.0.1:8332/
COIN=Bitcoin
DONATION_ADDRESS=1LM9kqiRPMavcgocXmexw5vNn2XhVSi5Rq
BANNER_FILE= /electrumx/banner
SERVICES = rpc://127.0.0.1:8000,wss://:50001
REPORT_SERVICES = wss://y32svarehxecrpvg62upqq7lgqhcrr3m35y4cqogy4nubsic2y3fofyd.onion:50001
SSL_CERTFILE =  /electrumx/server.crt
SSL_KEYFILE =  /electrumx/server.key
FORCE_PROXY = on
TOR_PROXY_HOST = 127.0.0.1
TOR_PROXY_PORT = 9050


The server is synced and have peers, the output of $electrumx_rpc getinfo:

Code:
{
    "coin": "Bitcoin",
    "daemon": "127.0.0.1:8332/",
    "daemon height": 732924,
    "db height": 732924,
    "db_flush_count": 1511,
    "groups": 0,
    "history cache": "0 lookups 0 hits 0 entries",
    "merkle cache": "0 lookups 0 hits 0 entries",
    "peers": {
        "bad": 25,
        "good": 55,
        "never": 5,
        "stale": 50,
        "total": 135
    },
    "pid": 2762,
    "request counts": {
        "getinfo": 15
    },
    "request total": 15,
    "sessions": {
        "count": 1,
        "count with subs": 0,
        "errors": 0,
        "logged": 0,
        "pending requests": 1,
        "subs": 0
    },
    "tx hashes cache": "0 lookups 0 hits 0 entries",
    "txs sent": 0,
    "uptime": "07h 18m 48s",
    "version": "ElectrumX 1.16.0"
}

I want to connect using two methods, the first is via Tor, i am trying the command:

Code:
$./electrum-4.1.5-x86_64.AppImage -1 -s y32svarehxecrpvg62upqq7lgqhcrr3m35y4cqogy4nubsic2y3fofyd.onion:50001:t -p socks5:localhost:9050

the second method is to use a ssh tunnel from other PC inside my own network to connect via rpc:

Code:
$ssh -p -L 8000:127.0.0.1:8000 @192.168.0.104
$./electrum-4.1.5-x86_64.AppImage -1 -s localhost:8000

Using both methods the dot indicating connection in electrum wallet stay red and do not connect to the server. I am using a new wallet to test . Do i missing some configuration or using some command with wrong sintaxe? Any help is welcome.

edit: Also https://1209k.com/bitcoin-eye/ele.php is showing my node as "Closed".
Jump to: