lndash is a simple read-only web dashboard for lnd - Lightning Network Daemon
- Peer view
- Channel view
- Forwarding Events (routed payments) view
- Looking Glass Tool (route/path lookup)
- Lightning Network Graph
This guide was written on a Debian system.
- Clone lndash repository and enter the project directory:
git clone https://github.com/djmelik/lndash.git
cd lndash
- Install required dependencies for virtualenv, set it up and activate:
sudo apt-get install python3-pip python3-virtualenv virtualenv
virtualenv -p python3 venv
source venv/bin/activate
Make sure you have installed Python 3 virtualenv, not Python 2 as this is not supported.
- Install python libs & dependencies into running virtualenv:
pip install -r requirements.txt
- Copy the tls certificate and readonly macaroon from lnd to lndash config directory:
cp ~/.lnd/tls.cert config/tls.cert
cp ~/.lnd/data/chain/bitcoin/mainnet/readonly.macaroon config/readonly.macaroon
- (Optional) If lnd is installed on a remote host, define an environment variable pointing to that host:
export LNDASH_LND_SERVER="127.0.0.1:10009"
- Run the application:
gunicorn main:app
If you want gunicorn to listen on all interfaces and/or change the port, run the application using the following:
gunicorn main:app -b 0.0.0.0:8080
Run the following command in the lndash
directory:
docker build -t lndash:latest .
This will build the docker container and give it the tag lndash
.
Three things need to be configured to run the lndash
docker container.
- The path to the TLS certificate
- The path to the readonly macaroon
- The port on which the web app should listen
- The LND server's RPC addres
These can all be configured via the docker command line, as follows:
docker run -d --restart -v=$HOME/.lnd/tls.cert:/usr/src/app/config/tls.cert -v=$HOME/.lnd/data/chain/bitcoin/mainnet/readonly.macaroon:/usr/src/app/config/readonly.macaroon -p 80:8000 -e LNDASH_LND_SERVER="192.168.1.2:10009" lndash:latest
The above command line assumes tls.cert
and readonly.macaroon
are stored at these locations and that the LND server is available on port 10009 at IP address 192.168.1.2. It makes the lndash
server available on port 80. Change these values as needed.
You can set up an nginx reverse proxy and publicly expose your lndash instance.
Note: need to write these instructions.