satstack icon indicating copy to clipboard operation
satstack copied to clipboard

Implement RPC authentication using .cookie files

Open onyb opened this issue 5 years ago • 1 comments

This is useful for people running bitcoind locally on their machine. Also consider using rpcauth.

The rationale for rpcauth: https://twitter.com/nvk/status/1306982094636232712

onyb avatar May 14 '20 14:05 onyb

(Already noted in #36) In pyhton on Mac this would mean:

with open("/Users/username/Library/Application Support/Bitcoin/.cookie", "r") as creds:
    cookie = creds.read()
rpc_user = cookie.split(":")[0]
rpc_pass = cookie.split(":")[1]

Where of course /Users/username/Library/Application Support/Bitcoinis your -data-dir

gabridome avatar Nov 18 '20 08:11 gabridome