Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lnbits docs to deployment FAQ #1361

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions docs/FAQ/Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,28 @@ BTCPAYGEN_EXCLUDE_FRAGMENTS="$BTCPAYGEN_EXCLUDE_FRAGMENTS;nginx-https"

Notice: If your BTCPay Server install has more than one domain (for example `WOOCOMMERCE_HOST` or `BTCPAY_ADDITIONAL_HOSTS`) you will need to modify your config for each domain name. The example above only covers 1 domain name called `btcpay.domain.com`.

### How can I deploy LNbits alongside BTCPay Server?

Because of limitations of LNbits itself, you need a seperate (sub-) domain to deploy LNbits to. Before executing the following steps, please create an A (and optional AAAA) DNS Record for your desired LNbits subdomain in your DNS server or at your domain registrar.

Replace lnbits.domain.tld with your own chosen domain, also make sure that this domain resolves to your server's IP correctly.

Please also make sure that you are running either LND or C-Lightning, as lnbits depends on one of them being present.

- Before running the commands below, make sure you are root, by running: `sudo su -`
- Run `docker exec -ti $(docker ps -a -q -f "name=postgres_1") psql -U postgres`
petzsch marked this conversation as resolved.
Show resolved Hide resolved
- within the psql console run: `CREATE DATABASE lnbits;`
- within the psql console run: `quit;`
- Run `export LNBITS_HOST="lnbits.domain.tld"`
- Run `export BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-add-lnbits;"`
- Run `. btcpay-setup.sh -i`

After you've logged on and created your first wallet, you may want to define that first user as the admin account. For doing so, please open `/root/BTCPayServer/btcpayserver-docker/Generated/lnbits/lnd-env` or `/root/BTCPayServer/btcpayserver-docker/Generated/lnbits/clightning-env` (depending on your installed lightnign implementation), navigate to the line `LNBITS_ADMIN_USERS=""` and include your new usr id (from the browser url of your newly created wallet).

After making any changes to the env file, you'll need to run `btcpay-restart.sh`.

Tip: If you want to use your LNbits wallets within BTCPayServer, you should check out the LNDHub extension (installable from your admin account).

## How to change your BTCPay Server domain name?

### Setting up DNS Records
Expand Down
1 change: 1 addition & 0 deletions docs/FAQ/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Questions and solutions to BTCPay installation.
- [Can I connect to my BTCPay Bitcoin P2P on port 8333?](./Deployment.md#can-i-connect-to-my-btcpay-bitcoin-p2p-on-port-8333)
- [How can I renew my SSL certificate?](./Deployment.md#how-can-i-renew-my-ssl-certificate)
- [Can I use an existing Nginx server as a reverse proxy with SSL termination?](./Deployment.md#can-i-use-an-existing-nginx-server-as-a-reverse-proxy-with-ssl-termination)
- [How can I deploy LNbits alongside BTCPay Server?](./Deployment.md#how-can-i-deploy-lnbits-alongside-btcpay-server)

### [Web Deployment FAQ](./Deployment.md#web-deployment-faq)

Expand Down
Loading