docs: updated install guide (#2846)

* Updated install guide
* Needed for secp256k1
* added lnbits-cli
* heading missing
* prettier

---------

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Arc 2024-12-19 09:23:49 +00:00 committed by GitHub
parent 3a2cf12052
commit 4e5b001901
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,11 +12,15 @@ Note that by default LNbits uses SQLite as its database, which is simple and eff
## Option 1 (recommended): Poetry
It is recommended to use the latest version of Poetry. Make sure you have Python version 3.9 or higher installed.
It is recommended to use the latest version of Poetry. Make sure you have Python version `3.12` installed.
### Verify Python version
### Install Python 3.12
```sh
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.12
sudo apt-get install python3.12-dev # ensure correct headers needed for secp256k1
python3 --version
```
@ -28,16 +32,16 @@ curl -sSL https://install.python-poetry.org | python3 -
export PATH="/home/user/.local/bin:$PATH"
```
### install LNbits
```sh
git clone https://github.com/lnbits/lnbits.git
cd lnbits
poetry env use 3.12
git checkout main
poetry install --only main
cp .env.example .env
# set funding source amongst other options
nano .env
# Optional: to set funding source amongst other options via the env `nano .env`
```
#### Running the server
@ -49,9 +53,16 @@ poetry run lnbits
# Note that you have to add the line DEBUG=true in your .env file, too.
```
#### LNbits-cli
```sh
# A very useful terminal client for getting the supersuer ID, updating extensions, etc
poetry run lnbits-cli --help
```
#### Updating the server
```
```sh
cd lnbits
# Stop LNbits with `ctrl + x`
git pull