How to get the default macaroons on LND , on a Start9?


I need the invoice.macaroon on my Start9 LND hub. Can anyone tell me how I can get the contents of that file? I am able to SSH (over Tor) into my Start9. I can see the Start9 LND setting that lets me “reset the macaroons” but nothing in there lets me view them.

NOTE1: “On startup, lnd checks to see if the admin.macaroon , readonly.macaroon and invoice.macaroon files exist. If they don’t exist, lnd updates its database with a new macaroon ID, generates the three files admin.macaroon , readonly.macaroon and invoice.macaroon , all with the same ID.”

NOTE2: I know how to do it with ThunderHub, but Start9 doesnt’ have Thunderhub (Tools–>Macaroon->Bake)

Sorta looks like I need to take this route: Start9 | Service Containers

First, elevate yourself to root:
sudo -i

Then you can exec into the lnd container with:
docker exec -it lnd.embassy bash

Then navigate to the folder it’s in, /root/.lnd and echo their contents:

cd /root/.lnd/
for macaroon in *.macaroon ; do
 echo $macaroon:
 cat $macaroon

Thanks. When I get in there, the macaroons are not raw text printable.

Also, my lncli doesn’t seem to want to connect to itself within the container:

bash-5.1# lncli listmacaroonids
[lncli] rpc error: code = Unavailable desc = connection error: desc = 
"transport: Error while dialing dial tcp 
connect: connection refused"

I tried these, which are not working for me:

lncli listmacaroonids
lncli --macaroonpath=/root/.lnd/public/invoice.macaroon getinfo
lncli getinfo

None of those work due to connectivity issue?

Is there a trick to getting lncli connect to work? It seems like I am being denied from connecting from within the container.

I tried this, same connect error:

lncli connect <pubkey>@lnd.embassy:9735

netstat -l reports that it allows connections from all hosts to 9735… on that connect call to port 9735 WHY is it giving me an error it cant connect to 10009??


Final resolution was into install Thunderhub via Community Marketplace and then Bake the Macaroom from the UI.

Couldn’t figure out why lncli wouldn’t work.


Glad to hear it.

It seems if you need the macaroon you have to transform it like this:
From inside the lnd.embassy container:
xxd -ps -u -c 1000 /root/.lnd/public/admin.macaroon

From embassyOS (as root):
xxd -ps -u -c 1000 /embassy-data/package-data/volumes/lnd/data/main/public/admin.macaroon