mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-18 14:24:21 +01:00
2.2 KiB
2.2 KiB
Installation instructions for lnd and lspd
Requirements
- lnd
- lspd
- postgresql
Installation
LND
Follow LND installation instructions here.
lspd
Needs to be build from source:
git clone https://github.com/breez/lspd
cd lspd
make release-lspd # compile lspd
Postgresql
Lspd supports postgresql backend. Create new database and user for lspd:
CREATE ROLE <username>;
ALTER ROLE <username> WITH NOSUPERUSER INHERIT NOCREATEROLE NOCREATEDB LOGIN NOREPLICATION NOBYPASSRLS PASSWORD '<password>';
CREATE DATABASE <dbname> WITH TEMPLATE = template0 ENCODING = 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
ALTER DATABASE <dbname> OWNER TO <username>;
Configure
- Create a random token (for instance using the command
openssl rand -base64 48, or./lspd genkey) - Define the environment variables as described in sample.env. If
CERTMAGIC_DOMAINis defined, certificate for this domain is automatically obtained and renewed from Let's Encrypt. In this case, the port needs to be 443. IfCERTMAGIC_DOMAINis not defined, lspd needs to run behind a reverse proxy like treafik or nginx.
ENV variables:
LISTEN_ADDRESSdefines the host:port for the lspd grpc serverCERTMAGIC_DOMAINdomain on which lspd will be accessibleDATABASE_URLpostgresql db urlAWS_REGIONAWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYMEMPOOL_API_BASE_URLuses fee estimation for opening new channels (default: https://mempool.space)MEMPOOL_PRIORITYpriority with which open new channels using mempool api (default: economy)
Running lspd on LND
- Run LND with the following options set:
--protocol.zero-conf: for being able to open zero conf channels--protocol.option-scid-alias: required for zero conf channels--requireinterceptor: to make sure all htlcs are intercepted by lspd--bitcoin.chanreservescript="0"to allow the client to have zero reserve on their side
- Run lspd
Final step
- Share with Breez the TOKEN and the LISTEN_ADDRESS you've defined (send to contact@breez.technology)