General

How to generate vanity addresses for your onions.

Started by AncientIdai · Jan 30, 2025

#5572
↳ Replying to @LiveBig69
Framework such as CodeIgniter or Laravel? I believe the first Silk Road by Ross Ulbricht was using CodeIgniter. As an oniondev with years of experience, I have used a number of them and sites are best compiled from scratch rather than borrowing someone elses code IMHO. We've seen the consequences and fallout from using pre-written markets on the darkweb.

Running darkweb sites is a bit different from running a clearnet site. It doesn't matter too much if you fuck up your source code on clearnet, but if you slip up on the darkweb one mistake could land you in prison for many years. Are you willing to take the risk?
#5573
↳ Replying to @HugBunter
Thank you guys for working so hard on this site, when you probably could have bounced with a massive bag years ago.
#5575
↳ Replying to @dopelinks
100% understand all that

i guess i was asking more so what frameworks if any have even been onion focused, is there really enough work to be a full time onionweb dev?
#5578
↳ Replying to @AncientIdai
There are a couple command line arguments worth mentioning:


-t NUMTHREADS specify number of threads to utilise
(default - try detecting CPU core count).
-n NUMKEYS specify number of keys (default - 0 - unlimited).


The first limits the number of CPU threads used so you can more reliably multitask while generating keys in the background.

The second will cause mkp224o to exit after successfully finding a certain number of domains.

So the following command would find one onion address beginning with 'VanityName' and then immediately exit.

$ mkp224o -n 1 VanityName


BACKUP YOUR DOMAIN KEYS. LOSE THE KEYS = LOSE THE DOMAIN!!

---

DONT SHARE YOUR KEYS OR LET SOMEONE ELSE GENERATE THEM. THEIR KEYS = THEIR DOMAIN!!

How to use the onion

Let's say you wanted to generate a vanity domain beginning with tinypp.

$ mkp224o -n 1 tinypp
sorting filters... done.
filters:
tinypp
in total, 1 filter
using # threads
tinypprc54cs5opw5z3tt6s7a6uvjsjgtlufrrj2bcprfnwp7rxhgpad.onion
waiting for threads to finish... done.


You should see that a directory named tinypprc54cs5opw5z3tt6s7a6uvjsjgtlufrrj2bcprfnwp7rxhgpad.onion was created with the following files inside:

hostname  hs_ed25519_public_key  hs_ed25519_secret_key


Your tor process will need access to these files, and be configured to use them.

I typically do this by moving the directory to tor's working directory and fixing permissions. I've renamed it to be a bit shorter.


$ sudo mv tinypprc54cs5opw5z3tt6s7a6uvjsjgtlufrrj2bcprfnwp7rxhgpad.onion /var/lib/tor/tinypp_service
$ sudo chown -R tor:tor /var/lib/tor/tinypp_service


If you were to list the files in /var/lib/tor/tinypp_service now you would see the same hostname hs_ed25519_public_key hs_ed25519_secret_key as before.

Now you can update your torrc file, which for me is located at /etc/tor/torrc and add the following two lines:


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


HiddenServiceDir just tells tor where you placed the directory you generated before.

HiddenServicePort declares which port is listening on the tor network ( 80 for plain http ), and which local service the connection should be tunneled to ( such as a nginx webserver running on 127.0.0.1:80)

After restarting tor and setting up a webserver to run on 127.0.0.1:80 you can open TorBrowser and browse to http://tinypprc54cs5opw5z3tt6s7a6uvjsjgtlufrrj2bcprfnwp7rxhgpad.onion to see your live service!

Members-only continuation

This discussion contains more posts.

Create an account or sign in to continue reading the full conversation. 10 additional posts await inside.

Create an accountSign in