How to: Setup LNDG on MyNode

Place for guides, manuals and other tips.
Post Reply
User avatar
Wiredancer
Jr. Member
Posts: 88
Joined: 28 Aug 2021, 05:01
Location: New Zealand
URL: https://lntxbot.com/@wiredancer
Contact:

How to: Setup LNDG on MyNode

Post by Wiredancer »

Hello. Today we will be installing LNDg tool on MyNode.

You can read more about what LNDg and how to use it is at official GitHub page here. Hopefully we will see it added to MyNodes default setup in future, but until then some of you may want to get it up and running and test it.

Tested on MyNode 0.2.54 64bit, Raspi 4B 8GB

Lets not linger and install it.

ssh to your node and update docker and docker-compose

Code: Select all

ssh admin@my.node.ip.addr
sudo apt install docker
sudo apt install docker-compose
Login as bitcoin user and prepare the docker for installation (I prefer to keep tools in bitcoin user folder, but you may choose otherwise).

Code: Select all

sudo su bitcoin
git clone https://github.com/cryptosharks131/lndg.git
cd lndg
Modify yaml file configuration.

Code: Select all

nano docker-compose.yaml
Delete the original content and replace with config bellow.

Code: Select all

services:
  lndg:
    restart: always
    build: .
    volumes:
      - /home/bitcoin/.lnd:/root/.lnd:ro
      - /home/bitcoin/lndg/data:/lndg/data:rw
    command:
      - sh
      - -c
      - python initialize.py -net 'mainnet' -server '127.0.0.1:10009' -d && supervisord && python manage.py runserver 0.0.0.0:8889
    network_mode: "host"
Run the composer to install and run your docker container.

Code: Select all

docker-compose up -d
If composer finished without any errors you should have now container up and running. You can check http://localhost:8889 or http://my.node.ip.addr:8889 and hopefully get login window. Good work!

Lets make sure we can also connect via Tor. Exit bitcoin user back to your admin and edit the tor configuration.

Code: Select all

exit
sudo nano /etc/tor/torrc
add the following into your configuration.

Code: Select all

# Hidden Service for LNDg
HiddenServiceDir /var/lib/tor/lndg/
HiddenServiceVersion 3
HiddenServicePort 8889 127.0.0.1:8889
Save, exit and restart tor service.

Code: Select all

sudo systemctl restart tor.service
Allow LNDg port in the firewall.

Code: Select all

sudo ufw allow 8889 comment 'LNDG'
Get your tor link address.

Code: Select all

sudo cat /var/lib/tor/lndg/hostname
Make sure you use the link with http and not https as there is no certificated and add the correct port to it.
Example: http://toraddressfromhostname:8889

You should be able to connect to LNDg though tor now.

username: lndg-admin
password: to get password run

Code: Select all

sudo -u bitcoin cat /home/bitcoin/lndg/data/lndg-admin.txt
Thats it! You now have LNDg running and can access it from both your local network and tor!

To update: (you have to be login as bitcoin user and enter /home/bitcoin/lndg directory before running the commands).

Code: Select all

docker-compose down
docker-compose build --no-cache
docker-compose up -d
Thank you for following my guide. Please let me know if you encounter any issues.
Please make sure to visit the official GitHub page of the project to learn how to use it correctly.

Thank you and happy routing!
Did you find my post helpful?
Why not send me few sats?
:arrow: Get LN QR code.
Happy routing!
User avatar
Wiredancer
Jr. Member
Posts: 88
Joined: 28 Aug 2021, 05:01
Location: New Zealand
URL: https://lntxbot.com/@wiredancer
Contact:

Re: Setup LNDG on MyNode

Post by Wiredancer »

When you upgrade MyNode to new version it changes tor config file back to defaults.

Code: Select all

sudo nano /etc/tor/torrc

In order to be able to access LNDg through TOR again,
add to the end of the file following code:

Code: Select all

# Hidden Service for LNDg
HiddenServiceDir /var/lib/tor/lndg/
HiddenServiceVersion 3
HiddenServicePort 8889 127.0.0.1:8889
and restart tor service

Code: Select all

sudo systemctl restart tor
Your LNDg will be back running.
Happy routing.
Did you find my post helpful?
Why not send me few sats?
:arrow: Get LN QR code.
Happy routing!
talegas
Newbie
Posts: 1
Joined: 22 Jul 2022, 00:55

Re: How to: Setup LNDG on MyNode

Post by talegas »

I'm on MyNode v0.2.57 and installed LNDg v1.1.2 through MyNode's list of available applications. How can I access lndg-admin.txt for the generated password? I don't believe the step listed in the guide applies to my use case but still learning.

Thanks in advance!
Post Reply