Run a Bitcoin Lightning Node on CentOS 7

Oh Dear monitors your entire site, not just the homepage. We crawl and search for broken pages and mixed content, send alerts when your site is down and notify you on expiring SSL certificates.

Start your free 10 day trial! »

Profile image of Mattias Geniar

Mattias Geniar, February 25, 2019

Follow me on Twitter as @mattiasgeniar

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
$ 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

Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.