title: bitcoin cash bitcoin-cli cannot connect to RPC server
body: <p>I'm running a bitcoin server and I validate its working by running bitcoin-cli getinfo. I have a new bitcoin-cash server which basically sets up the same but when I run a cli command it errors. 
  When I run this command from the server;</p>
  
  <pre><code>bitcoin-cli -rpcuser bitcoin -stdinrpcpass REDACTED_1aAbY -conf /data01/bitcoin/bitcoin.conf -rpcport 8332 getinfo
  </code></pre>
  
  <p>I get this result;
  <code>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/ubuntu/.bitcoin/bitcoin.conf)</code></p>
  
  <p>No matter the flags I use on bitcoin-cli I get the same error. The error indicates a conf files should be at /home/ubuntu/.bitcoin/bitcoin.conf but that file and dir don't exist.</p>
  
  <p>My server config looks like;</p>
  
  <pre><code>server=1
  txindex=1
  zmqpubrawtx=tcp://127.0.0.1:28332
  zmqpubhashblock=tcp://127.0.0.1:28332
  rpcallowip=127.0.0.1
  rpcallowip=0.0.0.0/0
  rpcuser=bitcoin
  rpcpassword=REDACTED_1aAbY
  rpcbind=0.0.0.0
  rest=1
  daemon=1
  datadir=/data01/bitcoin
  rpcworkqueue=128
  whitelist=0.0.0.0/0
  rpcallowip=::/0
  printtoconsole=1
  </code></pre>
  
  <p>If I stop the bitcoind exe from running then I get this error;</p>
  
  <pre><code>
  Make sure the bitcoind server is running and that you are connecting to the correct RPC port.```
  That tells me at least I'm running against what I think I am.
  </code></pre>