I'm using user "lightning" to start the daemon, but would like to have user "bitcoin" to make the lightning-cli calls. How do I share the lightning-rpc file to do so?

Thanks! Francois

3 Answers 3


Have the users share a group, and write a wrapper it even a plugin to change the group and permissions on the rpc file. That's the normal Unix way...

  • I thought that maybe I can set the default group and permissions of the created lightning-rpc file in the config, but writing a wrapper to change it makes sense. Thank you Rusty!
    – francois
    Mar 16, 2019 at 21:15

I am not sure if I get your question. So just some general remarks. Lightningd opens as socket and this owns the rpc file. That is why a 2nd lightningd needs a separate data dir and rpc file. However many clients can connect to the socket. For example lightning-cli or other programs you write....

If it is just about use rights you could probably just start lightningd with the Bitcoin user. Or you could assign the rpc file to be member of the same group as the Bitcoin user


Just give everyone to read bitcoin directory and rw RPC file:

chmod a+rx .lightning/bitcoin/
chmod a+rw .lightning/bitcoin/lightning-rpc
  • And the hsm_secret would be widely readable ! Please don't do this. Feb 3, 2020 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.