Skip to content

Docker package which allows users to use and test bitcoin and lightning technologies without the financial risk involved with running on the mainnet chain. Multiple GUI interfaces are included.

License

Notifications You must be signed in to change notification settings

PLEBNET-PLAYGROUND/plebnet-playground-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create lnd wallet image

Plebnet Playground Sandbox Docker Package

plebnet-playground

This package will setup a bitcoind, lnd, and tor daemon that will connect to the Plebnet Playground Sandbox (Signet) Chain. This allows users to use and test bitcoin and lightning technologies without the financial risk involved with running on the mainnet chain. RTL (Ride The Lightning) and ThunderHub Web UI is also include to provide a more user friendly experience.

Donate to Project


Notes


  • Package currently on works/tested on x64 Linux (Ubuntu specifically)
  • All data for containers are bind mapped into volumes/ directory inside the clone repo for ease of editing them.
  • Bitcoind is not using tor, simply because it takes much longer to sync the chain, and while testing this slows me down. The playground signet chain is only around 1MB at time of writing, and takes my machine ~15 seconds to be fully synced clearnet, via tor it is taking minutes.
  • You will need to setup LND wallet from scratch, instructions below
  • PM @xenonfun on Telegram to get access to the Plebnet Playground Telegram group
  • All ports are completely exposed to local host, this is mostly to make it easy for end-users to tinker, and as the signet coins in the playground are worthless so there is little risk of hacking. You can modify the docker-compose.yaml should these cause conflicts.
  • For Windows users you will need to use something like git bash until we make some powershell scripts to provide cleaner functionality

Basic Setup


Clone Repo & Install Requirements


If you already have virtualenv installed, great. If not, and you are new to using Python, see this article about why its recommended to use a virtualenv

git clone https://github.com/PLEBNET-PLAYGROUND/plebnet-playground-docker --config core.autocrlf=input
cd plebnet-playground-docker
pip3 install virtualenv 
python3 -m venv venv 
source venv/bin/activate
pip3 install -r requirements.txt

Follow these instructions to install the docker compose subcommand on your system (Mac, Windows, Windows Server 2016, or Linux systems).

Supported System Architectures

Architecture TRIPLET build-arg
Intel x64 x86_64-linux-gnu
OSX 64-bit aarch64-linux-gnu
ARM64 linux aarch64-linux-gnu

Services

Service Description
bitcoind Bitcoin Core Daemon
lnd Lightning Labs LND Daemon
clightning Blockstream lightningd Daemon
tor tor network daemon
rtl Ride The Lightning Daemon
thunderhub Thunderhub Lightning UI
docs MKDocs documentation
notebook Jupyter Notebook environment setup for lightning development
dashboard Jupyter Dashboard
lndg lndg Dashboard (available on port 8889)

Install and start all services (will autodetect platform)


./install.sh   

Install and start just the bitcoind,lnd services (comma separate them)

services=bitcoind,lnd ./install.sh   

Start containers


docker-compose up -d

Stop containers


docker-compose stop

Full removal of Plebnet Playground (this deletes all data out of volumes directory)


./uninstall.sh

Make Command

Ubuntu Linux

apt install make

MacOS

cat /etc/shells
chsh -s /bin/bash

Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install make docker-compose
brew install --cask docker
open /Applications/Docker.app

Play Command

make
make init
make install (non-destructive)
make install reset=true (destructive)
play help
play-bitcoin help
play-lnd help

Aliases

alias lncli='docker exec -it playground-lnd lncli --macaroonpath /root/.lnd/data/chain/bitcoin/signet/admin.macaroon '

alias change-password-playground='docker exec -it playground-lnd lncli --macaroonpath /root/.lnd/data/chain/bitcoin/signet/admin.macaroon changepassword'

alias connect-playground='docker exec -it playground-lnd lncli --macaroonpath /root/.lnd/data/chain/bitcoin/signet/admin.macaroon connect 03ee9d906caa8e8e66fe97d7a76c2bd9806813b0b0f1cee8b9d03904b538f53c4e@104.131.10.218:9735'

alias lightning-cli='docker exec -it playground-cln lightning-cli'

alias connect-playground-cln='docker exec -it playground-cln lightning-cli connect 03ee9d906caa8e8e66fe97d7a76c2bd9806813b0b0f1cee8b9d03904b538f53c4e@104.131.10.218:9735'

alias logs-bitcoind='docker logs playground-bitcoind'

alias logs-lnd='docker logs playground-lnd'

alias logs-cln='docker logs playground-cln'

alias logs-tor='docker logs playground-tor'

alias logs-rtl='docker logs playground-rtl'

alias logs-thub='docker logs playground-thub'

alias restart-bitcoind='docker restart playground-bitcoind'

alias restart-lnd='docker restart playground-lnd'

alias restart-cln='docker restart playground-cln'

alias restart-tor='docker restart playground-tor'

alias restart-rtl='docker restart playground-rtl'

alias restart-thub='docker restart playground-thub'

alias bos="docker run -it --rm -v $PWD/volumes/bos_datadir:/home/node/.bos:rw --network plebnet-playground-docker_default alexbosworth/balanceofsatoshis"

Your first playground LND wallet


The wallet will automatically be made for you and use the default password is 12345678 You can change the password with the change-password-playground alias. If you do change your password make sure to update the unlock.password file with your new password.

Make your first peer with the seed node for Plebnet Playground Signet


  • connect-playground
  • Now you should get some gossip about the network and be able to run something like this lncli describegraph | jq .nodes[] | grep "alias" and see a list of the various node aliases on the network
  • FYI, your alias is not set in default configuration to avoid confusion, go ahead and edit your lnd.conf and make an alias=YourNewAliasName parameter and restart the container.
  • Get into the telegram group and ask for some playground signet coins and go wild.

Get some coins

Install requirements pip3 install -r requirements.txt Run the ./getcoins.py script and you will get 1tBTC put into your lightning on-chain wallet.

RTL Setup


  • RTL will at http://localhost:3000, the default password is password and it will ask you to change this on first login.

ThunderHub Setup


  • ThunderHub will at at http://localhost:3001, the default password is password. You can change that by editing the volumes/thub_datadir/thubConfig.yaml. Change masterPassword: thunderhub-$2a$12$oRzmFZSOmvYv1heHkU053uv0a1tX9MXNqmcMpZs2hQ0t8k1Onnk1a to masterPassword: mynewpassword. Then restart thunderhub using alias restart-thub. The masterPassword entry should automatically be converted to the hashed version of the password.

How to setup Balance of Satoshis (BOS)


You may install bos only after you have generated an lnd wallet with create-lnd-wallet.

sudo python3 ./install_bos.py

If you created the bos alias above, you should be good to go

bos --version
10.9.2

How to setup plebnet dashboard

The interactive dashboard is an experimental visualization engine for viewing theoretical payment paths through the lightning network. If you used the docker compose up -d command above, then the dashboard will run on http://localhost:8050

By default only the playground nodes are visualized. However, you can also visualize real lightning network data by placing a describegraph.json file in the repo's dashboard/ directory, then restart the dashboard setting environment variable USE_TEST_DATA=TRUE:

USE_TEST_DATA=TRUE docker compose up dashboard

Plebnet Dashboard

The shortest 10 paths are shown. Features supported by a given node is revealed on hover

Additional reference material

Links

Contributors

About

Docker package which allows users to use and test bitcoin and lightning technologies without the financial risk involved with running on the mainnet chain. Multiple GUI interfaces are included.

Topics

Resources

License

Stars

Watchers

Forks

Packages