Post
Topic
Board Bitcoin Technical Support
Merits 9 from 4 users
Re: What's the current best way to run Bitcoin throught Tor?
by
takuma sato
on 12/09/2025, 21:09:02 UTC
⭐ Merited by LoyceV (4) ,klarki (2) ,hugeblack (2) ,stwenhao (1)
I installed it from the Tor repository and got it working. I was able to run bitcoin-qt with Tor since it has the P on the GUI and im only connecting to .onion addresses in the Peers window. However, some things still not fully working it seems.

1) The RPC does not work when I use Tor for some reason. I try ./bitcoin-cli getnetworkinfo and it says:
Quote
error: timeout on transient error: Could not connect to the server 127.0.0.1:18332

Make sure the bitcoind server is running and that you are connecting to the correct RPC port.

There is no cookie so maybe I have the wrong settings on bitcoin.conf

For Tor, I comment everything except this:

rpcbind=127.0.0.1
server=1
proxy=127.0.0.1:9050
listen=1
listenonion=1
onlynet=onion

On some tutorials I saw they use bind= instead of rpcbind=, im not sure about that

For clearnet, commenting everything except this:

rpcbind=127.0.0.1
server=1
listen=0

Works, bitcoin-cli will run the commands and i see the cookie file. So it has to be something with the bitcoin.conf I guess that requires something specific for Tor

Another thing is, when I run with this the Tor setting settings I described, I don't see that an onion service is created. I think my node is not reachable. But I don't get it because from what I've heard BItcoin does not run with Tor unless your node is reachable when using Tor, but it was downloading blocks in Tor mode so I don't know.

Im supposed to see this in debug.log but not there:

Quote
tor: Got service ID XXXXXXXXXXX, advertising service XXXXXXXXXXX.onion:8333

And with getnetworkinfo I get this:


Quote
{
  "version": 290100,
  "subversion": "/Satoshi:29.1.0/Knots:20250903/",
  "protocolversion": 70016,
  "localservices": "some number here with a c and 2 numbers",
  "localservicesnames": [
    "NETWORK",
    "WITNESS",
    "NETWORK_LIMITED",
    "P2P_V2",
    "REPLACE_BY_FEE?"
  ],
  "localrelay": true,
  "timeoffset": 0,
  "networkactive": true,
  "connections": 0,
  "connections_in": 0,
  "connections_out": 0,
  "networks": [
    {
      "name": "ipv4",
      "limited": true,
      "reachable": false,
      "proxy": "127.0.0.1:9050",
      "proxy_randomize_credentials": true
    },
    {
      "name": "ipv6",
      "limited": true,
      "reachable": false,
      "proxy": "127.0.0.1:9050",
      "proxy_randomize_credentials": true
    },
    {
      "name": "onion",
      "limited": false,
      "reachable": true,
      "proxy": "127.0.0.1:9050",
      "proxy_randomize_credentials": true
    },
    {
      "name": "i2p",
      "limited": true,
      "reachable": false,
      "proxy": "",
      "proxy_randomize_credentials": false
    },
    {
      "name": "cjdns",
      "limited": true,
      "reachable": false,
      "proxy": "127.0.0.1:9050",
      "proxy_randomize_credentials": true
    }
  ],
  "relayfee": 0.00001000,
  "incrementalfee": 0.00001000,
  "localaddresses": [
  ],
  "warnings": [
  ]
}




Also I do not get the onion_v3_private_key file that the guy in the video gets in /.bitcoin so im not sure in which state Tor is being run.. I mean it's connecting to other peers with onion addresses only and it's downloading blocks... so in theory it's working. However im not sure what im missing with that there.
Is it that it's working fine but im not reachable to other people? But again, listen=1 is enabled (since from what I can read it wouldn't even work in Tor mode) but I get 10 in / 0 out for connections (it has 0 incoming connections on that getnetworkinfo because the node is fully synced and I guess once it's fully synced it barely needs 1 peer every x minutes to update blockchain). So im not sure what's up with this.