How To Create A Hidden Service On Tor Using Android With Termux

All the commands are shown below

Before doing anything you should enter the following commands :

apt update && apt upgrade
pkg install python
pkg install nano
pkg install tor



First you need to create an HTML file :

touch index.html


Edit the HTML file :

nano index.html


You can add your contents in HTML format. After you finish click CTRL+S to save the file and then CTRL+X to exit.


After that you need to launch a python server inorder to find whether it's working or not :

python3 -m http.server --bind 127.0.0.1 8080


After that open chrome and search 127.0.0.1:8080
If you can see the index.html content on the screen then you're good to go.


Go back to termux and open a new session.


You need to find torrc file to edit (the location maybe vary in your device) :

cd ../usr/etc/tor/


ls - to see the contents on current directory
cd .. - to go back to the previous directory
cd (filename) - to open the specified directory


You need to edit the torrc file :

nano torrc


You need to edit two lines under "This section is just for location-hidden services"


Before : 
#HiddenServiceDir /data/data/com.termux/files/usr/var/lib/tor/other_hidden_service/
#HiddenServicePort 80 127.0.0.1:80


After : 
HiddenServiceDir /data/data/com.termux/files/home/
HiddenServicePort 80 127.0.0.1:8080


Then CTRL+S to save and then CTRL+X to exit


Now you need to start tor :

tor


After that open a new session and find hostname file :

cd ../../../home/


Open hostname file to see the onion address of your site :

cat hostname


Copy the address and search it in a tor browser. There you have it, a working hidden service on Tor.

Popular posts from this blog

How To Flash China Tablets (Easy Method)

How To Create And Configure Sudo User On Arch Linux