Skip to main content

Getting Started

Deploy LNPlay

LNPlay is downloaded and installed on your system. Now let's define our environment then spin things up!

Create an environment file

Before you deploy an LNPlay instance, you should decide on the specific configuration of your environment.

Create a file at ~/lnplay/environments/lnplay.rocketcitybitcoin.org for example. In our example, we're deploying this for a small community meetup, and we want the Prism plugin to be installed on each node. So our environment file might look like this:

ENABLE_TLS=true
FRONTEND_FQDN=remote.rocketcitybitcoin.org
BACKEND_FQDN=lnplay.rocketcitybitcoin.org
CLN_COUNT=8
BTC_CHAIN=regtest
DEPLOY_PRISM_PLUGIN=true
LNPLAY_SERVER_PATH=/home/ubuntu/lnplay_output
DEPLOY_CLAMS_REMOTE=false
DIRECT_LINK_FRONTEND_URL_OVERRIDE_FQDN=remote.clams.tech
💡
You can see all the configuration options by inspecting defaults.env.

Node Aliases and Colors

At the moment, alias names can't be changed post-deployment. However, you can assign aliases (and Alias colors) at the time of deployment. You can do this by setting the NAMES_FILE_PATH and the COLORS_FILE_PATH variables.

Each of those text files has one value on each line. Each value corresponds to the CLN index number.

Deploy Stack

Alright, let's try and bring your instance up. Run ~/lnplay/up.sh. This script will stop if the ~/lnplay/active_env.txt is not detected.

Update ~/lnplay/active_env.txt. It should contain a single line, namely the name of the environment file. This is how you can change the target or configuration of any LNPlay instance.

Now run ~/lnplay/up.sh again. You may get a warning like:

WARNING: You are targeting something OTHER than a dev/local instance: lnplay.rocketcitybitcoin.org Are you sure you want to continue? (yes/no):

Answer yes

If you set everything up correctly, the script will run to completion.

Generate Connection Strings & QR Codes

Typically the first thing you do after running up.sh for the first time is run the ~/lnplay/show_cln_uris.sh --qrcode command. This will generate all the connection strings to each of your nodes as well as produce a bunch of related artifacts. The script stores all your connection URLs in .csv format and generates a bunch .png files created with qrencode.

Finally, a PDF file is created that contains all the QR codes arranged in a 2x3 grid on a page size of 4"x6". This file pairs perfectly with a thermal label maker.

💡
These can be printed out and affixed to an LNPLay instruction card and given to simulation participants.

The ./show_cln_uris.sh script created a compressed archive of all your output artifacts and stores it at ~/lnplay_output_lnplay.rocketcitybitcoin.com.tar.gz, for example.

Use scp to pull the archive to your localhost so QR codes can be printed.