Using bitcoin-cli on umbrel

I’m a new full node user, and umbrel is my first. I’m trying to start learning how to interact with the RPC API using bitcoin-cli (command line interface). I have followed the FAQ entry which relates to SSH and finding the bitcoin-cli, however I can’t get most commands to work.

For example uptime seems to work, but listtransactions, getblockchaininfo fee simply returns “command not found”. Any suggestions? What am I doing wrong?

What commands did you type exactly?

so after typing “~/umbrel/bin/bitcoin-cli” and entering, I then typed: “uptime” which produced a satisfactory result. I then tried “listtransactions” and also “getblockchaininfo” but they produced “command not found”.

You need to reference the path to the executable. For example:

~/umbrel/bin/bitcoin-cli getblockchaininfo
1 Like

aha! Thank you Lounés. I am still new to command line, but it makes sense that the command will only work when referencing the right directory. Awesome.

@louneskmt I have getblockchaininfo working, but can’t seem to get getwalletinfo or gettransaction to work. I run it and it just skips to the next line without any output. Are there certain bitcoin-cli commands that won’t work with Umbrel?

No, they all should work. Maybe you are forgetting an argument or option?

1 Like

Part of my problem is I’m not sure which command I need to use.

I had a channel get closed recently, so I am trying to send those sats on-chain to a mobile wallet. However, I am only able to see the transaction via mempool.space that’s connected to my Umbrel. If I go to a different block explorer and enter the same Transaction ID, it doesn’t find anything. Any ideas on how to fix this? Seems like the transaction is known to my node but not to any other nodes? This was a few days ago and the issue persists…

For the onchain wallet, Umbrel uses LND wallet, so it won’t work with bitcoin-cli (which is Bitcoin Core command line interface).

If your transaction hasn’t been broadcasted to the network, I would suggest to restart Umbrel, and it should rebroadcast it properly.

1 Like

Hi,

I am having the same issue when using the command getbalance of Umbrel. The command return nothing (no error no balance).
Pls help advise.

Thanks,

Since the update to 0.5.0, I cannot use

docker exec bitcoin bitcoin-cli getbalances

instead I get an error that says,

“Error: No such container: bitcoin”

How can I use bitcoin-cli?

Looks like container names might be different after update :thinking:.
Run “docker ps” if you want to see container names running, you will see one named “bitcoin_bitcoind_1”.

Try this command instead:
docker exec bitcoin_bitcoind_1 bitcoin-cli getbalances

This worked for me.

But not all the commands work.

If you are running Umbrel version 1.X where bitcoin-cli have been depreciated, run;

sudo docker ps -a

that will list out all your containers, then find the one for bitcoind, mine was named “bitcoin_bitcoind_1”

Then you can run your bitcoind or bitcoin-cli commends inside that container for your node.

sudo docker exec -it bitcoin_bitcoind_1 bitcoin-cli -getinfo

good luck

1 Like