Pool
Time: 5 minutes
Pool is 1 of the coolest developments within Lightning. Basically, it enables bonds on the Lightning network. You can earn interest on your bitcoin using Pool, without placing it with a third party. So you always remain in control of your bitcoin.
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/poolEnter the directory.
cd poolGrab the latest version/tag/release.
git checkout v0.6.4-betaInstall the Pool software.
make installTest if it succeeded by temporarily starting Pool.
pooldIn the output you will read that pool is connected to your LND and with Ctrl + C you can stop poold again.
Besides the pool program there is also a CLI installed. You can check it with pool --version.
Firewall
You can access Pool from the outside on two different ports.
sudo ufw allow 8281 comment "Port for REST API of Pool"sudo ufw allow 12010 comment "Port for RPC from Pool"Automation
If you want to run Pool in the background then you need another service.
sudo nano /etc/systemd/system/pool.servicePaste this in.
[Unit]Description=PoolRequires=lnd.serviceAfter=lnd.service[Service]User=ubuntuExecStart=/home/ubuntu/go/bin/pooldRestart=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 poolStart the pool service as follows.
sudo systemctl start poolIf you want to see if the service was started, run this.
systemctl status poolIf you want an overview of the status across multiple sessions, use this command.
sudo journalctl -f -u poolUpdating
Go to the application directory.
cd ~/poolUpdate 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> #e.g. v0.6.4-betaInstall the pooled software.
make installRestart the Pool and LiT services (if you have that running).
sudo systemctl restart poolsudo systemctl restart lit