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

Require fewer permissions #94

Open
C-Otto opened this issue Jan 18, 2020 · 3 comments
Open

Require fewer permissions #94

C-Otto opened this issue Jan 18, 2020 · 3 comments

Comments

@C-Otto
Copy link
Owner

C-Otto commented Jan 18, 2020

Currently the documentation states we need admin access. With lnd 0.9.0 it is possible to create macaroons with fewer permissions. See https://github.com/lightningnetwork/lnd/tree/master/macaroons#bakery

@C-Otto C-Otto changed the title Require less permissions Require fewer permissions Jul 4, 2021
@C-Otto
Copy link
Owner Author

C-Otto commented Apr 19, 2022

Looks like BTCpay doesn't even offer the (required) admin.macaroon :/

@Goro2030
Copy link

Looks like BTCpay doesn't even offer the (required) admin.macaroon :/

BTCPay's admin.macaroon is at the root folder of the container, not where the script is looking for it. You can do:

cd /var/lib/docker/volumes/generated_lnd_bitcoin_datadir/_data cp admin.macaroon data/chain/bitcoin/mainnet/

But then I've run into the issue with the docker script that LN is not running at the port where it should. Anyone used the script with BTCPayServer?

@Bit2Cash
Copy link

Is there some info on how to run it on the BTCPayServer? I would like to try the tool but couldn't figure how with explanation on the Readme. This is what I get when trying to run it.

docker run --rm --network=generated_default -it -v /var/lib/docker/volumes/generated_lnd_bitcoin_datadir/_data:/root/.lnd rebalancelnd/rebalance-lnd -l --grpc lnd_bitcoin:10009
Traceback (most recent call last):
  File "/rebalance-lnd/rebalance.py", line 540, in <module>
    success = main()
  File "/rebalance-lnd/rebalance.py", line 326, in main
    return Rebalance(arguments).start()
  File "/rebalance-lnd/rebalance.py", line 21, in __init__
    self.lnd = Lnd(arguments.lnddir, arguments.grpc, arguments.network)
  File "/rebalance-lnd/lnd.py", line 32, in __init__
    combined_credentials = self.get_credentials(lnd_dir, network)
  File "/rebalance-lnd/lnd.py", line 49, in get_credentials
    with open(f"{lnd_dir}/data/chain/bitcoin/{network}/admin.macaroon", "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon'

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

No branches or pull requests

3 participants