<p>check out the <code>bitcoin.conf</code> file and see instructions to create rpc credentials. template is here: <a href="https://github.com/bitcoin/bitcoin/blob/master/contrib/debian/examples/bitcoin.conf" rel="nofollow noreferrer">https://github.com/bitcoin/bitcoin/blob/master/contrib/debian/examples/bitcoin.conf</a></p>

<p>specifically, here</p>

<pre><code># If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name
# is .cookie and found in the `-datadir` being used for bitcoind. This option is typically used
# when the server and client are run as the same user.
#
# If not, you must set rpcuser and rpcpassword to secure the JSON-RPC api. The first
# method(DEPRECATED) is to set this pair for the server and client:
#rpcuser=Ulysseys
#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593
#
# The second method `rpcauth` can be added to server startup argument. It is set at initialization time
# using the output from the script in share/rpcauth/rpcauth.py after providing a username:
#
# ./share/rpcauth/rpcauth.py alice
# String to be appended to bitcoin.conf:
# rpcauth=alice:f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae
# Your password:
# DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
#
# On client-side, you add the normal user/password pair to send commands:
#rpcuser=alice
#rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
#
# You can even add multiple entries of these to the server conf file, and client can use any of them:
# rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99
</code></pre>

CC BY-SA 4.0
2018-06-19T17:43:42.947Z
2018-06-19T17:43:42.947Z
Will Gu
<p>I don't have CentOS, but running on SuSE Linux, which is quite similiar. </p>

<p>At first, let me say, it is not recommended to run bitcoin daemon with root privileges. You may want to create a user to run bitcoin. </p>

<p>After install with the script, you should have three files (well, symbolic links) in /usr/bin, one is bitcoin-cli, the other we need bitcoind. With the new user you would open a terminal window, and see if you can start the daemon (bitcoind). It would normally create a bitcoin.conf file in the directory ".bitcoin" in the users home directory. In this file you can set the rpcuser and rpcpassword, that you will then use with bitcoin-cli. </p>

<p>If daemon does not start, is there any logfile from the system or in the ~/.bitcoin directory of the user? </p>

CC BY-SA 3.0
2018-03-17T15:42:45.927Z
2018-03-17T15:42:45.927Z
pebwindkraft
<p>Hi so I used the following bash script to set up bitcoin on my centos server <a href="https://gist.github.com/cdodd/f485b72aed8c2a6440a6141cd1ba8273?signup=true" rel="nofollow noreferrer">https://gist.github.com/cdodd/f485b72aed8c2a6440a6141cd1ba8273?signup=true</a> </p>

<p>however i don't know how to get a wallet or create a wallet and everytime i try I get the following error, their is no config file and I am not sure where one is meant to be located. could someone please help point me in the right direction to install bitcoin correctly and create my own wallet.</p>

<p>Thanks</p>

<pre><code>./bitcoin-cli -testnet getwalletinfo                                                        
error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not se
t.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/root/.bitcoin/bitcoin.conf)  
</code></pre>

CC BY-SA 3.0
2018-03-18T05:26:26.427Z
Welcome to Bitcoin.SE! I get this error if `bitcoind` or `bitcoin-qt -server` are running on mainnet and I try and query using `bitcoin-cli -testnet` - you have to start the daemon on `-testnet` first if you wish to use testnet.
Willtech
<wallet><centos>
noob - set up a wallet with centos 7
RussellHarrower
# noob - set up a wallet with centos 7

(Asked by: username_0 on 2018-03-17)

Hi so I used the following bash script to set up bitcoin on my centos server <https://gist.github.com/cdodd/f485b72aed8c2a6440a6141cd1ba8273?signup=true>

however i don't know how to get a wallet or create a wallet and everytime i try I get the following error, their is no config file and I am not sure where one is meant to be located. could someone please help point me in the right direction to install bitcoin correctly and create my own wallet.

Thanks

```
./bitcoin-cli -testnet getwalletinfo                                                        
error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not se
t.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/root/.bitcoin/bitcoin.conf)  

```

**Tags:** wallet, centos

> **Comments:**
> **username_1**: Welcome to Bitcoin.SE! I get this error if `bitcoind` or `bitcoin-qt -server` are running on mainnet and I try and query using `bitcoin-cli -testnet` - you have to start the daemon on `-testnet` first if you wish to use testnet.  

---

## 2 answers

### Answer by username_2 on 2018-06-19. Score: 1

check out the `bitcoin.conf` file and see instructions to create rpc credentials. template is here: <https://github.com/bitcoin/bitcoin/blob/master/contrib/debian/examples/bitcoin.conf>

specifically, here

```
# If no rpcpassword is set, rpc cookie auth is sought. The default `-rpccookiefile` name
# is .cookie and found in the `-datadir` being used for bitcoind. This option is typically used
# when the server and client are run as the same user.
#
# If not, you must set rpcuser and rpcpassword to secure the JSON-RPC api. The first
# method(DEPRECATED) is to set this pair for the server and client:
#rpcuser=Ulysseys
#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593
#
# The second method `rpcauth` can be added to server startup argument. It is set at initialization time
# using the output from the script in share/rpcauth/rpcauth.py after providing a username:
#
# ./share/rpcauth/rpcauth.py alice
# String to be appended to bitcoin.conf:
# rpcauth=alice:f7efda5c189b999524f151318c0c86$d5b51b3beffbc02b724e5d095828e0bc8b2456e9ac8757ae3211a5d9b16a22ae
# Your password:
# DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
#
# On client-side, you add the normal user/password pair to send commands:
#rpcuser=alice
#rpcpassword=DONT_USE_THIS_YOU_WILL_GET_ROBBED_8ak1gI25KFTvjovL3gAM967mies3E=
#
# You can even add multiple entries of these to the server conf file, and client can use any of them:
# rpcauth=bob:b2dd077cb54591a2f3139e69a897ac$4e71f08d48b4347cf8eff3815c0e25ae2e9a4340474079f55705f40574f4ec99

```


---

### Answer by username_3 on 2018-03-17. Score: 0

I don't have CentOS, but running on SuSE Linux, which is quite similiar.

At first, let me say, it is not recommended to run bitcoin daemon with root privileges. You may want to create a user to run bitcoin.

After install with the script, you should have three files (well, symbolic links) in /usr/bin, one is bitcoin-cli, the other we need bitcoind. With the new user you would open a terminal window, and see if you can start the daemon (bitcoind). It would normally create a bitcoin.conf file in the directory ".bitcoin" in the users home directory. In this file you can set the rpcuser and rpcpassword, that you username_2 then use with bitcoin-cli.

If daemon does not start, is there any logfile from the system or in the ~/.bitcoin directory of the user?


---

