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

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/ 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/ again. You may get a warning like:

WARNING: You are targeting something OTHER than a dev/local instance: 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 for the first time is run the ~/lnplay/ --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 ./ script created a compressed archive of all your output artifacts and stores it at ~/, for example.

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