Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
104 lines (57 sloc) 2.18 KB

Install Lightning Network node

Note

Make sure to follow :ref:`Install CHIPS-cli wallet` first, the CHIPS daemon should be synced!

Clone the lightning repository:

sudo apt-get update && sudo apt-get install -y autoconf automake git build-essential libtool libgmp-dev libsqlite3-dev python python3
git clone https://github.com/jl777/lightning
cd lightning

Build and configure

Make lightning:

make -j2

Set a config file to make your node visible on the lightning explorer:

mkdir ~/.chipsln
cd ~/.chipsln
nano config

The following configuration settings need to be set:

alias=<your unique alias name, visible on ln explorer>
rgb=<RGB color of your node on the ln explorer>
ipaddr=<your public ip address>

Ctrl-x to exit, Y and then Enter to save and exit.

Running the lightning node

Start lightning and let it sync:

cd ~/lightning
lightningd/lightningd --log-level=debug

To make sending commands easier, make a script in /usr/bin:

cd /usr/bin/
sudo nano chipsln-rpc

Add the following:

#!/bin/bash
~/lightning/cli/lightning-cli $1 $2 $3 $4 $5 $6 | jq

Ctrl-x to exit, Y and then Enter to save and exit.

use chmod to make it executable:

sudo chmod +x chipsln-rpc

Let's see if it works

chipsln-rpc getinfo

If it returns your node's id, you're all set. Get a new address to fund your Lightning Node:

chipsln-rpc newaddr

This returns an address, which needs to be funded first in order to open a channel with another node. Join the CHIPS discord to get a small amount of CHIPS

Run the following command to check if your node has funds:

chipsln-rpc listfunds

Optionally, using these two parameters, you can connect to a node visible on the LN explorer

chipsln-rpc connect
chipsln-rpc fundchannel
You can’t perform that action at this time.