Bitcoin Forum
May 05, 2024, 07:26:00 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need help setting up ElectrumX  (Read 2211 times)
ranochigo (OP)
Legendary
*
Offline Offline

Activity: 2954
Merit: 4166


View Profile
February 01, 2017, 01:14:51 PM
 #1

I need someone to give me the commands and provide me help to setup my own ElectrumX server. I will offer 0.01BTC as a bounty.

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
1714937160
Hero Member
*
Offline Offline

Posts: 1714937160

View Profile Personal Message (Offline)

Ignore
1714937160
Reply with quote  #2

1714937160
Report to moderator
1714937160
Hero Member
*
Offline Offline

Posts: 1714937160

View Profile Personal Message (Offline)

Ignore
1714937160
Reply with quote  #2

1714937160
Report to moderator
1714937160
Hero Member
*
Offline Offline

Posts: 1714937160

View Profile Personal Message (Offline)

Ignore
1714937160
Reply with quote  #2

1714937160
Report to moderator
"In a nutshell, the network works like a distributed timestamp server, stamping the first transaction to spend a coin. It takes advantage of the nature of information being easy to spread but hard to stifle." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714937160
Hero Member
*
Offline Offline

Posts: 1714937160

View Profile Personal Message (Offline)

Ignore
1714937160
Reply with quote  #2

1714937160
Report to moderator
shorena
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1499


No I dont escrow anymore.


View Profile WWW
February 01, 2017, 01:25:25 PM
 #2

I have yet do set one up, but I think these are pretty good.

-> https://github.com/spesmilo/electrum-server/blob/master/INSTALL
-> https://github.com/spesmilo/electrum-server/blob/master/HOWTO.md

Im not really here, its just your imagination.
altcoinhosting
Hero Member
*****
Offline Offline

Activity: 896
Merit: 1005


View Profile
February 01, 2017, 01:26:19 PM
Last edit: February 01, 2017, 02:06:34 PM by altcoinhosting
 #3

Disclaimer: i didn't install electumx on a plain vanilla server (the server was installed several months before installing electrumx and already had a complete python3 environment on it at the time of electrumx installation), it was a while ago so i cannot remember all the steps, so in the end, steps might still be missing and i take no reponsability if something goes horribly wrong...

Good luck!





I need someone to give me the commands and provide me help to setup my own ElectrumX server. I will offer 0.01BTC as a bounty.


I have electrumX running on ubuntu 16.04.1. It's already running for 1-2 weeks (don't remember exactly).

My installation was done on a server that was previously configured for python development, so i don't know if a plain vanilla installation will be sufficient (it's possible that i manually installed python3, the python development environment, even some dependancies a long time ago). I do remember it wasn't that easy to get everything running, and i cannot give you a full log of the installation... So i'm going to give you whatever i remember, hope that's enough.
BTW: i'm not doing this for the reward... I'm running electrumx for the community, and have over 200 connected concurrent sessions 24/7, so extra electrumx servers would be welcome to lower the load Smiley
BTW²=> don't expect much donations tough... I ran a regular electrum server for a while, and an electrumx server now, and the donations don't even cover 1% of the costs... Only run one to support the community Smiley

It was pretty much installing bitcoind.

Code:
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt update
sudo apt install bitcoind

you might even need something like apt-get install software-properties-common in order to install add-apt-repository

I have the following bitcoind.conf:
Code:
rpcuser=altcoinhosting
rpcpassword=[not going to tell you my password]
daemon=1
txindex=1
addressindex=1
spentindex=1
server=1



Afterwards, i installed the prereqs from https://github.com/kyuupichan/electrumx/blob/master/docs/HOWTO.rst#prerequisites
I installed most of them using pip, altough some of them were rather tricky (you need a correct environment, sometimes even -dev packages to get all the dependancies running).

Code:
wget https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install [name of the prereq here]
in case of an error => google is your friend

I don't know if i installed all prereqs using pip, you can also do
Code:
apt-cache search prereqname
apt-get install nameofthepackagefrompreviouscommand

Then i created a user with sudo privileges, i cloned the electrumx repo (don't forget to apt-get install git) and did sudo python setup.py install
I also used the same user to start the bitcoind, i added a startup of the bitcoind to my crontab (@reboot bitcoind -daemon)

I then followed the instructions for using systemd (https://github.com/kyuupichan/electrumx/blob/master/docs/HOWTO.rst#using-systemd)

you have to edit  /etc/systemd/system/electrumx.service and setup the correct user
Here is mine:

Code:
[Unit]
Description=Electrumx
After=network.target

[Service]
EnvironmentFile=/etc/electrumx.conf
ExecStart=/usr/local/bin/electrumx_server.py
User=electrumx
LimitNOFILE=8192
TimeoutStopSec=30min

[Install]
WantedBy=multi-user.target

next, i made 2 files:
/etc/electrumx.conf

Code:
DB_DIRECTORY = /electrumx
DAEMON_URL = http://altcoinhosting:[not going to tell you my password]@localhost:8332/
ELECTRUMX = /usr/local/bin/electrumx_server.py
USERNAME = electrumx
COIN = Bitcoin
NET = mainnet
DB_ENGINE = leveldb
REORG_LIMIT = 200
DONATION_ADDRESS = 1d92FUSg7wUafUi77R6yjUpZVhTMKpzuQ
BANNER_FILE = /etc/electrumx.banner
HOST = [private info, but the ip of my server]
TCP_PORT = 50001
SSL_PORT = 50002
SSL_CERTFILE = /etc/server.crt
SSL_KEYFILE = /etc/server.key
IRC = 1
REPORT_HOST =  [private info, but the fqdn of my server]

In order to generate the server.crt and server.key => Not completely secure, but otherwise you have to type in your password each time you start the service

Code:
openssl genrsa -des3 -out serversecure.key 2048
openssl rsa -in serversecure.key -out server.key
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

is a second file /etc/electrumx.banner
You can write whatever you want in there, it will be shown in the console window
You can read the BANNER_FILE section of https://github.com/kyuupichan/electrumx/blob/master/docs/ENVIRONMENT.rst to look at the variables you're allowed to use inside this banner file...

Now, let bitcoind sync, you can monitor by using tail -f ~/.bitcoin/debug.log

I personally use leveldb, and my data directory is /electrumx (make sure it's owned by your normal user).
After bitcoind is sync'ed, you could fire up electrumx by "systemctl start electrumx", but it takes ages to sync... A trick is:
=> go https://jdubya.info/electrum/ElectrumX/, copy the link for the latest leveldb database,
=> go to /electrumx (or whereever your datafolder is) => download the latest tar.gz, unpack in the root of the folder

If you're unsure where to unpack, let electrumx sync for 10-15 minutes, stop electrumx (systemctl stop electrumx), look at the directory structure and overwrite with the downloaded, unpacked files.

Last but not least, these commands will come in handy Wink
systemctl start electrumx
systemctl stop electrumx
service electrumx status
journalctl -u electrumx -f
systemctl enable electrumx
tail -f /var/log/syslog | grep -i electrumx

JWU42
Legendary
*
Offline Offline

Activity: 1666
Merit: 1000


View Profile
April 23, 2017, 11:18:16 AM
 #4

Just looking through logs and saw this post linking to my Electrum DB backups.

I am not updating leveldb as often and shifted more towards RocksDB.  Further, with the very short sync time for building the ElectrumX DB (versus the prior python electrum-server) the need for DB downloads is far diminished.

That said, I'll keep posting them every few weeks if that helps.

altcoinhosting
Hero Member
*****
Offline Offline

Activity: 896
Merit: 1005


View Profile
April 24, 2017, 11:09:45 AM
 #5

Just looking through logs and saw this post linking to my Electrum DB backups.

I am not updating leveldb as often and shifted more towards RocksDB.  Further, with the very short sync time for building the ElectrumX DB (versus the prior python electrum-server) the need for DB downloads is far diminished.

That said, I'll keep posting them every few weeks if that helps.

You're doing a great job Smiley
It's been a while since i last setup electrumx, but IIRC, your backups did shave a couple of days off my initial sync... It's true the sync time is a lot lower compared to the "old" electrum server, i still think it's still relatively slow, and your backups do help new users Smiley

JWU42
Legendary
*
Offline Offline

Activity: 1666
Merit: 1000


View Profile
April 25, 2017, 11:03:24 AM
 #6

Just looking through logs and saw this post linking to my Electrum DB backups.

I am not updating leveldb as often and shifted more towards RocksDB.  Further, with the very short sync time for building the ElectrumX DB (versus the prior python electrum-server) the need for DB downloads is far diminished.

That said, I'll keep posting them every few weeks if that helps.

You're doing a great job Smiley
It's been a while since i last setup electrumx, but IIRC, your backups did shave a couple of days off my initial sync... It's true the sync time is a lot lower compared to the "old" electrum server, i still think it's still relatively slow, and your backups do help new users Smiley

Happy to help  Smiley

Pages: [1]
  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!