Run a super light, simple Lightning node (phoenixd) together with LNBits within Docker.
This is a docker-compose.yml for lnbits dev branch at LNBITS_COMMIT_HASH=2db5a83f4ed5dd21d99123a0947238f0674270c0, release 0.12.8 and phoenixd Dockerfile, source: https://github.com/ACINQ/phoenixd.
Latest PHOENIXD_COMMIT_HASH=3b6feb3c3f209b7c7a77ef6843734840e97e502b
Latest update: Wed Jul 17 12:32:34 PDT 2024
This repo will be updated to latest LNBits release when it comes out.
No problem, here's a guide on how to get started on a vps https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-compose-on-ubuntu-20-04
git clone this repository.
docker-compose up
On initial docker launch, you will need to update the LNBits wallet endpoint in the server settings with the corresponding phoenixd http key and the phoenixd endpoint:
- Default phoenixd endpoint: http://localhost:9740/
- The phoenixd http key will be located in the phoenixd container at phoenixd.conf
Inspect your docker containers:
![Screenshot 2024-05-06 at 12 12 16 AM](https://private-user-images.githubusercontent.com/73979971/328104530-11126b8a-908a-4a64-b08a-74fb19ad2c8b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTEzODUsIm5iZiI6MTczODk1MTA4NSwicGF0aCI6Ii83Mzk3OTk3MS8zMjgxMDQ1MzAtMTExMjZiOGEtOTA4YS00YTY0LWIwOGEtNzRmYjE5YWQyYzhiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE3NTgwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJmM2NlNWI1YWVhOTBlYjEyNmNkNzdlOTIxMmJmYmJhYmIzMDQwMjg4NTkzMGY0ODU5ZDYzYTI5ZDQ1MDQ1YmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.C4_Cwk5EUrNad7Gl0YrXeuso-McvhG8_Z36AvO7-6Kk)
Inside of LNBits Admin panel, use the name of the phoenix docker container instead of localhost:
- Save and Restart the LNBits server.
- Check your logs to see if connected to phoenixd wallet.
![Screenshot 2024-05-06 at 12 12 41 AM](https://private-user-images.githubusercontent.com/73979971/328104664-e61ed7ef-c2ef-4704-897c-5d6f4b719409.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTEzODUsIm5iZiI6MTczODk1MTA4NSwicGF0aCI6Ii83Mzk3OTk3MS8zMjgxMDQ2NjQtZTYxZWQ3ZWYtYzJlZi00NzA0LTg5N2MtNWQ2ZjRiNzE5NDA5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE3NTgwNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ4OGFjZWY1ZjhjZGJiMzEzNTc5Njg5YWQxMTIzNzIxNTdiNDA4MTk2YTJhMzg3OWVlMGFjNTE3NTY4MmVlYzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.2tPO6sRbWOBilhQhEBJAflJnWC8sOywNYFhcKizzf54)
To restore a seed from backup, run:
read SEED && docker compose exec phoenixd bash -c "echo $SEED > /phoenix/.phoenix/seed.dat"
<type in 12 seed words like this: word1 word2 word3 ...>
docker compose stop phoenixd
docker compose up -d phoenixd
# Verify your seed/nodeid
docker compose exec phoenixd bash -c "cat /phoenix/.phoenix/seed.dat"
docker compose exec phoenixd bash -c "/phoenix/bin/phoenix-cli getinfo"
Ok, now that you have your Docker containers running on your VPS, To Make LNbits install accessible over clearnet with a domain, follow these instructions:
https://gist.github.com/bitkarrot/e394556e6d11028e8af5c4d435ba230e
- Phoenixd discussions: https://github.com/ACINQ/phoenixd/discussions
- LNBits Telegram: @lnbits
This is a pre-release, for those who want test out and deploy before next lnbits release. There are some docker customizations which are not default to lnbits. p.s. I am not super familiar with Docker, so if there is a better way to do this, please do suggest.