Custom .onion v3 Domain Guide
A .onion website runs on the Tor network, ensuring high anonymity. Follow these steps to set up your own hidden service.
๐ Requirementsโ
- Tor (to host the hidden service)
- Web Server (Apache, Nginx, or frameworks like Flask/Django)
- Tor Browser (to access the .onion website)
๐ ๏ธ Step 1: Install Torโ
๐น Linuxโ
sudo apt update && sudo apt install tor
๐น Windowsโ
- Download the Tor Expert Bundle
- Extract and run Tor.exe from CMD.
๐ ๏ธ Step 2: Configure Tor Hidden Serviceโ
Edit the torrc file:
- Linux:
/etc/tor/torrc
- Windows:
C:\Users\Username\torrc
Add the following lines:
HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 127.0.0.1:80
Restart Tor:
sudo service tor restart
๐ ๏ธ Step 3: Get Your .onion Domainโ
Once Tor is running, check your assigned .onion address:
cat /var/lib/tor/hidden_service/hostname
Example output:
abcdefghijklm.onion
๐ ๏ธ Step 4: Set Up a Web Serverโ
๐น Apache (Linux)โ
sudo apt install apache2
๐น Nginxโ
Edit /etc/nginx/sites-available/default
:
server {
listen 80;
server_name localhost;
root /var/www/html;
index index.html;
}
Restart Nginx:
sudo service nginx restart
๐ ๏ธ Step 5: Upload Your Website Filesโ
Place your HTML/PHP files in:
/var/www/html/
Or, if using Flask/Django, run the web server on port 80.
๐ ๏ธ Step 6: Access the Website via Tor Browserโ
- Open Tor Browser.
- Enter your .onion address.
- Your hidden website is now online! ๐
โ ๏ธ Security Tipsโ
- Do not expose your real IP address.
- Use a sandbox or anonymous VPS.
- Implement self-signed SSL if needed.
๐น Happy Hosting! ๐
๐ Custom .onion v3 Domain (Vanity Address)
By default, .onion domains are random strings derived from a public key. However, with mkp224o, we can generate a customized (vanity) .onion address.
๐ Requirementsโ
- Tor (installed from the previous guide)
- mkp224o (to generate vanity addresses)
- Linux (recommended for compatibility)
๐ ๏ธ Step 1: Install Dependenciesโ
๐น Debian-based (Ubuntu, Kali, etc.)โ
sudo apt update
sudo apt install gcc libsodium-dev make autoconf
๐น CentOS / RHELโ
sudo yum install libsodium-devel
sudo yum groupinstall "Development Tools"
๐ ๏ธ Step 2: Install mkp224oโ
Clone the mkp224o repository and compile it:
git clone https://github.com/cathugger/mkp224o.git
cd mkp224o/
./autogen.sh
./configure
make
๐ ๏ธ Step 3: Generate a Vanity .onion Addressโ
Run the following command to generate a .onion address starting with "opsls":
./mkp224o opsls -t 50 -v -n 4 -d /tmp/
Explanation of parameters:
opsls
: The prefix you want (e.g.,opslsabc123.onion
).-t 50
: Use 50 threads for faster processing.-v
: Verbose mode.-n 4
: Generate 4 different addresses.-d /tmp/
: Save results in /tmp/ directory.
Example output:
opsls6pv5tvhh6oh46g4etroea4j3q4e4lusjiviasbo4h3lr4gqd.onion
opsls27owmy4zuirqfucbq3nrz3wz6ggznunpnbakvsjdhfn2jlmr6yd.onion
opslswgds7zi4fkvrbmmrv7eplk2vtjjn6fqehl4jjezspwm577mfwad.onion
๐ ๏ธ Step 4: Move and Configure the Custom Addressโ
Pick one of the generated addresses and move it to Tor's hidden service directory:
mv /tmp/opsls27owmy4zuirqfucbq3nrz3wz6ggznunpnbakvsjdhfn2jlmr6yd.onion /var/lib/tor/opslinuxsec
Fix ownership and permissions:
chown -R debian-tor:debian-tor /var/lib/tor/opslinuxsec
chmod -R u+rwX,og-rwx /var/lib/tor/opslinuxsec
๐ ๏ธ Step 5: Update torrc Configurationโ
Edit Tor's configuration file:
nano /etc/tor/torrc
Modify the hidden service directory:
HiddenServiceDir /var/lib/tor/opslinuxsec/
HiddenServicePort 80 127.0.0.1:80
Save and restart Tor:
sudo systemctl restart tor
๐ ๏ธ Step 6: Test Your Custom .onion Addressโ
Open Tor Browser and enter your new .onion domain:
opsls27owmy4zuirqfucbq3nrz3wz6ggznunpnbakvsjdhfn2jlmr6yd.onion
If everything is set up correctly, your website should load!
If you have tor browser you can check my site in there
http://opsls27owmy4zuirqfucbq3nrz3wz6ggznunpnbakvsjdhfn2jlmr6yd.onion/
โ ๏ธ Security Tipsโ
- Never expose your private key.
- Use a secure VPS or dedicated air-gapped machine.
- Consider sandboxing Tor for extra security.
๐น Enjoy Your Custom .onion Domain! ๐
Sourceโ
https://www.bentasker.co.uk/posts/documentation/linux/708-generating-a-vanity-address-for-version-3-onions.html https://medium.com/@rishabhlakhotia/setting-up-tor-hidden-service-8af1875921c6 https://community.torproject.org/onion-services/setup/