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/pool

Enter the directory.

cd pool

Grab the latest version/tag/release.

git checkout v0.6.4-beta

Install the Pool software.

make install

Test if it succeeded by temporarily starting Pool.

poold

In 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.service

Paste this in.

[Unit]
Description=Pool
Requires=lnd.service
After=lnd.service
[Service]
User=ubuntu
ExecStart=/home/ubuntu/go/bin/poold
Restart=always
TimeoutSec=120
RestartSec=30
[Install]
WantedBy=multi-user.target

Save the changes with Ctrl + X and confirm with Y.

Notify the system of the new service.

sudo systemctl enable pool

Start the pool service as follows.

sudo systemctl start pool

If you want to see if the service was started, run this.

systemctl status pool

If you want an overview of the status across multiple sessions, use this command.

sudo journalctl -f -u pool

Updating

Go to the application directory.

cd ~/pool

Update the repository with the latest changes via Git.

git fetch --all

Show 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-beta

Install the pooled software.

make install

Restart the Pool and LiT services (if you have that running).

sudo systemctl restart pool
sudo systemctl restart lit