lndg
rebalance-lnd
lndg | rebalance-lnd | |
---|---|---|
8 | 22 | |
207 | 342 | |
- | - | |
8.2 | 6.2 | |
7 days ago | 12 days ago | |
Python | Python | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
lndg
- LNDg not rebalancing
-
LNDg v1.5.0: async rebalancing
It's in the new version: https://github.com/cryptosharks131/lndg/releases/tag/v1.5.0
-
π MiniBolt resources π List of the MiniBolt core/bonus guides + latest versions
lndg v1.4.0 (Released: 20th November 2022) - https://github.com/cryptosharks131/lndg/releases
-
channel growth
I'm looking for channel growth. People who are willing to connect to my node (Stinger32LND). The requirements are easy; a base fee set to zero, a Time Lock Delta of 40 or less, and an HTLC of no more than 1000. One last thing, give "LNDg" an opportunity to run your node. I enjoyed it. :-)
-
β‘ RaspiBolt Improvement Proposals (RBIPs) & Bounties π°
A lite GUI web interface to analyze lnd data and manage your node with automation: https://github.com/cryptosharks131/lndg
- LNDg not Styled / no css
-
clboss alternative for LND?
LNDg
-
LNDg Install Guide
Configure firewall for LNDg ============================== $ sudo ufw allow 8889/tcp comment 'allow LNDg SSL' $ sudo ufw status Install python and uwsgi ======================== $ sudo apt install -y python3-dev build-essential python virtualenv uwsgi Create user account for LNDg ============================ $ sudo adduser --disabled-password --gecos "" lndg $ sudo usermod -a -G lnd lndg $ sudo usermod -a -G www-data lndg $ sudo su - lndg $ ln -s /data/lnd /home/lndg/.lnd Install LNDg ============ $ git clone https://github.com/cryptosharks131/lndg.git $ cd lndg $ virtualenv -p python3 .venv $ .venv/bin/pip install -r requirements.txt $ .venv/bin/python initialize.py (Make sure lnd has started) $ .venv/bin/python jobs.py (Creates initial data set) (Start development server) $ .venv/bin/python manage.py runserver 0.0.0.0:8889 (Check site at http://X.X.X.X:8889 Login:lndg-admin Password:/home/lndg/lndg/data/lndg-admin.txt ctrl-c to exit) $ .venv/bin/python -m pip install uwsgi (If install fails, uninstall and try again: $ .venv/bin/python -m pip uninstall uwsgi) Create ini file =============== $ vi /home/lndg/lndg/lndg.ini (Paste below) # lndg.ini file [uwsgi] # Django-related settings # the base directory (full path) chdir = /home/lndg/lndg # Django's wsgi file module = lndg.wsgi # the virtualenv (full path) home = /home/lndg/lndg/.venv #location of log files logto = /var/log/uwsgi/%n.log # process-related settings # master master = true # maximum number of worker processes processes = 1 # the socket (use the full path to be safe socket = /home/lndg/lndg/lndg.sock # ... with appropriate permissions - may be needed chmod-socket = 660 # clear environment on exit vacuum = true Create uwsgi parameter file =========================== $ vi /home/lndg/lndg/uwsgi_params (Paste below) uwsgi_param QUERY_STRING $query_string; uwsgi_param REQUEST_METHOD $request_method; uwsgi_param CONTENT_TYPE $content_type; uwsgi_param CONTENT_LENGTH $content_length; uwsgi_param REQUEST_URI "$request_uri"; uwsgi_param PATH_INFO "$document_uri"; uwsgi_param DOCUMENT_ROOT "$document_root"; uwsgi_param SERVER_PROTOCOL "$server_protocol"; uwsgi_param REQUEST_SCHEME "$scheme"; uwsgi_param HTTPS "$https if_not_empty"; uwsgi_param REMOTE_ADDR "$remote_addr"; uwsgi_param REMOTE_PORT "$remote_port"; uwsgi_param SERVER_PORT "$server_port"; uwsgi_param SERVER_NAME "$server_name"; Create uwsgi service ==================== $ exit (return to admin account) $ sudo vi /etc/systemd/system/uwsgi.service (Paste below) [Unit] Description=Lndg uWSGI app [Service] ExecStart=/home/lndg/lndg/.venv/bin/uwsgi --ini /home/lndg/lndg/lndg.ini User=lndg Group=www-data Restart=on-failure KillSignal=SIGQUIT Type=notify StandardError=syslog NotifyAccess=all [Install] WantedBy=sockets.target Configure LNDg nginx site ========================= $ sudo vi /etc/nginx/sites-available/lndg-ssl.conf (Paste below) upstream django { server unix:///home/lndg/lndg/lndg.sock; # for a file socket } server { # the port your site will be served on, use port 80 unless setting up ssl certs, then 443 listen 8889 ssl; listen [::]:8889 ssl; ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt; ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key; ssl_session_timeout 4h; ssl_protocols TLSv1.3; ssl_prefer_server_ciphers on; # the domain name it will serve for server_name _; # you can substitute your node IP address or a custom domain like lndg.local (just make sure to update your local hosts file) charset utf-8; # max upload size client_max_body_size 75M; # adjust to taste # max wait for django time proxy_read_timeout 180; # Django media location /static { alias /home/lndg/lndg/gui/static; # your Django project's static files - amend as required } # Finally, send all non-media requests to the Django server. location / { uwsgi_pass django; include /home/lndg/lndg/uwsgi_params; # the uwsgi_params file } } Enable site and create log and sock files ========================================= $ sudo ln -sf /etc/nginx/sites-available/lndg-ssl.conf /etc/nginx/sites-enabled/ $ sudo touch /var/log/uwsgi/lndg.log $ sudo chgrp www-data /var/log/uwsgi/lndg.log $ sudo chmod 660 /var/log/uwsgi/lndg.log $ sudo touch /home/lndg/lndg/lndg.sock $ sudo chown lndg:www-data /home/lndg/lndg/lndg.sock $ sudo chmod 660 /home/lndg/lndg/lndg.sock $ sudo nginx -t $ sudo systemctl enable nginx (It should have been enabled during installation, this is just to make sure.) $ sudo systemctl enable uwsgi $ sudo systemctl start uwsgi $ sudo journalctl -f -u uwsgi $ sudo systemctl restart nginx (Test site at https://X.X.X.X:8889) Update admin password ===================== https://X.X.X.X:8889/lndg-admin Notes ===== If you run into the '502 Bad Gateway': 1) Make sure all other services (especially LND) have fully started. This can take some time if you have extras installed. 2) Restart the uwsgi service. a) $ sudo systemctl restart uwsgi 3) Retest the secure site: https://X.X.X.X:8889 If you have other issues connecting to Nginx, double check your config file. 1) $ sudo vi /etc/nginx/nginx.conf Make sure it matches what RaspiBolt recommends. 1) https://raspibolt.org/guide/raspberry-pi/security.html#prepare-nginx-reverse-proxy Enable LNDg jobs ================ $ sudo vi /home/lndg/lndg/jobs.sh (Paste below) #!/bin/bash /home/lndg/lndg/.venv/bin/python /home/lndg/lndg/jobs.py $ sudo chown lndg:lndg /home/lndg/lndg/jobs.sh $ sudo vi /etc/systemd/system/lndg-jobs.service (Paste below) [Unit] Description=Run Jobs For Lndg [Service] User=lndg Group=lndg ExecStart=/usr/bin/bash /home/lndg/lndg/jobs.sh StandardError=append:/var/log/lnd_jobs_error.log $ sudo vi /etc/systemd/system/lndg-jobs.timer (Paste below) [Unit] Description=Run Lndg Jobs Every 20 Seconds [Timer] OnBootSec=300 OnUnitActiveSec=20 AccuracySec=1 [Install] WantedBy=timers.target $ sudo systemctl enable lndg-jobs.timer $ sudo systemctl start lndg-jobs.timer $ sudo systemctl status lndg-jobs.timer $ sudo journalctl -f -u lndg-jobs (Verify service is running) Enable LNDg Rebalancer ====================== $ sudo vi /home/lndg/lndg/rebalancer.sh (Paste below) #!/bin/bash /home/lndg/lndg/.venv/bin/python /home/lndg/lndg/rebalancer.py $ sudo chown lndg:lndg /home/lndg/lndg/rebalancer.sh $ sudo vi /etc/systemd/system/lndg-rebalancer.service (Paste below) [Unit] Description=Run Rebalancer For Lndg [Service] User=lndg Group=lndg ExecStart=/usr/bin/bash /home/lndg/lndg/rebalancer.sh StandardError=append:/var/log/lnd_rebalancer_error.log RuntimeMaxSec=3600 $ sudo vi /etc/systemd/system/lndg-rebalancer.timer (Paste below) [Unit] Description=Run Lndg Rebalancer Every 20 Seconds [Timer] OnBootSec=315 OnUnitActiveSec=20 AccuracySec=1 [Install] WantedBy=timers.target $ sudo systemctl enable lndg-rebalancer.timer $ sudo systemctl start lndg-rebalancer.timer $ sudo systemctl status lndg-rebalancer.timer $ sudo journalctl -f -u lndg-rebalancer (Verify service is running) Enable LNDg HTLC Failure Stream Data ==================================== $ sudo vi /home/lndg/lndg/htlc_stream.sh (Paste below) #!/bin/bash /home/lndg/lndg/.venv/bin/python /home/lndg/lndg/htlc_stream.py $ sudo chown lndg:lndg /home/lndg/lndg/htlc_stream.sh $ sudo vi /etc/systemd/system/lndg-htlc-stream.service [Unit] Description=Run HTLC Stream For Lndg [Service] User=lndg Group=lndg ExecStart=/usr/bin/bash /home/lndg/lndg/htlc_stream.sh StandardError=append:/var/log/lnd_htlc_stream_error.log Restart=on-failure RestartSec=60s [Install] WantedBy=multi-user.target $ sudo systemctl enable lndg-htlc-stream $ sudo systemctl start lndg-htlc-stream $ sudo systemctl status lndg-htlc-stream $ sudo journalctl -f -u lndg-htlc-stream (Verify service is running)
rebalance-lnd
-
Rebalancing Channels
Additionally I use rebalance-lnd to rebalance channels manually. BOS can also rebalance as well as perfectly balanced.
- What can I do with my skill of writing Python in the Bitcoin space?
-
π MiniBolt resources π List of the MiniBolt core/bonus guides + latest versions
rebalance-lnd v2.3 (Released: 17th January 2022) - https://github.com/C-Otto/rebalance-lnd/releases
-
The Lightning Network is fast, but it kinda sucks.
Are you using channel rebalancing tools at all? Like Balance of Satoshis, or rebalance-lnd? I really like the latter.
- Automate balancing with tools, is there good recent tutorial [end of 2022]?
-
LN for merchants, some questions
Take a look at rebalance-lnd: https://github.com/C-Otto/rebalance-lnd
- Lightning Network is User Unfriendly
-
β‘Raspibolt Twice-Monthly Rundown - π Jan 17th, 2022β‘ Guide & software updates, new Github pull requests & issues and other news
rebalance-lnd v2.3: Release page - Upgrade guide
- What actions should I take in RTL to properly balance these channels?
-
β‘ Lightning Thursday! November 25, 2021: Explore the Lightning Network!β‘
There are some tools like this but it is very hard to automate rebalancing since each node market dynamics is different. And it changes constantly. You can automate but you have to constantly update the logic.
What are some alternatives?
RaspiBolt - Bitcoin & Lightning full node on a Raspberry Pi
charge-lnd - charge-lnd is a simple policy based fee manager for LND. With this tool you can set fees to autobalance, recover channel open costs, use on-chain fees as reference, use channel activity to determine fees or just use static fees.
clboss - Automated Core Lightning Node Manager
lndmanage - Channel management tool for lightning network daemon (LND) operators.
lightning - Core Lightning β Lightning Network implementation focusing on spec compliance and performance
balanceofsatoshis - Tool for working with the balance of your satoshis on LND
lightning-terminal - Lightning Terminal: Your Home for Lightning Liquidity
lightning-docs - Some in-depth articles about the Lightning Network
lightning-address - Lightning Address - like an email address, but for your Bitcoin
lndfeesmanager
Fulcrum - A fast & nimble SPV Server for BCH, BTC, and LTC
electrum - Electrum Bitcoin Wallet