How to compact your LND node's database
Posted almost 3 years ago by StackingSomeSats
Uncompacted databases may cause issues for routing nodes such as gigabytes of space used on channels.db, and may lead to slowness of more than 20 seconds above average for transactions if it gets bad enough.
- Edit lnd.conf (use nano)
- Umbrel: `~/umbrel/lnd/lnd.conf`
- RaspiBlitz: `/mnt/hdd/lnd/lnd.conf`
- Add the following code:
[bolt] db.bolt.auto-compact=true db.bolt.auto-compact-min-age=0
- Restart lnd
- Umbrel: `cd ~/umbrel; docker-compose restart lnd`
- RaspiBlitz: `sudo systemctl restart lnd`
- Wait for a minute or two.
- (Optional) If you do not want LND to compact on every restart, replace `db.bolt.auto-compact=true` with `db.bolt.auto-compact=false`
2 Comments
DonKingLN wrote over 2 years ago
On RaspiBlitz you can check the LND channel.db size by running:
sudo du -h /mnt/hdd/lnd/data/graph/mainnet/channel.db
Tr4ck3r wrote almost 2 years ago
The path of the lnd.conf file is:
umbrel/app-data/lightning/data/lnd/
Please login to post comments.
Latest news
Status update on StackingSomeSats
Posted almost 3 years ago