I don't know something weird that also involves giving your login and password to this cookie.
I don't think the password is necessary. According to the docs, that is an alternative authentication method.
https://bitcoincoredocs.com/tor.html. It is either Cookie Authentication or Hashed ControlPassword.
Edit: Upon further research, I was confusing Tor Browser, with Tor. I have Tor Browser installed, but not Tor, so I guess I could follow that tutorial to install it. I thought Tor Browser included the Tor service which you could run separately but you need to install it yourself. I still need a proper tutorial tho.
Good, you've figured out your first mistake. That's why it is called Browser! It is a standalone project that uses TOR and is different from the global tor service. Which Linux version are you using?
Last time I did this for my servers I used something like this, check it out:
https://ubuntuhandbook.org/index.php/2021/01/install-tor-tor-browser-ubuntu-20-10-20-04/. It should be pretty straightforward. Let me know if you manage to do it.
proxy=127.0.0.1:9050
listen=1
listenonion=1
But some use the tor service, and have to register some sort of cookie, I don't know something weird that also involves giving your login and password to this cookie.
There are two difference here:
- 1) TOR more as a "client" with a lower level of integration, which would be connecting through the proxy as you have written above. This method does not have any authentication.
- 2) Authenticated mode with access to the Tor control protocol, deeper integration with the service. This is where the cookie authentication would come into play.
I am not sure if I remember correctly, but in the first method you would not get a .onion address and in the second you would. You can check the debug log for information about this. I am no longer 100% confident, but I think that in the first case the node would not act as a full peer despite listen=1 but I must freshen up my knowledge about it. Perhaps someone else can confirm.
Did you read the Wiki entry? https://en.bitcoin.it/wiki/Setting_up_a_Tor_hidden_service