user5215: 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?

user102184: 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"


5215: <p>I would like to store my Bitcoin RPC passwords and usernames in environment variables, like:</p>

<blockquote>
<pre><code>rpcuser=$RPC_USER
rpcpassword=$RPC_PASSWORD
</code></pre>
</blockquote>

<p>Is this supported in bitcoin core? Can environmental variables be parsed from my bitcoin.conf file?</p>
 102184: <p>No, bitcoin core does not expand environment variables in <code>bitcoin.conf</code>.</p>

<p>See <a href="https://github.com/bitcoin/bitcoin/blob/0.19/src/util/system.cpp#L812" rel="nofollow noreferrer">here</a> to see how options are parsed.</p>

<p>You can expand environment variables as arguments for <code>bitcoind</code>:</p>



<pre><code>$ bitcoind -rpcuser="$RPC_USERNAME" -rpcpassword="$RPC_PASSWORD"
</code></pre>
