Does bitcoin.conf expand environment variables? I would like to store my Bitcoin RPC passwords and usernames in environment variables, like:


rpcuser=$RPC_USER
rpcpassword=$RPC_PASSWORD



Is this supported in bitcoin core? Can environmental variables be parsed from my bitcoin.conf file?
No, bitcoin core does not expand environment variables in bitcoin.conf.

See here to see how options are parsed.

You can expand environment variables as arguments for bitcoind:



$ bitcoind -rpcuser="$RPC_USERNAME" -rpcpassword="$RPC_PASSWORD"