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 #873

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open

Add lnbits #873

wants to merge 36 commits into from

Conversation

petzsch
Copy link
Contributor

@petzsch petzsch commented Jan 11, 2024

⚠️This pull request is a work in progress.
⚠️Warning: There are still many moving parts in this PR, test at your own risk and please don't use for production setups!

If you want to support the testing of this PR, you can check it out following:

  1. cd /root/BTCPayServer/btcpayserver-docker/ (or where you orginallly checked out the btcpayserver-docker repo)
  2. git remote set-url origin https://github.com/petzsch/btcpayserver-docker.git
  3. git pull
  4. git checkout add-lnbits
  5. follow the docs: here.

TODOs:

@petzsch petzsch marked this pull request as draft January 11, 2024 09:21
Copy link

@PatMulligan PatMulligan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add after line 171?
* [opt-add-lnbits](docker-compose-generator/docker-fragments/opt-add-lnbits.yml), for a self-hosted lnbits backed by BTCPay Server.

@petzsch
Copy link
Contributor Author

petzsch commented Jan 31, 2024

add after line 171? * [opt-add-lnbits](docker-compose-generator/docker-fragments/opt-add-lnbits.yml), for a self-hosted lnbits backed by BTCPay Server.

Thanks for pointing this out. I've added your suggestion.

@petzsch petzsch marked this pull request as draft February 9, 2024 09:16
@petzsch petzsch marked this pull request as ready for review February 14, 2024 17:19
@Meisterzunge
Copy link

When does this feature will be approved? Cant wait for it 🙃

@Kukks
Copy link
Member

Kukks commented Apr 6, 2024

I'm reluctant to approve this because there are many steps to get this working right and most users might shoot themselves in the foot and cause the need for troubleshooting.

I don't have a suggestion either. But I'm hoping this becomes a much simpler setup in terms of what a user needs to do on a terminal

@petzsch
Copy link
Contributor Author

petzsch commented Apr 6, 2024

What bugs me currently: When a user makes modifications to their .env file for lnbits, and we add stuff there by an update - it will run into a merge conflict.

Thats one of the points where I see the need of support.

Don't see a better option then documenting those cases so that users can help themselves.

What would be nice: Not to need a seperate sub-/domain but let this run inside the BTCPay vHost. Which I think you discovered would need a lot of changes from lnbits end.

Question remains: Do we keep this PR open and keep on merging master and lnbits updates into it? How about recommending it to people at all? Just for test setups currently?

Thanks for taking the time to look at this. @Kukks

@Kukks
Copy link
Member

Kukks commented Apr 8, 2024

What bugs me currently: When a user makes modifications to their .env file for lnbits, and we add stuff there by an update - it will run into a merge conflict.

Thats one of the points where I see the need of support.

Don't see a better option then documenting those cases so that users can help themselves.

What would be nice: Not to need a seperate sub-/domain but let this run inside the BTCPay vHost. Which I think you discovered would need a lot of changes from lnbits end.

Question remains: Do we keep this PR open and keep on merging master and lnbits updates into it? How about recommending it to people at all? Just for test setups currently?

Thanks for taking the time to look at this. @Kukks

maybe you can write some automation scripts? like lnbits-configure.sh which acts as a wizard?

@petzsch
Copy link
Contributor Author

petzsch commented Apr 9, 2024

I will think some more about it. I thought about replacing the .env file from lnbits with actual environment variables set in the dockerfile. Maybe the lnbits-configure.sh script could:

  1. ask for the desired sub/domain -> set the env variable and run btcpay-setup.sh at the end.
  2. create the database if not already existant
  3. create a opt-add-lnbits.custom.yml with environment values for stuff like the admin user id, and/or actual user ids to lock down new registrations (only shown if the user table exists in lnbits already, i.e. on second run of the script)

any additions?

@Kukks
Copy link
Member

Kukks commented Apr 22, 2024

I will think some more about it. I thought about replacing the .env file from lnbits with actual environment variables set in the dockerfile. Maybe the lnbits-configure.sh script could:

  1. ask for the desired sub/domain -> set the env variable and run btcpay-setup.sh at the end.
  2. create the database if not already existant
  3. create a opt-add-lnbits.custom.yml with environment values for stuff like the admin user id, and/or actual user ids to lock down new registrations (only shown if the user table exists in lnbits already, i.e. on second run of the script)

any additions?

You'll need to check about the db container (if it exists to create the db first), and maybe even to configure based on LN node used?

@petzsch
Copy link
Contributor Author

petzsch commented Jun 2, 2024

pushed lnbits 0.12.8 to this branch.

Configuration no longer happens via the .env files, but via environment variables that are set for LND or Clightning and can be overwritten with custom fragments.

example for a custom fragment:

opt-add-lnbits-admin.custom.yml

version: '3'

services:
  lnbits:
    environment:
      LNBITS_ALLOWED_USERS: USER-ID-FROM-USER-PROFILE-PAGE
      LNBITS_ADMIN_USERS: USER-ID-FROM-USER-PROFILE-PAGE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants