Supported Feathercoin client versions: Current production Version: 0.16.0.

Old Production Version: 0.13.2

Info: If you have problems to post, create one post in the ‘newbies’ category and try again. If you have further problems, find support under Guides or use the shoutbox

[Guide] Setup Feathercoin Electrum-X Server Centos 7


  • Moderators

    Hey Guys,

    This guide has been adapted from guide @lclc_ wrote for Ubuntu here:
    https://forum.feathercoin.com/topic/9626/guide-setup-an-electrumx-feathercoin-server

    This guide assumes you are running a full node already, if you need to get a full node setup on Centos 7 Please follow the guide I wrote here:
    https://forum.feathercoin.com/topic/8392/guide-create-a-full-node-and-build-feathercoin-v0-16-on-centos-7/7

    I also assume you have another user besides root, for this guide I use the user “electrumx”


    Install Firewalld + Fail2Ban

    yum -y install epel-release
    yum -y install firewalld fail2ban-firewalld
    

    Configure fail2ban

    The configuration files for fail2ban are stored in /etc/fail2ban/. In order to avoid problems when updating fail2ban, lets add our local changes to a jail_ssh.local file located in that directory. Open a new text file /etc/fail2ban/jail_ssh.local using an editor you are comfortable with.

    sudo vi /etc/fail2ban/jail_ssh.local
    

    Paste the following two lines into the file and save it.

    [sshd]
    enabled = true
    

    Start up the fail2ban.service using systemctl.

    sudo systemctl start fail2ban.service
    
    sudo systemctl enable fail2ban.service
    

    ElectrumX-Server

    Start by grabbing the source files from git

    cd /usr/src
    git clone https://github.com/kyuupichan/electrumx.git
    cd electrumx
    

    Dependencies

    sudo yum -y update
    sudo yum -y install yum-utils
    sudo yum -y groupinstall development
    sudo yum install -y https://centos7.iuscommunity.org/ius-release.rpm
    
    sudo yum -y install python36u python36u-devel leveldb-devel python36u-pip python36u-setuptools
    sudo pip3.6 install --upgrade pip
    sudo pip3.6 install plyvel
    

    Install electrum-x server

    sudo python3.6 setup.py install
    

    Make a db folder for your electrum-x server

    mkdir -p /home/electrumx/.electrumx/db
    

    Create an SSL certificate for Electrum-X to use

    openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
    openssl rsa -passin pass:x -in server.pass.key -out /home/electrumx/.electrumx/server.key
    
    rm server.pass.key
    

    Don’t set a password in the next step !

    openssl req -new -key /home/electrumx/.electrumx/server.key -out /home/electrumx/.electrumx/server.csr
    
    openssl x509 -req -days 1825 -in /home/electrumx/.electrumx/server.csr -signkey /home/electrumx/.electrumx/server.key -out /home/electrumx/.electrumx/server.crt
    

    Create Banner File for Elexctrum-X Server

    Edit the below and then paste into your console/terminal, (adjust as needed) :

    cat << EOT > /home/electrumx/.electrumx/banner_file.txt
    
    **** Feathercoin.Network - Hosted for the community ****
    
    Feathercoin Version: \$DAEMON_VERSION
    Feathercoin Subversion: \$DAEMON_SUBVERSION
    
    ElectrumX Server Version: \$SERVER_VERSION
    ElectrumX Server Subversion: \$SERVER_SUBVERSION
    
    EOT
    

    Create electrumx config

    Create the following file and be sure to edit the below info with your own details.
    DAEMON_URL = make sure you put your own rpc username/password
    DONATION_ADDRESS = make sure you put your own donation addresss
    REPORT_HOST = the public domain name you’re going to use (eg. Electrum.Feathercoin.com)

    cat << EOT > /home/electrumx/.electrumx/electrumx.conf
    COIN = Feathercoin
    DB_DIRECTORY = /home/electrumx/.electrumx/db
    DAEMON_URL = http://YourFeathercoinRPCUser:[email protected]
    NET = mainnet
    DB_ENGINE = leveldb
    HOST = 
    TCP_PORT = 50001
    SSL_PORT = 50002
    SSL_CERTFILE=/home/electrumx/.electrumx/server.crt
    SSL_KEYFILE=/home/electrumx/.electrumx/server.key
    BANNER_FILE = /home/electrumx/.electrumx/banner_file.txt
    DONATION_ADDRESS = YourDonationAddressHere
    REPORT_HOST = ElectrumX.YourDomainName.com
    EOT
    

    Setup systemd file (auto-start on boot & auto-restart)

    Create the following file:

    sudo bash -c " cat << EOT > /etc/systemd/system/electrumx.service
    [Unit]
    Description=Electrumx
    After=network.target
    
    [Service]
    User=electrumx
    Group=electrumx
    
    EnvironmentFile=/home/electrumx/.electrumx/electrumx.conf
    ExecStart=/usr/bin/electrumx_server.py
    LimitNOFILE=8192
    TimeoutStopSec=30min
    
    [Install]
    WantedBy=multi-user.target
    EOT"
    
    Install systemd script
    sudo systemctl daemon-reload
    
    Start systemd service
    sudo systemctl start electrumx.service
    
    Enable autostart on boot for systemd service
    sudo systemctl enable electrumx.service
    
    Check systemd service is running fine
    sudo systemctl status electrumx.service
    sudo journalctl -u electrumx -f
    
    Watch the DB sync process and check for errors
    sudo tail -f -n 50 /var/log/messages
    

    Open Ports for Electrum-X Server

    sudo firewall-cmd --zone=public --add-port=50001/tcp --permanent
    sudo firewall-cmd --zone=public --add-port=50002/tcp --permanent
    
    sudo firewall-cmd --reload
    sudo firewall-cmd --list-all
    

    I hope this helps someone.

    Credit to @lclc_ for most of the steps 🙂



  • Nice! Thanks for the guide.

    I already see one more new ElectrumX server in my client: electrumx-us-1.realbotlife.com

    I guess it’s from @peschu ? 🙂



  • @lclc_ said in [[Guide] Setup Feathercoin Electrum-X Server Centos 7]

    I guess it’s from @peschu ? 🙂

    Yes! 🙂 I used the naming convention of feathercoin servers. the datacenter is located in the us…looks a bit more international 😉



  • @peschu very nice. Thanks for supporting the network, providing more choice and making Feathercoin more decentralized with that 🙂


 

Looks like your connection to Feathercoin Forum was lost, please wait while we try to reconnect.