Bitcoin Forum
June 14, 2024, 10:23:17 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: [Questions] Running my own electrum server  (Read 485 times)
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1554
Merit: 7546


Protocols over bureaucrats


View Profile
April 30, 2021, 12:53:51 PM
 #21

oh man... if I had known you just wanted a little local Electrum server... I would have recommended electrs Tongue I thought you were trying to get your own public facing Electrum server up and running.  Roll Eyes
I do. I just wanted to firstly setup a personal server. Running a server publicly is secondary.

The problem with electrumx is that I still haven't understood how it works. For example, on electrum-personal-server, you're starting the server with electrum-personal-server config.ini. With what file do you start electrumx? service/electrumx?

The tutorial doesn't tell you much. It just says "run that command, then another command etc.". Where's the explanation? How am I supposed to know what does that do and from what directory should I run it?:
Code:
systemctl start electrumx

This is what it returns me when I execute the above command:
Code:
angelo@angelopc:~/Desktop/electrumx$ systemctl start electrumx
Warning: The unit file, source configuration file or drop-ins of electrumx.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Job for electrumx.service failed because of unavailable resources or another system error.
See "systemctl status electrumx.service" and "journalctl -xe" for details.

And then with systemctl status electrumx.service (as it's been said in the error):
Code:
angelo@angelopc:~/Desktop$ systemctl status electrumx.service
● electrumx.service - Electrumx
   Loaded: loaded (/etc/systemd/system/electrumx.service; disabled; vendor prese
   Active: failed (Result: resources)

Aπρ 30 15:21:48 angelopc systemd[1]: electrumx.service: Failed with result 'reso
Aπρ 30 15:21:48 angelopc systemd[1]: Failed to start Electrumx.
Aπρ 30 15:21:53 angelopc systemd[1]: electrumx.service: Failed to load environme
Aπρ 30 15:21:53 angelopc systemd[1]: electrumx.service: Failed to run 'start' ta
Aπρ 30 15:21:53 angelopc systemd[1]: electrumx.service: Failed with result 'reso
Aπρ 30 15:21:53 angelopc systemd[1]: Failed to start Electrumx.
Aπρ 30 15:22:14 angelopc systemd[1]: electrumx.service: Failed to load environme
Aπρ 30 15:22:14 angelopc systemd[1]: electrumx.service: Failed to run 'start' ta
Aπρ 30 15:22:14 angelopc systemd[1]: electrumx.service: Failed with result 'reso
Aπρ 30 15:22:14 angelopc systemd[1]: Failed to start Electrumx.

(Aπρ is Apr on my lang)



As I said, I have a VPS left over and I'd like to "donate" its operation to the electrum community instead of having it shut down. I also like practicing in this field. I'd have probably given up with this setup, but it seems that I'm a stubborn...

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1554
Merit: 7546


Protocols over bureaucrats


View Profile
May 01, 2021, 11:27:40 AM
 #22

Honestly if the VPS use linux, you can use easy installer/docker (which i mentioned above), which is very easy to use.

I saw the docker, but I haven't ever used docker in the past for setups. Would you mind guiding me a hand? There's no steps, just a “docker run /” script.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Trechometer
Newbie
*
Offline Offline

Activity: 16
Merit: 0


View Profile
May 02, 2021, 09:53:42 AM
 #23

I have been experimenting with electrum as a wallet since I learnt about bitcoin, a year ago, and I can admit that it's the simplest and most useful one. I'd like to run my own electrum server, but not for privacy reasons, just for exercise. I also have bought a Windows VPS that isn't being used at the moment, so why not providing it to the electrum community?

I picked electrumx, because it's the most popular implementation. It seems that I can't install it on windows, only on unix. The thing is that I don't have an Ubuntu installed right now. Could this work with Windows 10 on an Ubuntu LTS?

Other questions too:
  • Is the same procedure if I want to run a testnet server? I don't have the storage for downloading the entire blockchain.
  • How does it return the balance of address(es) instantly? On Bitcoin Core it has to rescan the blockchain (which will take a lot of time).
  • Will I be shown on others' network servers? If no, how can I be shown?

Hello,

Please share some more informations, I also wanted to start with electrum, but failed to install and run. Lets help us each other if you are also at the beginning.
And the VPS is hardware or software or rented? Because I heard that is possible, personally I didnt saw such a witchcraft Smiley))
Thanks!
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1554
Merit: 7546


Protocols over bureaucrats


View Profile
May 02, 2021, 01:20:53 PM
 #24

If you see message "Hello from Docker!", then Docker run correctly.
On the WSL I don't get it. I returns me an error instead. But don't worry, I'll setup it on my Ubuntu machine. On my Ubuntu 18.04 the hello-world works properly, but not the script you've given:


Please share some more informations, I also wanted to start with electrum, but failed to install and run. Lets help us each other if you are also at the beginning.
If you read the entire thread, you'll find the information you're searching. In a few words, I'm fumbled with the whole server thing...  Cheesy.  I feel better now that I see that I am not the only one with these issues.  Tongue

And the VPS is hardware or software or rented?
I think it's software, but I ain't completely sure. It's really cheap so I doubt if it'd be a hardware one.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1554
Merit: 7546


Protocols over bureaucrats


View Profile
May 03, 2021, 07:06:27 AM
 #25

Update.

It works!  Cheesy


Sorry, but I hadn't noticed that the DAEMON_URL was expecting two input fields (username and password). Once I entered it correctly, it started the server. That actually happened yesterday, couple hours after my last post, but I went offline, so I couldn't inform about it.

Alright, so I have some questions to make regarding electrumx:
  • Before exposing it to the internet, I'd like to firstly try it on LAN. It seems that with the way you've described me, it works only on localhost. Do I simply change the DAEMON_URL from localhost to 192.168.x.x?
  • Can you explain a little further the last one you mentioned (container)? I don't have the electrumx files on my computer. Where does it execute the commands and from what files? Github?
  • How do I change the banner/donation address? I've created a file called "DONATION_ADDRESS" containing a legacy address as being said on electrumx's documentation, but it doesn't seem to read it.




.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
ABCbits
Legendary
*
Offline Offline

Activity: 2912
Merit: 7561


Crypto Swap Exchange


View Profile
May 03, 2021, 09:08:45 AM
Merited by BlackHatCoiner (1)
 #26

Sorry, but I hadn't noticed that the DAEMON_URL was expecting two input fields (username and password). Once I entered it correctly, it started the server.

I'd like to mention that you can change value of other parameter (such as where do you store electrumx file) or add additional environment parameter.

  • Before exposing it to the internet, I'd like to firstly try it on LAN. It seems that with the way you've described me, it works only on localhost. Do I simply change the DAEMON_URL from localhost to 192.168.x.x?
  • Can you explain a little further the last one you mentioned (container)? I don't have the electrumx files on my computer. Where does it execute the commands and from what files? Github?
  • How do I change the banner/donation address? I've created a file called "DONATION_ADDRESS" containing a legacy address as being said on electrumx's documentation, but it doesn't seem to read it.

1. AFAIK yes.
2. You should search what is docker and how docker works. Here's an article i found https://devopscube.com/what-is-docker/.
3. You need to add another parameter when run electrumx

Code:
-e DONATION_ADDRESS=YOUR_BITCOIN_ADDRESS

P.S. Those are good question, but unfortunately i'm still newbie when using Docker.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1554
Merit: 7546


Protocols over bureaucrats


View Profile
May 04, 2021, 06:26:12 AM
 #27

Thank you @ETFbitcoin. It now works like a charm.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
DireWolfM14
Copper Member
Legendary
*
Offline Offline

Activity: 2184
Merit: 4242


Join the world-leading crypto sportsbook NOW!


View Profile WWW
May 06, 2021, 01:38:59 PM
 #28


I've read about the installer, but this is the first I've heard about people using docker to run electrumx.  I'm not familiar with docker, so seems like a rabbit hole of it's own.  I just use systemd to run bitcoind and electrumx.  Old dog, new tricks, and all that.

Does the docker method allow one to use all the same environment variables that one might enable in electumx.conf?

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
BlackHatCoiner (OP)
Legendary
*
Offline Offline

Activity: 1554
Merit: 7546


Protocols over bureaucrats


View Profile
May 06, 2021, 01:51:33 PM
 #29

Does the docker method allow one to use all the same environment variables that one might enable in electumx.conf?

Was there such configuration file for electrumx? In the docs you linked it says that there should be different files for each environment variable. For example, it says that you'll have to create the COIN, DB_DIRECTORY and DAEMON_URL necessarily and some others optionally.

Anyway, yes, if I understood your question correctly, docker does allow you to do that. You just need to add parameters on your script. Three posts above, @ETFbitcoin included the DONATION_ADDRESS param. You can do the same for the banner:

Code:
-e BANNER_FILE=LOCATION_OF_YOUR_BANNER_FILE

Note that the location starts from the electrumx data directory which means that if you enter BANNER_FILE=banner.txt, it'll search for /home/user/electrumx:/data/banner.txt

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
DireWolfM14
Copper Member
Legendary
*
Offline Offline

Activity: 2184
Merit: 4242


Join the world-leading crypto sportsbook NOW!


View Profile WWW
May 06, 2021, 04:55:27 PM
Last edit: May 06, 2021, 05:20:21 PM by DireWolfM14
 #30

Was there such configuration file for electrumx?

Yes, you'll find it in .../contrib/systemd/

https://github.com/spesmilo/electrumx/tree/master/contrib/systemd


In the docs you linked it says that there should be different files for each environment variable. For example, it says that you'll have to create the COIN, DB_DIRECTORY and DAEMON_URL necessarily and some others optionally.

No, all you need is one .conf file, all the environment variables can go there.  For example:

Code:
COIN = Bitcoin
DAEMON_URL = myrpcusername:myrpcpassword@localhost:port
SERVICES = tcp://my.domain.name:50001,ssl://my.domain.name:50002,rpc://
REPORT_SERVICES = tcp://myaddress.onion:50001,ssl://myaddress.onion:50002
SSL_CERTFILE = /path/to/sslcertfile.crt
SSL_KEYFILE = /path/to/sslkeyfile.key
DONATION_ADDRESS = 157v67atJjnx7Fdi2wmcBBpChugHNmDWup
BANNER_FILE = /path/to/file.banner



Anyway, yes, if I understood your question correctly, docker does allow you to do that. You just need to add parameters on your script. Three posts above, @ETFbitcoin included the DONATION_ADDRESS param. You can do the same for the banner:

Code:
-e BANNER_FILE=LOCATION_OF_YOUR_BANNER_FILE

Note that the location starts from the electrumx data directory which means that if you enter BANNER_FILE=banner.txt, it'll search for /home/user/electrumx:/data/banner.txt

Yeah, that was my question.  I guess it does simplify the installation by using the docker image.  I'm just so used to systemd, and I find it simple to enable a process to run at machine startup.

  ▄▄███████▄███████▄▄▄
 █████████████
▀▀▀▀▀▀████▄▄
███████████████
       ▀▀███▄
███████████████
          ▀███
 █████████████
             ███
███████████▀▀               ███
███                         ███
███                         ███
 ███                       ███
  ███▄                   ▄███
   ▀███▄▄             ▄▄███▀
     ▀▀████▄▄▄▄▄▄▄▄▄████▀▀
         ▀▀▀███████▀▀▀
░░░████▄▄▄▄
░▄▄░
▄▄███████▄▀█████▄▄
██▄████▌▐█▌█████▄██
████▀▄▄▄▌███░▄▄▄▀████
██████▄▄▄█▄▄▄██████
█░███████░▐█▌░███████░█
▀▀██▀░██░▐█▌░██░▀██▀▀
▄▄▄░█▀░█░██░▐█▌░██░█░▀█░▄▄▄
██▀░░░░▀██░▐█▌░██▀░░░░▀██
▀██
█████▄███▀▀██▀▀███▄███████▀
▀███████████████████████▀
▀▀▀▀███████████▀▀▀▀
▄▄██████▄▄
▀█▀
█  █▀█▀
  ▄█  ██  █▄  ▄
█ ▄█ █▀█▄▄█▀█ █▄ █
▀▄█ █ ███▄▄▄▄███ █ █▄▀
▀▀ █    ▄▄▄▄    █ ▀▀
   ██████   █
█     ▀▀     █
▀▄▀▄▀▄▀▄▀▄▀▄
▄ ██████▀▀██████ ▄
▄████████ ██ ████████▄
▀▀███████▄▄███████▀▀
▀▀▀████████▀▀▀
█████████████LEADING CRYPTO SPORTSBOOK & CASINO█████████████
MULTI
CURRENCY
1500+
CASINO GAMES
CRYPTO EXCLUSIVE
CLUBHOUSE
FAST & SECURE
PAYMENTS
.
..PLAY NOW!..
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!