lnbits/docs/devs/installation.md
2022-01-14 10:11:26 +00:00

1.8 KiB

layout parent title nav_order
default For developers Installation 1

Installation

The application uses Pipenv to manage Python packages. While in development, you will need to install all dependencies:

git clone https://github.com/lnbits/lnbits-legend.git
cd lnbits-legend/
pipenv shell
# pipenv --python 3.8 shell (if you wish to use a version of Python higher than 3.7)
pipenv install --dev
# pipenv --python 3.8 install --dev (if you wish to use a version of Python higher than 3.7)

# If any of the modules fails to install, try checking and upgrading your setupTool module
# pip install -U setuptools

You will need to copy .env.example to .env, then set variables there.

Files

You might also need to install additional packages, depending on the backend wallet you use. E.g. when you want to use LND you have to pipenv run pip install lndgrpc and pipenv run pip install purerpc.

Take a look at Polar for an excellent way of spinning up a Lightning Network dev environment.

Running the server

LNbits uses [FastAPI][fastapi] as an application server. Before running the server for the first time, make sure to create the data folder and edit the .env file:

mkdir data
cp .env.example .env
sudo nano .env

To then run the server, use:

pipenv run python -m uvicorn lnbits.__main__:app --reload

Note: We reccomend using Caddy for a reverse-proxy, if you want to serve your install through a domain, alternatively you can use ngrok.

Frontend

The frontend uses Vue.js and Quasar.