Bitcoin Forum

Bitcoin => Electrum => Topic started by: BitcoinGirl.Club on June 27, 2020, 10:59:54 AM



Title: Running personal server for Electrum
Post by: BitcoinGirl.Club on June 27, 2020, 10:59:54 AM
I was wondering if there are any step by step guide on how to run a personal server for Electrum to protect ones privacy. We all know those servers we connect to broadcast a tx know your IP and some other information. Lately I am thinking of running my own server. I would appreciate some guides.

Thanks


Title: Re: Running personal server for Electrum
Post by: igor72 on June 27, 2020, 12:50:52 PM
https://github.com/chris-belcher/electrum-personal-server


Title: Re: Running personal server for Electrum
Post by: bob123 on June 27, 2020, 01:10:54 PM
Alternatively, you can switch to an SPV client which does not leak your data.
I'd recommend Wasabi (https://github.com/zkSNACKs/WalletWasabi). It is open source, privacy- and security orientated and is available for windows, linux and mac.

If you want to set up your own personal electrum server, the github link posted by igor72 should give you the information you need.


Title: Re: Running personal server for Electrum
Post by: ABCbits on June 27, 2020, 01:49:21 PM
Since you have privacy concern, i suggest you to create new wallet after using your own Electrum server. Make sure you transfer the Bitcoin in private manner (e.g. use mixer or coinjoin).

If you plan to use Tor, make sure Bitcoin Core is configured to use Tor,
* If you're only interested to use Tor, check https://bitcoin.stackexchange.com/a/70070 (https://bitcoin.stackexchange.com/a/70070)
* If you're also interested to act as full nodes through Tor hidden service, check https://en.bitcoin.it/wiki/Setting_up_a_Tor_hidden_service (https://en.bitcoin.it/wiki/Setting_up_a_Tor_hidden_service)


Title: Re: Running personal server for Electrum
Post by: BitcoinGirl.Club on June 27, 2020, 02:38:15 PM
Alternatively, you can switch to an SPV client which does not leak your data.
I'd recommend Wasabi (https://github.com/zkSNACKs/WalletWasabi). It is open source, privacy- and security orientated and is available for windows, linux and mac.

If you want to set up your own personal electrum server, the github link posted by igor72 should give you the information you need.

I am trying to figure out Wasabi wallet but it seems I am still on the "connecting". does it take too long time to download the blocks?

https://talkimg.com/images/2023/05/14/blobf75022f0e13f5a07.png

https://github.com/chris-belcher/electrum-personal-server
Thanks brother for this.


Title: Re: Running personal server for Electrum
Post by: bob123 on June 27, 2020, 02:47:54 PM
I am trying to figure out Wasabi wallet but it seems I am still on the "connecting". does it take too long time to download the blocks?

https://i.imgur.com/dx4ADsn.png

Actually i am not sure whether there should be "connecting.." or "synchronizing.." while doing the initial sync.
But since you are successfully connected to the backend, i guess that's fine.
 
Instead of sending all of your addresses to a server (as electrum is doing), Wasabi uses compact block filters.
The initialization process determines which blocks you need to download (all blocks where an address from you is used).
These blocks are then being downloaded from different nodes (Switching the node after downloading 1 block from them via TOR).

Overall, the initial synchronization shouldn't take longer than 20-30 minutes.


Can you verify whether the amount of filters (124763) actually decreases ?


Title: Re: Running personal server for Electrum
Post by: khaled0111 on June 27, 2020, 04:16:51 PM
Actually i am not sure whether there should be "connecting.." or "synchronizing.." while doing the initial sync.
It shows "Connecting" at first when trying to connect to other peers then it changes to "Synchronizing".
It won't synchronize until it connects to other peers as they are needed to download blocks. Usually it doesn't take more than few minutes unless there is something wrong with your connection.
Most of the times, simply turning off Tor then turning it on would fix the problem (wait till your wallet successfully connects to other peers before turning it on).


Title: Re: Running personal server for Electrum
Post by: BitcoinGirl.Club on June 27, 2020, 05:49:03 PM
Can you verify whether the amount of filters (124763) actually decreases ?
It decreased eventually.

Now here is something which is not making sense for me.

I created a wallet then sent some coins. I have the seed and the password.

Now in my other computer I installed Wasabi again and then wanted to recover the wallet. I only need the seed and the password but when I recovered the wallet I see no balance in it. In the first computer it shows the balance but in the 2nd computer it shows no balance.

What am I missing?

Edit: In the wallet info section I see both has same private key and other information.


Title: Re: Running personal server for Electrum
Post by: khaled0111 on June 27, 2020, 06:15:54 PM
Can you verify whether the amount of filters (124763) actually decreases ?
...

Most probably the wallet you installed on the second computer didn't finish syncing.
Since you backed up the seed and the second wallet generated the same addresses and same private keys then your funds are safe (you still can use the first wallet anyways)


Title: Re: Running personal server for Electrum
Post by: BitcoinGirl.Club on June 27, 2020, 06:21:03 PM
Most probably the wallet you installed on the second computer didn't finish syncing.
Since you backed up the seed and the second wallet generated the same addresses and same private keys then your funds are safe (you still can use the first wallet anyways)
I am still using the first computer but this is really something that is worrying me. I think the 2nd computer already synced since it says ready in the bottom part of the status bar I guess.

https://talkimg.com/images/2023/05/14/blobbc0e2d0ccb2b1c2a.png

I tried several ways and still see zero balance in the 2nd computer.

Quote
Mnemonic Recovery Words and Password
Back up Wallet File and Password
https://docs.wasabiwallet.io/using-wasabi/WalletRecovery.html#mnemonic-recovery-words-and-password


Title: Re: Running personal server for Electrum
Post by: bob123 on June 27, 2020, 06:30:48 PM
Now in my other computer I installed Wasabi again and then wanted to recover the wallet. I only need the seed and the password but when I recovered the wallet I see no balance in it. In the first computer it shows the balance but in the 2nd computer it shows no balance.

What am I missing?

Edit: In the wallet info section I see both has same private key and other information.

One of the most common mistakes probably would be entering the words of the mnemonic code in the wrong order.
They are not labeled like this:

010203
040506
070809
101112

but:

010509
020610
030711
040812


But since you were able to recreate your wallet using the mnemonic code and the passphrase, this seems quite odd to me.
If it shows the same xpub/zpub, it actually is the same wallet.


Did you already generate a receiving address in your 2nd wallet?


Title: Re: Running personal server for Electrum
Post by: BitcoinGirl.Club on June 27, 2020, 06:35:54 PM
But since you were able to recreate your wallet using the mnemonic code and the passphrase, this seems quite odd to me.
If it shows the same xpub/zpub, it actually is the same wallet.


Did you already generate a receiving address in your 2nd wallet?

The xpub amd zpub are the same I have checked them again and again.
I just generated a receiving address in the 2nd wallet not knowing how it's going to help.

Still the balance is zero in the 2nd wallet.

By the way, if the tx is unconfirmed then is there a possibility not to show in a restored wallet? The tx is unconfirmed.

Edit: Is there anyway, to restore this wallet using Electrum? Using the passphrase and the password. Will it be the same wallet? I doubt.


Title: Re: Running personal server for Electrum
Post by: bob123 on June 27, 2020, 06:59:13 PM
By the way, if the tx is unconfirmed then is there a possibility not to show in a restored wallet? The tx is unconfirmed.

This is very well imaginable and the only thing i can think of why it is not being shown yet.
I just tested it myself (on the same machine, but removing all wallet files temporarily) and it worked fine (transaction was confirmed already).



Edit: Is there anyway, to restore this wallet using Electrum? Using the passphrase and the password. Will it be the same wallet? I doubt.

Wasabi is following BIP39, so yes you can restore it in electrum (or any other wallet supporting BIP39):
  • Choose "Standard wallet" and "I already have a Seed"
  • Click on "Options" and tick the "BIP 39 Seed" and "Extend with custom words" box
  • Enter your password in the seed extension window
  • In the next window, choose "native segwit (p2wpkh)"


Title: Re: Running personal server for Electrum
Post by: BitcoinGirl.Club on June 27, 2020, 08:06:53 PM
This is very well imaginable and the only thing i can think of why it is not being shown yet.
I just tested it myself (on the same machine, but removing all wallet files temporarily) and it worked fine (transaction was confirmed already).
The lesson here is, without having any onchain confirmation (one confirmation needed minimum) or broadcast a tx while same wallet is not active in more than one machine, wasabi client do not sync. I hope it make sense. When I dropped the tx, replaced with higher fees just to drop the tx that was already exists, the coin showed up in both machine.

Then I tried to send another tx. It showed up instantly in the machine which was used to generate the address but did not showed up in the another machine until the tx had one confirmation.

Wasabi is following BIP39, so yes you can restore it in electrum (or any other wallet supporting BIP39):
  • Choose "Standard wallet" and "I already have a Seed"
  • Click on "Options" and tick the "BIP 39 Seed" and "Extend with custom words" box
  • Enter your password in the seed extension window
  • In the next window, choose "native segwit (p2wpkh)"
Yeah it worked. I messed up with this extended seed thing LOL
It was unable to figure out that the password will be used as extended seed.

 


Title: Re: Running personal server for Electrum
Post by: bob123 on June 27, 2020, 08:22:23 PM
I'm glad you got it sorted out.


It was unable to figure out that the password will be used as extended seed.

Yes, electrum could have been a bit more precise.
It is more of a password protection than an additional seed word.

Without a password, an empty string ("") is being used.


Title: Re: Running personal server for Electrum
Post by: khaled0111 on June 27, 2020, 08:58:06 PM
The lesson here is, without having any onchain confirmation (one confirmation needed minimum) or broadcast a tx while same wallet is not active in more than one machine, wasabi client do not sync.
It's not that your wallet will not sync, but if your wallet was offline during the broadcast of the unconfirmed transaction, it will not know about the existence of such transaction until it gets confirmed.
=> the wallet has to be online during the broadcast of the unconfirmed transaction between peers it's connected to.

note: if you are going to use the CoinJoin feature, then it's not recommanded to run more than an instance of Wasabi on the same device.


Title: Re: Running personal server for Electrum
Post by: BitcoinGirl.Club on June 28, 2020, 09:20:11 AM
note: if you are going to use the CoinJoin feature, then it's not recommanded to run more than an instance of Wasabi on the same device.
I am working on CoinJoin and it's all mess in the 2nd device LOL

It's a great thing to know how the CoinJoin works but the client really needs some kind of upgrade so that it can sync internally no matter how many windows open or how many devices are in use for the same wallet. Also the CoinJoin itself needs improvements I guess. If you close your application after enqueuing your coins then you are lost again. You can not close your application until the entire CoinJoin is done. People always do not keep their system on so in this case the mixing sites seem to be a good solution.


Title: Re: Running personal server for Electrum
Post by: bob123 on June 28, 2020, 10:20:33 AM
Also the CoinJoin itself needs improvements I guess. If you close your application after enqueuing your coins then you are lost again. You can not close your application until the entire CoinJoin is done.

It is required for you to keep the application open because you are required to sign the given transaction in a timely manner.
Every participant has to sign the transaction. Enqueuing and closing the wallet won't work.

That's why you need to confirm your input during the registration phase.
Once the time is over (or an anonymity set of 100 is reached), every user connects to a new tor circuit and sends the coordinator the output address and the blind signature.
After all participants did that, the coordinator builds the transaction and everyone has to sign it.

Since this is an interactive process, you need to be online when the mixing happens.
If you queue in right before the round starts, you'll be done in a minute. However, if a round just ended it takes up to 1 hour (or until 100 participants registered) until the coinjoin is being done.


Title: Re: Running personal server for Electrum
Post by: BitcoinGirl.Club on June 28, 2020, 10:43:06 AM
It is required for you to keep the application open because you are required to sign the given transaction in a timely manner.
Every participant has to sign the transaction. Enqueuing and closing the wallet won't work.

That's why you need to confirm your input during the registration phase.
Once the time is over (or an anonymity set of 100 is reached), every user connects to a new tor circuit and sends the coordinator the output address and the blind signature.
After all participants did that, the coordinator builds the transaction and everyone has to sign it.

Since this is an interactive process, you need to be online when the mixing happens.
If you queue in right before the round starts, you'll be done in a minute. However, if a round just ended it takes up to 1 hour (or until 100 participants registered) until the coinjoin is being done.
Yeah from last 24 hours I am having lots of reading about Wasabi and CoinJoin. It's a new experience for me. I guess receiving fund and for mixing wasabi is great but not for holding your coin for long time. I am still happy with Electrum and my previous settings. Additionally I am using tor node for Electrum.


Title: Re: Running personal server for Electrum
Post by: khaled0111 on June 28, 2020, 03:42:57 PM
In fact, Wasabi is as secure and easy to use as Electrum. You just need more time to get used to it and learn about all its features and how to configure it properly.
The only inconvinience when using Wasabi is the longer time it takes to synchronize compared to Electrum and other SPV wallets.

People always do not keep their system on so in this case the mixing sites seem to be a good solution.
CoinJoin main advantage is that it allows you to mix your coins in a decentralized way. You don't have to trust any third party.
When using a regular mixer, you have no guarantees that they don't keep logs of your activity/personal information.


Title: Re: Running personal server for Electrum
Post by: BitcoinGirl.Club on July 01, 2020, 01:21:56 PM
CoinJoin main advantage is that it allows you to mix your coins in a decentralized way. You don't have to trust any third party.
When using a regular mixer, you have no guarantees that they don't keep logs of your activity/personal information.
I like this solution of decentralized way to mix the coins. However having only 0.1xxx coins for each time you queue is a bit long process and also it's petty that one can not mix anything below 0.1xxx

They can have some more target categories like 0.001xx, 0.005xxx, 0.01xxm 0.05xxx, 0.2xxx, 0.5xxx and even more instead of only 0.1xxx


Title: Re: Running personal server for Electrum
Post by: DaveF on July 01, 2020, 04:31:34 PM
MyNodeBTC has a built in Electrum Server and Dojo and Whirlpool.
Take a look st https://mynodebtc.com/
You can run it as a VM or on a RPi4 or a Rock64 device.
I have one running in my office and have had no issues at all with it.
The free version will do all that you are looking for.

-Dave


Title: Re: Running personal server for Electrum
Post by: bob123 on July 02, 2020, 09:50:40 AM
They can have some more target categories like 0.001xx, 0.005xxx, 0.01xxm 0.05xxx, 0.2xxx, 0.5xxx and even more instead of only 0.1xxx

These options will be added later if (and when) enough people use wasabi and want to participate in a coinjoin.
Adding them now would just increase the wait time for everyone.

And IMO 0.001 BTC is way too low to mix. The demand would need to be quite high for that denomination to be added.