Create your own Dark Web Site

My Tor Site 👉 My Onion Portfolio Have to use Tor browser
Tor Documentation 👉 https://community.torproject.org/

Table of Contents

Step 1 Install Tor

Setup Unattended Upgrades (Optional)

Update the Repo and Install Unattended Upgrades

# Update repositories
apt update

#install unattended upgradesa
apt-get install unattended-upgrades apt-listchanges

Configure Unattended Upgrades to search for Tor and to auto restart

# open the config file in nano
nano /etc/apt/apt.conf.d/50unattended-upgrades

Remove these lines from the file

And replace with this

Unattended-Upgrade::Allowed-Origins {
  "${distro_id}:${distro_codename}-security";
  "TorProject:${distro_codename}";
  };
  Unattended-Upgrade::Package-Blacklist {
  };
  
Unattended-Upgrade::Automatic-Reboot "true";

We will add these lines to the auto upgrades file to auto clean up and auto install.

# Nano this file
nano /etc/apt/apt.conf.d/20auto-upgrades

# Add these lines
APT::Periodic::Update-Package-List "1";
APT::Periodic::AutocleanInterval "5";
APT::Periodic::Unattended-Upgrade "1";
APT::Periodic::Verbose "1";

Test Unattended upgrades

unattended-upgrade --debug --dry-run

Installing Tor

Install https perrequeset, to enable all package managers using the libapt-pkg library to access metadata and packages available in sources accessible over https.

apt install apt-transport-https

Find the version of Linux you are using

lsb_release -c

Create a new sources file

nano /etc/apt/sources.list.d/tor.list

Add these two repos, and replace <distro> with your version of Linux.

deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org <distro> main

deb-src [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org <distro> main

Add the GPG key used to sign the packages by running the following command as root at your command prompt:

wget -qO- https://deb.torproject.org/torproject.org/A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89.asc | gpg --dearmor | tee /usr/share/keyrings/tor-archive-keyring.gpg >/dev/null

Install Tor and Tor Debian keyring to help you keep the Tor signing key current

apt update && apt upgrade -y 

apt install tor deb.torproject.org-keyring

Step 2 Setup Apache

Apache is available in the main repository of multiple Linux and *BSD distributions. To install apache2 package:

apt install apache2

Step 3 Configure Tor

Uncommit these two lines in your tor config file (torrc)

nano /etc/tor/torrc

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

Step 4 Restart Tor and see if it worked

Restart Tor and check the hidden_service directory for your onion address

systemctl restart tor

cat /var/lib/tor/hidden_service/hostname
<Yoursupersecreteonionsite>.onion

Open the Onion browser and see if you can reach your Onion web address.

Step 5 Create a vanity onion hostname (Optional)

Install the tool mkp2240

Install the requirements first

apt install gcc libc6-dev libsodium-dev make autoconf

Download the git Repo

git clone https://github.com/cathugger/mkp224o.git

Change directories into mkp2240

cd mkp224o

Build

./autogen.sh
./configure
make

Run the generator to create your vanity address, which will create a key based off of itst at the beginning of the address and store it in vanityonionkey folder in your home directory.

./mkp224o itst -v -n 1 -d ~/vanityonionkey -t 4

Copy your new key to the hidden service directory

cp -r ~/vanityonionkey/youraddressname/* /var/lib/tor/hidden_service/

Restart ToR, then navigate to your new address and see if it works.

systemctl restart tor
Scroll to Top