Lightning Nodes
...
Node Guides
Macaroons
Generate Macaroons with lncli
3min
generate a new macaroon to generate a new macaroon, you use the lncli bakemacaroon command you can specify the permissions (read, write, etc ) that you want the macaroon to have lncli rpcserver=yournodename m voltageapp io tlscertpath="" \ macaroonpath=/pathtothe/admin macaroon/ bakemacaroon \ permissions="invoice\ read" \ permissions="invoices\ write" this command will create a new macaroon with the specified permissions the permissions should be in the format service\ method for example, to create a macaroon that can read invoices and write invoices, you would use invoice\ read and invoices\ write here is an example of generating an administrative level macaroon lncli rpcserver=yournodename m voltageapp io 10009 tlscertpath="" \ macaroonpath=/path/to/admin macaroon bakemacaroon \ save to=anynameyouwant macaroon root key id \<enter a number> \ allow external permissions onchain\ read onchain\ write offchain\ read offchain\ write address\ read address\ write message\ read message\ write peers\ read peers\ write info\ read invoices\ read invoices\ write signer\ read signer\ write macaroon\ read macaroon\ write you can also add the timeout \<seconds> flag to add automatic expiration to any macaroon you generate learn more about macaroon permissions https //docs lightning engineering/lightning network tools/lnd/macaroons https //docs lightning engineering/lightning network tools/lnd/macaroons