charge-lnd
More info at: https://github.com/accumulator/charge-lnd
Install:
1
sudo su - bitcoin
2
git clone https://github.com/accumulator/charge-lnd.git
3
lncli bakemacaroon offchain:read offchain:write onchain:read info:read --save_to=~/.lnd/data/chain/bitcoin/mainnet/charge-lnd.macaroon
4
cd charge-lnd
5
pip install -U setuptools && pip install -r requirements.txt .
Copied!
Paste to create the and example config at home/bitcoin/charge-lnd/charge.config :
1
echo "
2
[default]
3
strategy = static
4
base_fee_msat = 1000
5
fee_ppm = 1000
6
time_lock_delta = 144
7
8
[exchanges-drain-sats]
9
node.id = 033d8656219478701227199cbd6f670335c8d408a92ae88b962c49d4dc0e83e025, 03cde60a6323f7122d5178255766e38114b4722ede08f7c9e0c5df9b912cc201d6,037f990e61acee8a7697966afd29dd88f3b1f8a7b14d625c4f8742bd952003a590,03cde60a6323f7122d5178255766e38114b4722ede08f7c9e0c5df9b912cc201d6,033d8656219478701227199cbd6f670335c8d408a92ae88b962c49d4dc0e83e025, 021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d
10
strategy = static
11
base_fee_msat = 50000
12
fee_ppm = 2500
13
time_lock_delta = 144
14
15
[discourage-routing]
16
chan.max_ratio = 0.10
17
chan.min_capacity = 250000
18
strategy = static
19
base_fee_msat = 1000
20
fee_ppm = 2000
21
time_lock_delta = 144
22
23
[encourage-routing]
24
chan.min_ratio = 0.90
25
chan.min_capacity = 250000
26
strategy = static
27
base_fee_msat = 1000
28
fee_ppm = 10
29
time_lock_delta = 144
30
31
" | sudo -u bitcoin tee /home/bitcoin/charge-lnd/charge.config
Copied!
Set up a cronjob with: crontab -e Run every 5 minutes (https://crontab.guru/#/5_*_):
1
*/5 * * * * sudo -u bitcoin /home/bitcoin/.local/bin/charge-lnd -c /home/bitcoin/charge-lnd/charge.config
Copied!

gist with more examples:

https://gist.github.com/openoms/9d0c554f620f4584c17bec268d4519e8
Last modified 26d ago
Copy link