How to run Bitcoin Core as onion service on Windows, Ubuntu and Android? Have you tried running Bitcoin Core listening on Tor on different platforms? What are your experiences, issues that you faced, hacks, workarounds etc.?
Windows
You can follow one of the steps from 2 and 3. Step 2 uses cookie for authentication and Step 3 uses password.

Download and Install Bitcoin Core from https://bitcoincore.org/bin/bitcoin-core-0.20.1/bitcoin-0.20.1-win64-setup.exe

Edit the bitcoin.conf file, enter the below things and save it. Default location of the file is %UserProfile%\AppData\Roaming\Bitcoin\bitcoin.conf


listen=1

debug=1

logips=1

testnet=1

listenonion=1

onlynet=onion

proxy=127.0.0.1:9150

torcontrol=127.0.0.1:9151

How to setup cookie auth for Tor control?

Open C:\Users\Prayank\Desktop\Tor Browser\Browser\TorBrowser\Data\Tor\torrc and add below line:
HCookieAuthentication 1

IGNORE THIS STEP IF YOU ALREADY DID STEP 2. Edit the bitcoin.conf file, enter the below things and save it. Default location of the file is %UserProfile%\AppData\Roaming\Bitcoin\bitcoin.conf

listen=1

debug=1

logips=1

testnet=1

listenonion=1

onlynet=onion

proxy=127.0.0.1:9150

torcontrol=127.0.0.1:9151

torpassword=XYZ
XYZ: Replace it with your password in plain text

How to setup password for Tor control?

Open command prompt/PowerShell and run the below commands:
cd &quot;C:\Users\Prayank\Desktop\Tor Browser\Browser\TorBrowser\Tor&quot;
tor --hash-password &quot;XYZ&quot; &gt;torhash.txt
Open torhash.txt file, copy the last line which has below content, paste in C:\Users\Prayank\Desktop\Tor Browser\Browser\TorBrowser\Data\Tor\torrc and save it:
HashedControlPassword 16:1CEDITEDOMERANDOMSHITCF8EBCD9A50CLOLCDACF
Run the below commands in command prompt or PowerShell to ensure connection with Tor control works:
telnet 127.0.0.1 9151
AUTHENTICATE &quot;XYZ&quot;

Launch Tor Browser

Launch Bitcoin Core Wallet (Testnet) using the shortcut with a green icon or run &quot;C:\Program Files\Bitcoin\bitcoin-qt.exe&quot; -testnet in command prompt or PowerShell and change the path accordingly

Run getnetworkinfo in console window and check the localaddresses. Check if testnet3/onion_private_key file is created and analyze the logs in debug.log file.



Ubuntu
You can follow one of the steps from 2 and 3. Step 2 uses cookie for authentication and Step 3 uses password.

Download Bitcoin Core and run the below commands:

tar xzf bitcoin-0.20.0-x86_64-linux-gnu.tar.gz
sudo install -m 0755 -o root -g root -t /usr/local/bin bitcoin-0.20.0/bin/*
/usr/local/bin/bitcoin-qt

Edit the .bitcoin/bitcoin.conf file, enter the below things and save it.

listen=1

debug=1

logips=1

testnet=1

listenonion=1

onlynet=onion

proxy=127.0.0.1:9050


How to setup Tor?

sudo apt install tor
Open /etc/tor/torrc and add below lines:
ControlPort 9051
CookieAuthentication 1
CookieAuthFileGroupReadable 1
Restarts Tor: sudo /etc/init.d/tor restart
Add user to Tor group: sudo usermod -a -G debian-tor &lt;username&gt;
Run Bitcoin Core: /usr/local/bin/bitcoin-qt

IGNORE THIS STEP IF YOU ALREADY DID STEP 2. Edit the bitcoin.conf file, enter the below things and save it.

listen=1

debug=1

logips=1

testnet=1

listenonion=1

onlynet=onion

proxy=127.0.0.1:9150

torpassword=XYZ
XYZ: Replace it with your password in plain text

How to setup password for Tor control?

Open command terminal and run the below commands:
torpass=$(tor --hash-password &quot;my-tor-password&quot;)
printf &quot;HashedControlPassword $torpass\nControlPort 9051\n&quot; | sudo tee -a /etc/tor/torrc

Run getnetworkinfo in console window and check the localaddresses. Check if testnet3/onion_private_key file is created and analyze the logs in debug.log file.



Android
Download, Install and Run either ABCore or Nayuta Core.
 

I have selected Bitcoin Knots in the settings of ABCore however there is an option to use Bitcoin Core as well.