Sign inSign up

cyphernode/clightning

By cyphernode

•Updated about 2 years ago

C-Lightning LN node used in Cyphernode

Image
0

50K+

cyphernode/clightning repository overview

⁠C-lightning LN implementation

⁠Assumptions if on RPi

You have a working RPi.⁠

⁠Create lnuser that will run the processes

Log in and:

sudo useradd lnuser

⁠(if not using existing files): Create lightning and bitcoin working directories

mkdir -m 2770 -p ~/lndata
cp config ~/lndata

⁠Apply permissions to working directories

sudo chown -R lnuser:`id -gn` ~/lndata

⁠(if using existing files): Recursively apply permissions to existing files

sudo find ~/lndata -type f -exec chmod g+rw {} \; ; sudo find ~/lndata -type d -exec chmod g+rwx {} \;

⁠Edit file bitcoin.conf (will be .bitcoin/bitcoin.conf)

(replacing btcnode with Bitcoin node IP/name and rpcusername/rpcpassword with RPC username/password)

rpcconnect=btcnode
rpcuser=rpcusername
rpcpassword=rpcpassword
testnet=1
rpcwallet=ln01.dat

⁠Edit file config (will be .lightning/config), using your node alias, color, port and network

alias=SatoshiPortal01
rgb=008000
#port=9735
network=testnet

⁠Build image

docker build -t clnimg -f Dockerfile.arm32v6 .
docker build -t clnimg -f Dockerfile.amd64 .

⁠Start LN server in container

docker run -d --rm --name cln -p 9735:9735 -v /home/pi/lndata:/.lightning clnimg `id -u lnuser`:`id -g lnuser` lightningd

⁠If needed, re-apply permissions to newly created files

sudo find ~/lndata -type f -exec chmod g+rw {} \; ; sudo find ~/lndata -type d -exec chmod g+rwx {} \;

⁠To get the node public key, type

docker logs -f cln
docker exec -it cln lightning-cli getinfo
docker exec -it cln lightning-cli stop

Tag summary

Content type

Image

Digest

sha256:5bc8c085e…

Size

290.8 MB

Last updated

about 2 years ago

docker pull cyphernode/clightning:v24.08