Bonus guide: Automatic backup of to your Dropbox

Difficulty: easy

Since lnd V0.6, Static Channel Backups (SCB) is supported. In a nutshell, every time a channel changes, lnd writes a new copy of the channels.backup file. For more details, see v0.6-beta Release Notes This guide explains one way to automatically upload the channels.backup file on changes, to your Dropbox The following scripts were created by Vindard

Risk : Minimal

The channels.backup file is encrypted so that it is safe to transmit over the Internet and to store on (e.g.) a cloud server.

Requirements: lnd version higher than 0.6

Setup Dropbox API Key

In your web browser, do the following:

  1. Go to and sign in

  2. Choose Dropbox Api

    Dropbox API 1

  3. Choose App Folder

    Dropbox API 2

  4. Name your app and click Create App to proceed

    Dropbox API 3

  5. On the settings page for your new app, scroll down to OAuth 2 and click Generate

    Dropbox API 4

  6. You will now see a string of letters and numbers appear. This is your Api Token. Copy this token and keep it safe for the next steps. This api token will be referenced as <dropbox-api-token> in the next step.

Preparation on the RaspiBolt

As user “admin”, download the script, make it executable and move to the global bin folder.

$ cd /home/admin/download/
$ wget

# check script & modify with your <dropbox-api-token> (third line)
$ sudo nano

$ sudo chmod +x
$ sudo mv /usr/local/bin

Setup script as systemd service (start automatically on system startup)

$ sudo nano /etc/systemd/system/backup-channels.service




$ sudo systemctl start backup-channels


$ journalctl -fu backup-channels

Run at boot

$ sudo systemctl enable backup-channels


You will now cause the channel.backup to change and see if the copy gets uploaded to your webserver.

$ sudo touch /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/channel.backup

Logon to your dropbox and see if you have a new file.

« Back: Bonus guides