Lightning Terminal

Lightning Terminal on FreeBSD

https://github.com/lightninglabs/lightning-terminal/blob/master/doc/compile.md

Install

1
bash
2
VERSION=v0.6.1-alpha
3
pkg install -y gmake git go node14 yarn-node14 python2
4
export GOROOT=/usr/local/go
5
mkdir ~/.gopkg
6
export GOPATH=/root/.gopkg
7
fetch https://github.com/lightninglabs/lightning-terminal/archive/refs/tags/$VERSION.tar.gz
8
tar -xvf $VERSION.tar.gz
9
cd lightning-terminal-${VERSION:1}
10
gmake install
11
cd
12
rm -r lightning-terminal-${VERSION:1}
Copied!
The binary will be installed in:
1
/root/go/bin/litd
Copied!

Config file

adapted from the RaspiBlitz (same setup with separate LND):
1
nano /root/.lit/lit.conf
Copied!
1
# Takes:
2
UIPASSWORD=
3
RPCUSER=
4
RPCPASSWORD=
Copied!
1
# Application Options
2
httpslisten=0.0.0.0:8443
3
uipassword=$UIPASSWORD
4
#lit-dir=/home/lit/.lit
5
6
# Remote options
7
remote.lit-debuglevel=info
8
9
# Remote lnd options
10
remote.lnd.rpcserver=127.0.0.1:10009
11
remote.lnd.macaroonpath=/var/db/lnd/data/chain/bitcoin/mainnet/admin.macaroon
12
remote.lnd.tlscertpath=/var/db/lnd/tls.cert
13
14
# Loop
15
loop.loopoutmaxparts=5
16
loop.server.proxy=127.0.0.1:9050
17
18
# Pool
19
pool.newnodesonly=true
20
pool.proxy=127.0.0.1:9050
21
22
# Faraday
23
faraday.min_monitored=48h
24
25
# Faraday - bitcoin
26
faraday.connect_bitcoin=true
27
faraday.bitcoin.host=localhost
28
faraday.bitcoin.user=$RPCUSER
29
faraday.bitcoin.password=$RPCPASSWORD
Copied!

Service file

1
nano /usr/local/etc/rc.d/litd
Copied!
1
#!/bin/sh
2
#
3
# PROVIDE: litd
4
# REQUIRE: bitcoind tor lnd
5
# KEYWORD:
6
7
. /etc/rc.subr
8
9
name="litd"
10
rcvar="litd_enable"
11
12
litd_command="/root/go/bin/litd"
13
pidfile="/var/run/${name}.pid"
14
command="/usr/sbin/daemon"
15
command_args="-P ${pidfile} -r -f ${litd_command}"
16
17
load_rc_config $name
18
: ${litd_enable:=no}
19
20
run_rc_command "$1"
Copied!

Tor Hidden Service

1
HiddenServiceDir /var/db/tor/litd
2
HiddenServiceVersion 3
3
HiddenServicePort 443 127.0.0.1:8443
Copied!
  • read the Hidden Service
1
cat /var/db/tor/litd/hostname
Copied!

Start

1
service litd enable
2
service litd start
Copied!

Logs

1
tail -f .lit/logs/mainnet/litd.log
Copied!
Log in to the webUI at:
1
https://JAIL_LOCAL_IP:8443
Copied!

Update

1
bash
2
VERSION=v0.6.7-alpha
3
pkg update
4
pkg upgrade -y
5
export GOROOT=/usr/local/go
6
mkdir ~/.gopkg
7
export GOPATH=/root/.gopkg
8
fetch https://github.com/lightninglabs/lightning-terminal/archive/refs/tags/$VERSION.tar.gz
9
tar -xvf $VERSION.tar.gz
10
cd lightning-terminal-${VERSION:1}
11
service litd stop
12
rm /root/go/bin/lit*
13
rm /root/.gopkg/bin/lit*
14
gmake install
15
service litd start
16
cd
17
rm -r lightning-terminal-${VERSION:1}
Copied!
The binary will be installed in:
1
/root/go/bin/litd
Copied!
or in
1
/root/.gopkg/bin/
Copied!
In the second case create symlinks:
1
ln -s /root/.gopkg/bin/litd /root/go/bin/
2
ln -s /root/.gopkg/bin/litcli /root/go/bin/
Copied!