1
I have a /ect/systemd/system/bitcoin.service with the following content and I am wondering, why bitcoin-cli getinfo tells me about a configuration file elsewhere:
error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. See -rpcpassword and -stdinrpcpass. Configuration file: (/home/pi/.bitcoin/bitcoin.conf)
Content of bitcoin.service, especially -conf=/home/bitcoin/.bitcoin/bitcoin.conf:
[Unit]
Description=Bitcoin daemon
After=network.target
[Service]
ExecStart=/usr/local/bin/bitcoind -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid
# Creates /run/bitcoind owned by bitcoin
RuntimeDirectory=bitcoind
User=bitcoin
Type=forking
PIDFile=/home/bitcoin/.bitcoin/bitcoind.pid
Restart=on-failure
# Hardening measures
####################
# Provide a private /tmp and /var/tmp.
PrivateTmp=true
# Mount /usr, /boot/ and /etc read-only for the process.
ProtectSystem=full
# Disallow the process and all of its children to gain
# new privileges through execve().
NoNewPrivileges=true
# Use a new /dev namespace only populated with API pseudo devices
# such as /dev/null, /dev/zero and /dev/random.
PrivateDevices=true
# Deny the creation of writable and executable memory mappings.
MemoryDenyWriteExecute=true
[Install]
WantedBy=multi-user.target
bacause it not have the information for the rpc framework, this is an comple example of bitcoin.con, click me
– vincenzopalazzo – 2019-08-28T08:57:17.673Thanks, I now understood that bitcoin-cli is a client to bitcoind and bitcoind has to run in server-mode which has to be specified in the config file along with username and password, right? – Ben – 2019-08-28T09:00:58.290
yes, correct, I have answered inside this post with more details
– vincenzopalazzo – 2019-08-28T09:05:50.730I posted both questions but I don't think they are related. The other question is mainly about
bitcoin-init. – Ben – 2019-08-28T09:49:26.953yes, but include this question. – vincenzopalazzo – 2019-08-28T09:51:03.577