<p>I still don't know why the error occurred however I found a workaround.</p>
<p>I added the lines</p>
<pre><code>HiddenServiceDir /var/lib/tor/standup/
HiddenServiceVersion 3
HiddenServicePort 1309 127.0.0.1:18332
HiddenServicePort 1309 127.0.0.1:18443
HiddenServicePort 1309 127.0.0.1:8332
</code></pre>
<p>in the <code>/etc/tor/torrc</code> file (according to the <a href="https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md" rel="nofollow noreferrer">tor guide</a>) in the hidden service section. Then I restarted tor with <code>systemctl restart tor</code>. Afterwards the <code>/var/lib/tor/standup/hostname</code> file was created and also the <code>torify</code> command went through just fine!</p>

CC BY-SA 4.0
2021-12-12T09:21:47.180Z
2021-12-12T09:21:47.180Z
zerotobtc
<p>I'm currently in chapter 14.1 (verify your tor setup) of the  <a href="https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/14_1_Verifying_Your_Tor_Setup.md#verify-your-tor-setup" rel="nofollow noreferrer">learning bitcoin from the command line</a> course by blockchaincommons.</p>
<p>I don't get my head around doing the actual RPC verification via torify and I assume my linode-node is not running properly behind tor.
When I type sudo -u debian-tor tor --verify-config everything is fine and I see the expected result.</p>
<p>However when I try to check the rpc ports in /etc/tor/torrc I can NOT see the hidden service ports described in the docs. There it only says:</p>
<pre><code>############### This section is just for location-hidden services ###

## Once you have configured a hidden service, you can look at the
## contents of the file &quot;.../hidden_service/hostname&quot; for the address
## to tell people.
##
## HiddenServicePort x y:z says to redirect requests on port x to the
## address y:z.

#HiddenServiceDir /var/lib/tor/hidden_service/
#HiddenServicePort 80 127.0.0.1:80

#HiddenServiceDir /var/lib/tor/other_hidden_service/
#HiddenServicePort 80 127.0.0.1:80
#HiddenServicePort 22 127.0.0.1:22
</code></pre>
<p>I can see them in the bitcoin.conf file but that doesn't help much... I have an QR-code but I'm not able to connect with my node through it. And I don't have a <code>/var/lib/tor/standup/hostname</code> directory at all.</p>
<p>What I CAN do is verifying my tor-setup for bitcoind running <code>grep &quot;tor:&quot; ~/.bitcoin/testnet3/debug.log</code>.</p>
<p>I assume, something went wrong during the initial install. But can anybody tell me, how to fix it?</p>
<p>PS: Explanations for differences between RPC and bitcoind are also welcome, I think I'm not getting that right either...</p>

CC BY-SA 4.0
2021-12-12T03:56:09.387Z
At the top of the guide you linked, it mentions setup with Bitcoin StandUp. I can see that the [Linux StandUp script](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts/blob/master/Scripts/StandUp.sh) should have set the ports in torrc. Did you use this script?
meshcollider
CC BY-SA 4.0
2021-12-12T06:44:01.250Z
Might checkout the [tor guide](https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md) in bitcoin-core.  If your using "option 2" then core is making the Tor service for you via the Tor API.
Dan
CC BY-SA 4.0
2021-12-12T08:33:11.513Z
@meshcollider yes I did us Bitcoin StandUp. Question is, can I simply add them manually in the displayed section above?
zerotobtc
CC BY-SA 4.0
2021-12-12T09:01:43.340Z
@zerotobtc I think the setup is more complicated than just adding those lines to the file. I'd recommend using the Tor setup guide linked by Dan
meshcollider
CC BY-SA 4.0
2021-12-12T09:19:27.307Z
Thanks @Dan for the link to the setup guide, that helped!
zerotobtc
<json-rpc><tor>
Not able to verify tor setup for RPC
zerotobtc
# Not able to verify tor setup for RPC

(Asked by: username_0 on 2021-12-11)

I'm currently in chapter 14.1 (verify your tor setup) of the [learning bitcoin from the command line](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/14_1_Verifying_Your_Tor_Setup.md#verify-your-tor-setup) course by blockchaincommons.

I don't get my head around doing the actual RPC verification via torify and I assume my linode-node is not running properly behind tor.
When I type sudo -u debian-tor tor --verify-config everything is fine and I see the expected result.

However when I try to check the rpc ports in /etc/tor/torrc I can NOT see the hidden service ports described in the docs. There it only says:

```
############### This section is just for location-hidden services ###

## Once you have configured a hidden service, you can look at the
## contents of the file ".../hidden_service/hostname" for the address
## to tell people.
##
## HiddenServicePort x y:z says to redirect requests on port x to the
## address y:z.

#HiddenServiceDir /var/lib/tor/hidden_service/
#HiddenServicePort 80 127.0.0.1:80

#HiddenServiceDir /var/lib/tor/other_hidden_service/
#HiddenServicePort 80 127.0.0.1:80
#HiddenServicePort 22 127.0.0.1:22

```

I can see them in the bitcoin.conf file but that doesn't help much... I have an QR-code but I'm not able to connect with my node through it. And I don't have a `/var/lib/tor/standup/hostname` directory at all.

What I CAN do is verifying my tor-setup for bitcoind running `grep "tor:" ~/.bitcoin/testnet3/debug.log`.

I assume, something went wrong during the initial install. But can anybody tell me, how to fix it?

PS: Explanations for differences between RPC and bitcoind are also welcome, I think I'm not getting that right either...

**Tags:** json-rpc, tor

> **Comments:**
> **username_1**: At the top of the guide you linked, it mentions setup with Bitcoin StandUp. I can see that the [Linux StandUp script](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts/blob/master/Scripts/StandUp.sh) should have set the ports in torrc. Did you use this script?  
> **username_2**: Might checkout the [tor guide](https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md) in bitcoin-core.  If your using "option 2" then core is making the Tor service for you via the Tor API.  
> **username_0**: @username_1 yes I did us Bitcoin StandUp. Question is, can I simply add them manually in the displayed section above?  
> **username_1**: @username_0 I think the setup is more complicated than just adding those lines to the file. I'd recommend using the Tor setup guide linked by Dan  
> **username_0**: Thanks @username_2 for the link to the setup guide, that helped!  

---

## 1 answers

### Answer by username_0 on 2021-12-12. Score: 1

I still don't know why the error occurred however I found a workaround.

I added the lines

```
HiddenServiceDir /var/lib/tor/standup/
HiddenServiceVersion 3
HiddenServicePort 1309 127.0.0.1:18332
HiddenServicePort 1309 127.0.0.1:18443
HiddenServicePort 1309 127.0.0.1:8332

```

in the `/etc/tor/torrc` file (according to the [tor guide](https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md)) in the hidden service section. Then I restarted tor with `systemctl restart tor`. Afterwards the `/var/lib/tor/standup/hostname` file was created and also the `torify` command went through just fine!


---

