Run a Bitcoin Lightning Node on CentOS 7

Mattias Geniar, Monday, February 25, 2019

Similar to installing a Bitcoin Core full node, you can run a Lightning Node too. The same developer dependencies are needed.

Prepare your build environment to compile the Lightning Node

The next steps will install a compiler and all development libraries needed to compile a Lightning Network node.

$ yum -y install epel-release

Once EPEL is installed (which adds additional repositories), you can install all needed dependencies.

$ yum install -y autoconf automake boost-devel gcc-c++ git libdb4-cxx libdb4-cxx-devel libevent-devel libtool openssl-devel wget libsodium-devel gmp-devel sqlite-devel python34 asciidoc clang python2-devel pythong34-devel python34-pip

Next, compile the Lightning Network node.

Compile a Lightning Network node from source

With all dependencies in place, it's time to compile a Lightning Network node. I'll start by creating a custom user that will run the daemon.

$ useradd lightning
$ su - lightning

Now, while running as the new lightning user, clone & compile the project.

$ git clone https://github.com/ElementsProject/lightning.git
$ cd lightning
$ git checkout v0.6.3
$ ./configure
$ make -j $(nproc)

The above downloads and builds version 0.6.3 of the Lightning Network daemon, for a full list of available releases check out their github release page.

Once compiled, you'll find the lightning daemon in lightning/lightningd.

$ lightningd/lightningd --version
v0.6.3


Hi! My name is Mattias Geniar. I'm a Support Manager at Nucleus Hosting in Belgium, a general web geek & public speaker. Currently working on DNS Spy & Oh Dear!. Follow me on Twitter as @mattiasgeniar.

Share this post

Did you like this post? Will you help me share it on social media? Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *