Vanity Onion Addresses

2025-05-15


How To Create A Unique-ish Onionsite Address

Vanity

You're so vain

On the tor network, an onionsite address is derived from a public key, which is derived from a private key, which belongs to the creator/owner of the site. This private key provides the owner control of the site, proof of ownership, and more (so DON'T LOSE IT).

This is why onionsite addresses are very long, random strings of characters. To add a bit of a uniqueness that is human-readable, we can create an address with some custom characters at the front of the address. This is called a vanity address, which makes me want to watch The Last Dragon.

There's a catch, though. Since these are encryption keys, a computer has to put in some work to generate them. This only takes a second on a modern computer for a private key that can derive a random public address, but if we want a custom public key, we have to direct our computer to cycle through possible keypairs looking for a desired collision. This is trivial for a few characters, but required compute-hours required balloons quickly. Even with a powerful CPU (in 2025), you may not have the patience for more than a string of about 10 characters, so pick a concise, witty name.

Mining your address

We're going to use a vanity address generator called mkp224o (catchy name for generating vanity). You can follow the instructions there to build it on your system, or here's the quick'n'dirty guide (for Debian-based users):

  1. Open a terminal and install software dependencies
    sudo apt install gcc libc6-dev libsodium-dev make autoconf
  1. Clone the mkp224o repository into the current directory, then enter the new directory
   git clone https://github.com/cathugger/mkp224o.git && cd mkp224o
  1. Generate configure script
   ./autogen.sh
  1. Generate a makefile
   ./configure
  1. Start mining!! (Replace "desiredName" with the string you want to mine for)
   ./mkp224o -s desiredName

Remember that if this is 3-4 characters long, you'll find results quickly, for 5-7, you may need a bit of patience, and for 8-10 characters, it can take hours or days depending on your hardware and your luck (collisions are found randomly). I was able to generate 10 character addresses a few times, but with powerful hardware and a bit of patience/luck. You might even be visiting one right now, which took me a week to mine: neuromancyagntcawpetkumccghejsjuxc6vupespwhodfjyrmhovmyd.onion

Hosting your onionsite

In the next guide, we'll learn to serve an onionsite using your newly minted vanity address.

TIPS

On AMD64 platforms, you probably also want to pass an additional variable to the configure script invocation for faster key generation. You can reconfigure as many times as you need to and then run mkp224o again. There are more details, tips, and discussions on the github page.

   ./configure --enable-amd64-51-30k

For all the options, run:

   ./configure --help

While you're waiting, listen to Debarge or watch The Last Dragon.

The Last Dragon