Bitcoin Forum
November 07, 2024, 10:07:59 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: [Guide] Futurebit Apollo BTC Custom Linux Install - Node  (Read 518 times)
n0nce (OP)
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5918


not your keys, not your coins!


View Profile WWW
November 16, 2022, 09:08:49 PM
 #21

Hi N0nce,

I followed the steps you outlined to install bitcoin-cli.  Doesn't appear to have worked, unfortunately.  I am getting the same error after installation in the debug file and when I ran bitcoin-cli echo 'hello world', I got the following:

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/futurebit/.bitcoin/bitcoin.conf)

I'm thinking I don't actually have bitcoin-cli installed as when I entered the command sudo install -m 0755 -o root -g root -t /usr/local/bin bin/bitcoin-cli, the command line simply reloaded to the base user and nothing was communicated about installation.
No, no, that all looks good. It just means Bitcoin Core is running as a different user. I get that when running bitcoin-cli as a different user than the actual Bitcoin Core bitcoind daemon.

I seriously hope it isn't the case, but it is possible that on default Futurebit OS, Core runs as root. To verify, try sudo bitcoin-cli getinfo.

If my suspicion holds true, you would need to create RPC credentials like the error message suggests.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
btctotoro
Newbie
*
Offline Offline

Activity: 10
Merit: 4


View Profile
November 16, 2022, 09:15:40 PM
 #22

Ran it, here is the result  Sad

error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set.  See -rpcpassword and -stdinrpcpass.  Configuration file: (/root/.bitcoin/bitcoin.conf)
n0nce (OP)
Hero Member
*****
Offline Offline

Activity: 882
Merit: 5918


not your keys, not your coins!


View Profile WWW
November 16, 2022, 10:18:51 PM
Last edit: November 16, 2022, 10:32:49 PM by n0nce
 #23

Ran it, here is the result  Sad

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


Here is how to create RPC credentials:
Code:
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin
git checkout v23.0
cd share/rpcauth/
python3 rpcauth.py the_username_of_the_user_you_want cleartext_password_unique_long

It will output a hash that you want to store (e.g. in a text file) for the very last step. You can trash that afterwards.

Then delete shell history:
Code:
history -c
history -w

Finally add this line to the Bitcoin configuration file (in your case at /root/.bitcoin/bitcoin.conf)
Code:
rpcauth=the_username_of_the_user_you_want:hash_that_you_had_to_store_for_this_step

After these changes, reboot Apollo and cross fingers Cheesy
You should be able to access bitcoin-cli from any user now, as long as you specify -rpcuser=<user> -rpcpassword=<password>.

Lightning will need to know those parameters as well, though.
Add to lightningd.conf and reboot again:
Code:
--bitcoin-rpcuser <user>
--bitcoin-rpcpassword <password>

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!