Skip to content

Instantly share code, notes, and snippets.

@joelklabo
Last active May 10, 2023 15:56
Show Gist options
  • Save joelklabo/c6888dffd26a30ec5a1da114a5020cbc to your computer and use it in GitHub Desktop.
Save joelklabo/c6888dffd26a30ec5a1da114a5020cbc to your computer and use it in GitHub Desktop.
VM Setup for CLN Plugin Development
sudo apt-get update
sudo apt-get install -y \
autoconf automake build-essential git libtool libgmp-dev libsqlite3-dev \
python3 python3-pip python3-mako net-tools zlib1g-dev libsodium-dev gettext \
nodejs npm
pip3 install --upgrade pip
pip3 install --user poetry
sudo apt-get install snapd
sudo snap install bitcoin-core
git clone https://github.com/joelklabo/cln-plugin-js.git
git clone https://github.com/joelklabo/cln-file-logger.git
git clone https://github.com/joelklabo/nostr-dm-bot.git
git clone https://github.com/joelklabo/nostr-control.git
git clone https://github.com/ElementsProject/lightning.git
cd lightning
git checkout v23.02.2
sudo apt-get install -y valgrind libpq-dev shellcheck cppcheck \
libsecp256k1-dev jq lowdown
pip3 install --upgrade pip
pip3 install mako
./configure --enable-developer
make -j$(nproc)
sudo make install
git config --global user.email "joel@klabo.blog"
git config --global user.name "Joel Klabo"
git config --global core.editor "vim"
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOazjrRpQ2UwiRcf0g9qG/tUFeZmD5bk5pRhyvSGdnvs joel@klabo.blog" >> ~/.ssh/authorized_keys
# Snap does some weird things with binary names; you'll
# want to add a link to them so everything works as expected
sudo ln -s /snap/bitcoin-core/current/bin/bitcoin{d,-cli} /usr/local/bin/
bitcoind --regtest --daemon
sudo npm install -g n
sudo n i 18
source ~/.profile
@joelklabo
Copy link
Author

multipass launch --name plugin --disk 15GB --cpus 8 --memory 32GB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment