Unable to connect to Bitcoin Core over local LAN RPC interface


I recently installed Start9 on my machine and also installed the Bitcoin Core service as well as electrs and mempool. After Bitcoin Core finished the blockchain sync, both electrs and mempool are able to connect to Bitcoin Core.

Now, I have another machine with Sparrow wallet and when I try to connect to Bitcoin Core on Start9 machine over the local network by getting the address from the interfaces in Bitcoin Core service, its failing to connect.

That made me wonder, is port 8332 (Bitcoin RPC port) even open. So from the machine thats running Sparrow, I tried telnetting to port 8332 of Start9 machine which fails with “connection refused”.

I then SSH into Start9 and use netstat to see that sure enough its not listening on port 8332. While looking around, I notice that bitcoin runs in a container named bitcoind.embassy. So out of curiosity I then used podman to exec into the container. Using netstat inside the container I see that it is indeed listening on port 8332.

So, it seems like the missing piece is that the Start9 host is not listening on port 8332 on behalf of the bitcoin core container. Is that the intended setup? How can an incoming request to Start9 host be forwarded to the bitcoind.embassy container on port 8332?

Looking at the RPC connect addresses in Bitcoin Core interfaces, they do not specify any port numbers. Does that mean in case of “https” (local) I would just specify the port to be 443 in Sparrow? I tried that as well but its not working and its super confusing what should I do right now.

Hello, sovereign. For the .local interface, please utilize port 443. Here is our guide to configure Sparrow.

I hope it helps.

Thanks. I am able to connect to Sparrow using those port numbers.

However, when I use the same credentials and port number to try to connect to Bitcoin Core using bitcoin-cli on my desktop (not start9), it consistently fails.

Is this because start9 has some sort of wrapper around Bitcoin Core and does not support connections from a remote bitcoin-cli?

I know I can use bitcoin-cli within the bitcoind.embassy container on start9 but I do not want that.

Ok, so I did some more experimentation. I can connect using bitcoin-cli when I use it with torify. But bitcoin-cli does not work without torify from my machine while connecting to the bitcoin-core on start9 machine. I specified the port to be 443 and the local address. The credentials are correct too. Everything is the same except I changed “.onion” to “.local” and port from 8332 to 443.

Why is it so hard to connect locally to bitcoin core using a bitcoin-cli on another machine?

Is this due to using “https” for local RPC connections? It sure does seem like that. Because I cannot think of any other reason why bitcoin-cli would not connect to Bitcoin Core on start9 over LAN.

Do I understand correctly that you are trying to issue CLI commands to your Bitcoin Core node running on StartOS. If this is the case, the way to that is to SSH into the Bitcoin container and perform the commands there. Here is the guide for SSH Start9 | Using SSH

Thanks Rick. I am looking to connect to my node’s RPC interface over the local network.

I was just using bitcoin-cli to test the RPC connection over the local network. Since that does not work, I cannot even proceed.

My end goal is to make ord (ordinals indexer) connect to my start9 bitcoin node over the local network. That was failing which is why I resorted to using bitcoin-cli to test if things work.

Do you know why such basic functionality as connecting to the RPC interface of bitcoind over LAN does not work in case of start9?

You can use the RPC interface over LAN. A good test case is sparrow wallet. Be sure and follow the setup guides and trust the Root CA. Start9 | Trusting Your Root CA. But you do have to be inside the container to issue bitcoin-cli commands AFAIK

Yup, it works with Sparrow but what is extremely confusing is why it does not work with bitcoin-cli or ord. I ended up setting up a separate node other than start9.

Thanks for your help.


My bad, simple mistake: missed the “remove http” part for URL information
Thought of deleting this post but it may be useful for someone else in a hurry like me! :stuck_out_tongue:

-----END EDIT-----


So… I followed the instructions for the .local interface, but I keep getting this error when testing the connection and can’t find any info related to it…

"Could not connect:

Cannot invoke “com.sparrowwallet.sparrow.io.Server.getUrl()” because “” is null"

Any hints?