Author

Topic: Electrum Personal Server on Windows 7 (Read 490 times)

HCP
legendary
Activity: 2086
Merit: 4363
January 17, 2020, 09:05:54 PM
#22
It appears that while things are working, I still get (in electrs) errors like " failed to send PeriodicUpdate to peer 81: sending on a full channel" and I can see that electrs keeps disconnecting my connections to it from different wallets. It appears that there must be some more arguments that could probably help my wallets not disconnecting the way they do in electrs.

It's like electrs can't keep up with the speed of things?
Possibly... I'm not sure what the scaling is like and how it handles a large number of wallets/concurrent connections. I use it basically as a replacement for EPS... so i generally only ever have 1 connection to it from one Electrum instance (with possibly multiple wallet files open).

You'd need to contact the electrs dev (via github or the thread on here) and see if they can shed some light on it.
newbie
Activity: 20
Merit: 0
January 15, 2020, 12:05:36 PM
#21
Interesting. Thanks for the headsup regarding WSL import/export.

I've not actually tried it as yet as I have not had the need to backup WSL and move to a new machine. Generally, I just install from fresh and start again Tongue I wonder if the "different user" thing is a result of different UID's being created in the new instance? Huh

What I do know is that you can start a WSL distro using a specified username, by using the --u or --username arguments. Refer: https://winaero.com/blog/run-wsl-linux-distro-as-specific-user-in-windows-10/

Also, you might be able to change the "default user" that a distro will start up with, depending on the distro you're using. With Ubuntu, it's something like "ubuntu.exe config --default-user MYUSERNAME". But you need to figure out what distro you're running. refer: https://docs.microsoft.com/en-us/windows/wsl/user-support

Thanks for the info HCP.
It appears that while things are working, I still get (in electrs) errors like " failed to send PeriodicUpdate to peer 81: sending on a full channel" and I can see that electrs keeps disconnecting my connections to it from different wallets. It appears that there must be some more arguments that could probably help my wallets not disconnecting the way they do in electrs.

It's like electrs can't keep up with the speed of things?
HCP
legendary
Activity: 2086
Merit: 4363
January 12, 2020, 03:42:56 PM
#20
Interesting. Thanks for the headsup regarding WSL import/export.

I've not actually tried it as yet as I have not had the need to backup WSL and move to a new machine. Generally, I just install from fresh and start again Tongue I wonder if the "different user" thing is a result of different UID's being created in the new instance? Huh

What I do know is that you can start a WSL distro using a specified username, by using the --u or --username arguments. Refer: https://winaero.com/blog/run-wsl-linux-distro-as-specific-user-in-windows-10/

Also, you might be able to change the "default user" that a distro will start up with, depending on the distro you're using. With Ubuntu, it's something like "ubuntu.exe config --default-user MYUSERNAME". But you need to figure out what distro you're running. refer: https://docs.microsoft.com/en-us/windows/wsl/user-support
newbie
Activity: 20
Merit: 0
January 07, 2020, 08:20:07 PM
#19
Awesome, glad you got it sorted... I was going to say that it looked like either the port was closed, or that your bitcoind wasn't configured to accept incoming RPC connections. The "-server" part is probably what fixed it if you didn't already have that in bitcoin.conf Wink

One more piece of advice... if you see errors when trying to connect using Electrum. It might be because, as far as I'm aware, electrs still doesn't support direct SSL connections, you need to use a proxy... and Electrum tries to use it by default.

So, I created an "Electrum - Local" shortcut within Windows... that runs as follows:
Code:
"C:\Program Files (x86)\Electrum\electrum-3.3.8.exe" --oneserver --server localhost:50001:t

It prevents my Electrum from connecting to anything other than my local server (--oneserver)... and it specifies that it should just use ordinary "tcp" connection... that's the "t" part on the end of the server spec.

Not having SSL isn't a huge deal for me, because this is a "personal" server, so it's all internal communication. If I was going to open this for external connections (if I wanted to be able to use Electrum from my Android phone for instance), then I'd investigate setting up the SSL stuff.



EDIT:

Ok, so mentioning SSL got me curious about how hard it was to setup... the answer is... Not very Wink

I installed the prebuilt NGINX using apt-get as outlined here, created some SSL self-signed certs using openssl as outlined here (I just changed "apache-selfsigned" to "nginx-selfsigned" for the .key and .crt)... and then added the NGINX .conf changes as specified in the electrs docs

Started up NGINX, then connected using Electrum with a new SSL shortcut:
Code:
"C:\Program Files (x86)\Electrum\electrum-3.3.8.exe" --oneserver --server localhost:50002:s

et voilà... Electrum running using SSL... at some point, I might attempt to make this externally accessible, so I could connect from external networks. But for a "proof of concept" it was pretty easy to do.

GREAT WORK. I also run it with localhost:50001:t so far, will try your ngix ssl solution soon.

The main reason I wanted all this with running my personal electrs etc., was to be able to use Python to create multiple wallets automatically and work with them fast, thus the private server. Normal Electrum wallet GUI starts normally and connects to localhost just fine, without any issues.

It all works fine now, I get much better speed in my project than with the public electrum servers, but there is an issue that I am 99% certain is not related to my Python programming on Electrum but it must have to do with Electrs server.

What happens is, I get (in electrs) errors like " failed to send PeriodicUpdate to peer 81: sending on a full channel" and I can see that electrs keeps disconnecting my connections to it from different wallets. It appears that there must be some more arguments that could probably help my wallets not disconnecting the way they do in electrs.

Do you know if there are, and what are they, more arguments for electrs when it starts? Like timeout args or similar?

------UPDATE------
Hi HCP, I managed to fix everything, without SSL yet, this I will try soon. electrs works fine and what was wrong was in the Python script. Thank you for your help, as it saved a lot of time and effort.

P.S. I tried porting the WSL to another system but not everything was as it should be even though the import-export works, the ported WSL wasn't starting in the same user (now it was root by default) and things like that. I just reinstalled everything to the other computer in a new WSL just to be sure.
HCP
legendary
Activity: 2086
Merit: 4363
January 07, 2020, 05:01:50 PM
#18
Awesome, glad you got it sorted... I was going to say that it looked like either the port was closed, or that your bitcoind wasn't configured to accept incoming RPC connections. The "-server" part is probably what fixed it if you didn't already have that in bitcoin.conf Wink

One more piece of advice... if you see errors when trying to connect using Electrum. It might be because, as far as I'm aware, electrs still doesn't support direct SSL connections, you need to use a proxy... and Electrum tries to use it by default.

So, I created an "Electrum - Local" shortcut within Windows... that runs as follows:
Code:
"C:\Program Files (x86)\Electrum\electrum-3.3.8.exe" --oneserver --server localhost:50001:t

It prevents my Electrum from connecting to anything other than my local server (--oneserver)... and it specifies that it should just use ordinary "tcp" connection... that's the "t" part on the end of the server spec.

Not having SSL isn't a huge deal for me, because this is a "personal" server, so it's all internal communication. If I was going to open this for external connections (if I wanted to be able to use Electrum from my Android phone for instance), then I'd investigate setting up the SSL stuff.



EDIT:

Ok, so mentioning SSL got me curious about how hard it was to setup... the answer is... Not very Wink

I installed the prebuilt NGINX using apt-get as outlined here, created some SSL self-signed certs using openssl as outlined here (I just changed "apache-selfsigned" to "nginx-selfsigned" for the .key and .crt)... and then added the NGINX .conf changes as specified in the electrs docs

Started up NGINX, then connected using Electrum with a new SSL shortcut:
Code:
"C:\Program Files (x86)\Electrum\electrum-3.3.8.exe" --oneserver --server localhost:50002:s

et voilà... Electrum running using SSL... at some point, I might attempt to make this externally accessible, so I could connect from external networks. But for a "proof of concept" it was pretty easy to do.
newbie
Activity: 20
Merit: 0
January 07, 2020, 04:21:53 PM
#17
Question... will electrs download/build its own DB now? I guess yes, but will that be about 20-30% of the bitcoin DB?
Yes, it builds it's own database... my "electrs" dbDir is currently ~56gigs. Note that this in addition to the Bitcoin Core DB (which is currently ~324gigs)... you still need the Bitcoin Core DBs as well! Wink


Quote
Also, how about WLS moving it to another PC? is this possible?
Apparently you can... the WSL command (included when you setup WSL within Windows) has an --export command which will export a specified distro to a "tar" file and an --import argument that will allow you to then import that distro to another PC...

Quote
Arguments to manage Windows Subsystem for Linux:

    --export
        Exports the distribution to a tar file.
        The filename can be - for standard output.

    --import
        Imports the specified tar file as a new distribution.
        The filename can be - for standard input.

    --list, -l [Options]
        Lists distributions.

        Options:
            --all
                List all distributions, including distributions that are currently
                being installed or uninstalled.

            --running
                List only distributions that are currently running.

NOTE: I have not used this, so I've not experience with actually using it. I'd suggest trying Google for more info.

Hi HCP and thank you for the WSL and electrs DB info,

I tried it your way and while everything was going great up to the point I installed all the prerequisites, I hit a wall:

1. I installed WSL, and in it, all that is required by electrs to run using the information here:https://github.com/romanz/electrs/blob/master/doc/usage.md

2. When I issue the line  cargo run --release -- -vvv --timestamp --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001" --daemon-dir /mnt/c/Bitcoin  while in electrs directory, I get the following output:

chameleon@DESKTOP-GALLM9T:~/electrs$ cargo run --release -- -vvv --timestamp --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001" --daemon-dir /mnt/c/Bitcoin
    Finished release [optimized] target(s) in 0.43s
     Running `target/release/electrs -vvv --timestamp --db-dir ./db '--electrum-rpc-addr=127.0.0.1:50001' --daemon-dir /mnt/c/Bitcoin`
Config { log: StdErrLog { verbosity: Debug, quiet: false, timestamp: Millisecond, modules: [], writer: "stderr", color_choice: Auto }, network_type: bitcoin, db_path: "./db/mainnet", daemon_dir: "/mnt/c/Bitcoin", daemon_rpc_addr: V4(127.0.0.1:8332), electrum_rpc_addr: V4(127.0.0.1:50001), monitoring_addr: V4(127.0.0.1:4224), jsonrpc_import: false, index_batch_size: 100, bulk_index_threads: 12, tx_cache_size: 10485760, txid_limit: 100, server_banner: "Welcome to electrs 0.8.2 (Electrum Rust Server)!", blocktxids_cache_size: 10485760 }
2020-01-07T23:07:20.650+02:00 - DEBUG - Server listening on 127.0.0.1:4224
2020-01-07T23:07:20.651+02:00 - DEBUG - Running accept thread
2020-01-07T23:07:20.652+02:00 - WARN - failed to connect daemon at 127.0.0.1:8332: Connection refused (os error 111)
2020-01-07T23:07:23.654+02:00 - WARN - failed to connect daemon at 127.0.0.1:8332: Connection refused (os error 111)

3. I tried running my Windows bitcoind with rpcuser & rpcpassword, and also without them in the bitcoin.conf file. What is the line you use to run electrs in your WSL? It feels like it has to do with user & password but I can't get where to change what.


---------- UPDATE ------------
I used --> bitcoind -server=1 -rpcport=8332 when running bitcoind on Windows 10 and now I am getting the following in my WSL :

2020-01-07T23:35:08.723+02:00 - DEBUG - Server listening on 127.0.0.1:4224
2020-01-07T23:35:08.724+02:00 - DEBUG - Running accept thread
2020-01-07T23:35:08.726+02:00 - INFO - NetworkInfo { version: 190001, subversion: "/Satoshi:0.19.0.1/" }
2020-01-07T23:35:08.727+02:00 - INFO - BlockchainInfo { chain: "main", blocks: 611791, headers: 611791, bestblockhash: "00000000000000000003404e2461a0d394d207cf74739519907d6d623bb6e5ad", pruned: false, initialblockdownload: false }
2020-01-07T23:35:08.729+02:00 - DEBUG - opening DB at "./db/mainnet"
2020-01-07T23:35:08.763+02:00 - INFO - listing block files at "/mnt/c/Bitcoin/blocks/blk*.dat"
2020-01-07T23:35:08.782+02:00 - INFO - indexing 1923 blk*.dat files
2020-01-07T23:35:08.782+02:00 - DEBUG - found 0 indexed blocks
2020-01-07T23:35:45.821+02:00 - DEBUG - applying 611792 new headers from height 0


I guess this is what should happen? I will give it time to see how it goes and report back.
HCP
legendary
Activity: 2086
Merit: 4363
January 07, 2020, 03:06:13 PM
#16
Question... will electrs download/build its own DB now? I guess yes, but will that be about 20-30% of the bitcoin DB?
Yes, it builds it's own database... my "electrs" dbDir is currently ~56gigs. Note that this in addition to the Bitcoin Core DB (which is currently ~324gigs)... you still need the Bitcoin Core DBs as well! Wink


Quote
Also, how about WLS moving it to another PC? is this possible?
Apparently you can... the WSL command (included when you setup WSL within Windows) has an --export command which will export a specified distro to a "tar" file and an --import argument that will allow you to then import that distro to another PC...

Quote
Arguments to manage Windows Subsystem for Linux:

    --export
        Exports the distribution to a tar file.
        The filename can be - for standard output.

    --import
        Imports the specified tar file as a new distribution.
        The filename can be - for standard input.

    --list, -l [Options]
        Lists distributions.

        Options:
            --all
                List all distributions, including distributions that are currently
                being installed or uninstalled.

            --running
                List only distributions that are currently running.

NOTE: I have not used this, so I've not experience with actually using it. I'd suggest trying Google for more info.
newbie
Activity: 20
Merit: 0
January 07, 2020, 09:43:36 AM
#15
What directory are you trying to execute the "cargo run" command from? Based on that error, it seems like you are not in the "electrs" directory, but in your home directory. Huh

After cloning the electrs git, you need to "cd electrs" before you do the "cargo build" and then "cargo run" commands
Touch down, again. I just entered the command in electrs dir and it started building.

Question... will electrs download/build its own DB now? I guess yes, but will that be about 20-30% of the bitcoin DB?

Also, how about WLS moving it to another PC? is this possible?

Thank you again HCP, will update here with progress and more info, we can all share. Your assistance is great so far.
HCP
legendary
Activity: 2086
Merit: 4363
January 06, 2020, 10:08:08 PM
#14
What directory are you trying to execute the "cargo run" command from? Based on that error, it seems like you are not in the "electrs" directory, but in your home directory. Huh

After cloning the electrs git, you need to "cd electrs" before you do the "cargo build" and then "cargo run" commands
newbie
Activity: 20
Merit: 0
January 06, 2020, 06:43:36 PM
#13
If by "VBOX" you mean Oracle Virtual Box, then I am fairly sure that allows you to create and mount shared drives/folders... you'd need to set up one for either the drive that your Bitcoin Core datadir is on, or for the datadir itself. "electrs" needs to be able to read the Bitcoin Core folder... as you pass it in with the --daemon-dir commandline argument when you start electrs.

WSL appears to have full access to the Windows file system with all my drives available in /mnt (/mnt/c, /mnt/e, /mnt/j for C:, E: and J: etc), so it's very easy... in my case: "--daemon-dir /mnt/e/Bitcoin"


@HCP Thank you for quick reply.

1. Can I run electrs with my current setup? That includes just Electrum and electrs installed in Ubuntu, but not bitcoin core. I can try using the shared folders of Virtual Box but I am not sure how to start electrs and use the right arguments to tell it to access bitcoin on Windows 10.

What would be the full argument line to run electrs the right way to do that?

2. I can try and work with WSL of course. It can be even better. In that case, could you please tell me what steps I need to follow? What software should I install in WSL? Also, is it possible to copy-paste (move) the full WSL installation to another Windows 10 PC? I would hate to have to do it all again and I need to have this running on 2 PCs.

HCP, again, thank you so much for bothering to get back to me that fast, I now feel I might be able to get it right with your help, if you could help with #1 and #2. All the best to you.

UPDATE: I managed to connect to my Windows 10 bitcoin datadir from within Ubuntu, after I also installed bitcoind in Ubuntu.

Now I am trying to install electrs but when I use:  cargo run --release -- -vvv --timestamp --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001", I get error: could not find `Cargo.toml` in `/home/MYUSER` or any parent directory.

What is that error? I am following the instructions for electrs here: https://github.com/romanz/electrs/blob/master/doc/usage.md
What is the proper way to install and run electrs in Ubuntu? Thank you in advance!!!

HCP
legendary
Activity: 2086
Merit: 4363
January 06, 2020, 06:11:19 PM
#12
If by "VBOX" you mean Oracle Virtual Box, then I am fairly sure that allows you to create and mount shared drives/folders... you'd need to set up one for either the drive that your Bitcoin Core datadir is on, or for the datadir itself. "electrs" needs to be able to read the Bitcoin Core folder... as you pass it in with the --daemon-dir commandline argument when you start electrs.

WSL appears to have full access to the Windows file system with all my drives available in /mnt (/mnt/c, /mnt/e, /mnt/j for C:, E: and J: etc), so it's very easy... in my case: "--daemon-dir /mnt/e/Bitcoin"

newbie
Activity: 20
Merit: 0
January 06, 2020, 05:45:58 PM
#11
Okay, I would like to get this issue resolved. The Electrum Multisig wallet is working fine but I would like to get Electrum to run on a Bitcoin full node.
I’m offering 1M sats (0.01BTC) to anyone who can get EPS to work on my laptop. Contact me via PM to arrange details.
Here is my setup:

Windows 10
Electrum multisig wallet (version 3.38)
Bitcoin Core (0.18.0) configured to run via TOR
TOR browser (8.5.1)
Have you considered trying to use "electrs" instead of EPS? Huh

I have "electrs" running in an Ubuntu instance using the "Windows Subsystem for Linux" inside of Windows 10. I then have Electrum 3.3.8 (Windows 10) connecting to my local "electrs" server using --oneserver and --server localhost:52001:t commandline options.

"electrs" reads the block info from my Bitcoin Core full node install (0.18.0 running in Windows 10).


NOTE: I have not tried this setup using Tor.

Hi all. I have just set up Ubuntu running on VBOX, and installed Electrs in it. How can I run it (in VBOX, similar to WSL) and have it use Bitcoin core full node running on Windows 10, like you did? I have not installed bitcoind in Ubuntu, just on my Windows 10 as full node.

My goal is to have Electrum (running on WIN10) connect to Electrs server (running on VBOX-Ubuntu) that uses Bitcoind(running as full node on WIN10)

Thank you in advance for any help you can share.
HCP
legendary
Activity: 2086
Merit: 4363
July 25, 2019, 09:59:13 PM
#10
Okay, I would like to get this issue resolved. The Electrum Multisig wallet is working fine but I would like to get Electrum to run on a Bitcoin full node.
I’m offering 1M sats (0.01BTC) to anyone who can get EPS to work on my laptop. Contact me via PM to arrange details.
Here is my setup:

Windows 10
Electrum multisig wallet (version 3.38)
Bitcoin Core (0.18.0) configured to run via TOR
TOR browser (8.5.1)
Have you considered trying to use "electrs" instead of EPS? Huh

I have "electrs" running in an Ubuntu instance using the "Windows Subsystem for Linux" inside of Windows 10. I then have Electrum 3.3.8 (Windows 10) connecting to my local "electrs" server using --oneserver and --server localhost:52001:t commandline options.

"electrs" reads the block info from my Bitcoin Core full node install (0.18.0 running in Windows 10).


NOTE: I have not tried this setup using Tor.
newbie
Activity: 16
Merit: 1
July 23, 2019, 09:46:27 AM
#9
Okay, I would like to get this issue resolved. The Electrum Multisig wallet is working fine but I would like to get Electrum to run on a Bitcoin full node.
I’m offering 1M sats (0.01BTC) to anyone who can get EPS to work on my laptop. Contact me via PM to arrange details.
Here is my setup:

Windows 10
Electrum multisig wallet (version 3.38)
Bitcoin Core (0.18.0) configured to run via TOR
TOR browser (8.5.1)
newbie
Activity: 16
Merit: 1
July 13, 2019, 02:21:39 PM
#8
Which should not be used at all, regardless of whether it works or not.
All types of cracked windows OS are infected with malware and backdoors. That's their business model.

Also applies to original windows OS which done by Microsoft, expect you also might get infected by 3rd-party malware/backdoor who share pirated distribution.

Which OS would you recommend to run Electrum multisig wallet on? How does it compare in terms of security to running Windows 10?
legendary
Activity: 1624
Merit: 2481
July 13, 2019, 11:41:07 AM
#7
You can do it even if you use pirated windows, though you'll get watermark with text “This is not a genuine copy of Windows.”

Which should not be used at all, regardless of whether it works or not.
All types of cracked windows OS are infected with malware and backdoors. That's their business model.

I wouldn't touch such a system with a stick, let alone store sensitive information (passwords, private keys, etc..) on it.

From an information security based point of view, that's one of the most dangerous things you can do.
legendary
Activity: 2758
Merit: 6830
July 12, 2019, 01:28:19 PM
#6
I thought it is no longer a free upgrade. Did you download from the Microsoft website?
I believe it still is free.

Just download Microsoft's tool at: https://www.microsoft.com/software-download/windows10

Choose "Upgrade this PC" when asked what you want to do.
newbie
Activity: 16
Merit: 1
July 12, 2019, 10:52:17 AM
#5
"won't launch at all" is not much information at all. Could you be more precise? Error message, anything ?

I'm getting "failed to execute script", with a "missing section header" error. Any idea what this means?


However, is there a specific reason you want to stick to an outdated and unsecure OS instead of upgrading it to at least have a bit of security?
I, personally, don't see a single reason.

No specific reason, just trying to save some time and money. I will no doubt do the upgrade if necessary.
legendary
Activity: 1624
Merit: 2481
July 11, 2019, 03:58:27 AM
#4
"won't launch at all" is not much information at all. Could you be more precise? Error message, anything ?

However, is there a specific reason you want to stick to an outdated and unsecure OS instead of upgrading it to at least have a bit of security?
I, personally, don't see a single reason.
newbie
Activity: 16
Merit: 1
July 09, 2019, 10:25:58 AM
#3
The guide on the GitHub repository is for Windows 10 users so, 7 may not be supported.

You can, however, check this: https://bitcointalksearch.org/topic/m.28950183

It's about the wallet but If the error mentioned there is related to Python, then maybe it could be a solution (hard to tell as you didn't give much info).

Alternatively, you could create an issue on the GitHub repo or contact the developer on the forums (inactive for some time).

Thanks for your reply.
The issue is that after adding Master Public Addresses on a Multi-Sig wallet and entering target for the Bitcoin Directory, when moving the config file onto the .exe app, EPS won't launch at all.
staff
Activity: 3500
Merit: 6152
July 09, 2019, 10:02:26 AM
#2
The guide on the GitHub repository is for Windows 10 users so, 7 may not be supported.

You can, however, check this: https://bitcointalksearch.org/topic/m.28950183

It's about the wallet but If the error mentioned there is related to Python, then maybe it could be a solution (hard to tell as you didn't give much info).

Alternatively, you could create an issue on the GitHub repo or contact the developer on the forums (inactive for some time).
newbie
Activity: 16
Merit: 1
July 09, 2019, 09:48:55 AM
#1
Hi,

Was anybody able to install and run EPS on a Windows 7 machine?
Doesn't seem to work for me, just thought I'd check here to get pointers to the reason.
Thanks!
Jump to: