Loop
Time: 5 minutes
To balance channels you have several tools, Loop is one such tool.
Supplies
- Golang # (update to the latest version before you start).
Installation
First, go to your home directory.
cd ~Download the source code.
git clone https://github.com/lightninglabs/loopEnter the directory.
cd loopGrab the latest version/tag/release.
git checkout v0.26.4-betaGo to run/cmd.
cd loop/cmdInstall the loopd software.
go install ./...Test if it succeeded by temporarily starting Loop.
loopdIn the output you will read that Loop is connected to your LND and with Ctrl + C you can stop loopd again.
In addition to the Loop program, a CLI is also installed. You can check it with loop --version.
Firewall
You can access Loop from the outside on two different ports.
sudo ufw allow 8081 comment "Port for REST API of Loop"sudo ufw allow 11010 comment "Port for RPC from Loop"Automation
If you want to run Loop in the background you need another service.
sudo nano /etc/systemd/system/loop.servicePaste this in.
[Unit]Description=LoopRequires=lnd.serviceAfter=lnd.service[Service]User=ubuntuExecStart=/home/ubuntu/go/bin/loopdRestart=alwaysTimeoutSec=120RestartSec=30[Install]WantedBy=multi-user.targetSave the changes with Ctrl + X and confirm with Y.
Notify the system of the new service.
sudo systemctl enable loopStart the loop service as follows.
sudo systemctl start loopIf you want to see if the service was started, run this.
systemctl status loopIf you want a view of the status across multiple sessions, use this command.
sudo journalctl -f -u loopUpdating
Go to the application directory.
cd ~/loopUpdate the repository with the latest changes via Git.
git fetch --allShow the latest version/tag/release.
git describe --tags `git rev-list --tags --max-count=1`Retrieve the changes from the latest release.
git checkout -f <OUTPUT FROM PREVIOUS STEP> #example v0.26.4-betaGo to cmd.
cd cmdInstall the loopd software.
go install ./...Restart the Loop and LiT services (if you have that running).
sudo systemctl restart loopsudo systemctl restart lit