Search code examples
linuxraspberry-piraspbianbitcoin

Updating a lightning node to latest version


I'm running a lightning node (a 2nd layer for bitcoin transactions) on a Raspberry Pi. I'm still learning about the technology and linux as well. But I'm not sure how to securely update my node to the new LND version 0.4.1 and I'd like some directions.

I already downloaded the new LND binaries and checked the keys.

$ wget https://github.com/lightningnetwork/lnd/releases/download/v0.4.1-beta/lnd-linux-arm-v0.4.1-beta.tar.gz

I used this to install the previous version (0.4-beta) from scratch:

$ tar -xzf lnd-linux-arm-v0.4-beta.tar.gz
$ ls -la
$ sudo install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-arm-v0.4-beta/*

But how should I proceed if I just want to update, considering I'm not installing from scratch again? What commands should I use on linux?

LND official installation instructions are not very clear.


Solution

  • I found out how to do it.

    Update a lightning node on a Raspberry Pi is actually very easy.

    First, it's safe to stop your node:

    $ sudo systemctl stop lnd
    

    then download the new version (change version accordingly) from github:

    $ cd /download
    $ wget https://github.com/lightningnetwork/lnd/releases/download/v0.4.1-beta/lnd-linux-arm-v0.4.1-beta.tar.gz
    

    and install as if you were installing for the first time:

    $ tar -xzf lnd-linux-arm-v0.4.1-beta.tar.gz
    $ ls -la
    $ sudo install -m 0755 -o root -g root -t /usr/local/bin lnd-linux-arm-v0.4.1-beta/*
    

    then restart the service:

    sudo systemctl start lnd