- These code snippets assume running on ubuntu server native (not docker or umbrell and such).
- CLN has great documentation
- if lightning-cli is in PATH:
echo "alias cln='lightning-cli'" >> ~/.bash_aliases && source ~/.bash_aliases
- or absolute path:
echo "alias cln='/path/to/lightning-cli'" >> ~/.bash_aliases && source ~/.bash_aliases
curl https://raw.githubusercontent.com/urza/cln/main/cln.bash-completion > cln.bash-completion
sudo cp cln.bash-completion /etc/bash_completion.d/cln.bash-completion
restart your terminal session
then test:
cln set[tab tab]
should offer you
setchannel setconfig setleaserates setpsbtversion
(understand your fees)
cln setchannel short_chan_id base_fee ppm_fee
PPM | % |
---|---|
10 ppm | 0.001% |
100 ppm | 0.01% |
500 ppm | 0.05% |
1000 ppm | 0.1% |
10_000 ppm | 1% |
Millisatoshis are annoying. Luckily in most places when working with lightning-cli you can provide amount as sats or even btc using "sat" or "btc" suffix.
For example:
cln invoice 50000sat label_test_77 description_test