This setup has been tested on Raspi 4B 8GB ramm with myNode 0.2.41, but will likely work well independent on the version.
Lets get to it!
1. Login to your terminal.
Code: Select all
ssh admin@mynode.local or ssh admin@your.node.ip.address
2. Switch to Bitcoin user for installation of charge-lnd.
Code: Select all
sudo su - bitcoin
Code: Select all
git clone https://github.com/accumulator/charge-lnd.git
Code: Select all
lncli bakemacaroon offchain:read offchain:write onchain:read info:read --save_to=~/.lnd/data/chain/bitcoin/mainnet/charge-lnd.macaroon
Code: Select all
cd charge-lnd
Code: Select all
pip install -U setuptools
Code: Select all
pip install -r requirements.txt .
Code: Select all
/home/bitcoin/.local/bin/charge-lnd -h

If you see this your charge-lnd is installed correctly and we can continue.
9. Exit bitcoin user and create default config file.
Code: Select all
exit
sudo nano /home/bitcoin/charge-lnd/charge.config
You could use something like this for start:
Code: Select all
[default]
strategy = static
base_fee_msat = 1_000
fee_ppm = 100
# 'default' is special, it is used if no other policy matches a channel
[proportional]
chan.min_ratio = 0.1
chan.max_ratio = 0.9
strategy = proportional
min_fee_ppm = 100
max_fee_ppm = 1000
# 'proportional' can also be used to auto balance (lower fee rate when low remote balance & higher rate when higher remote balance)
# fee_ppm decreases linearly with the channel balance ratio (min_fee_ppm when ratio is 1, max_fee_ppm when ratio is 0)
For complete list of charge-lnd policies please see this example and REadme
11. Once you have your policies ready you can try to run --dry-run (doesn't actually apply changes) and see how your fees would be changed.
Code: Select all
sudo -u bitcoin /home/bitcoin/.local/bin/charge-lnd -c /home/bitcoin/charge-lnd/charge.config --dry-run
Code: Select all
sudo -u bitcoin /home/bitcoin/.local/bin/charge-lnd -c /home/bitcoin/charge-lnd/charge.config
Code: Select all
sudo su bitcoin
Code: Select all
crontab -e
Code: Select all
0 */2 * * * /home/bitcoin/.local/bin/charge-lnd -c /home/bitcoin/charge-lnd/charge.config
Save and done!
Congratulation! Your node is now adjusting fees automatically.
Please make sure you still check your fees for couple of days before you are sure all your settings are correct to avoid errors leading in bad fee settings.
If you find any mistakes or something not working correctly please let me know and I will do my best to correct.
Hope you will find this useful.
LNG
original article: https://nullcount.com/install-charge-ln ... autopilot/