Creating a Vanity .onion Address with mkp224o

This method is tested on Debian and EndeavourOS. The guide will focus on Debian; the main difference for other distributions is the package manager.

Important: You do not need to run this on the server hosting the hidden service — you can generate the keys elsewhere and transfer them later.

Requirements

$ sudo apt install gcc libc6-dev libsodium-dev make autoconf git -y

Steps

  1. Clone the Repository

    $ git clone https://github.com/cathugger/mkp224o.git
  2. Navigate into the Project Directory

    $ cd mkp224o
  3. Build from Source

    Run the autogen script:

    $ sudo ./autogen.sh

    Configure the build:

    $ sudo ./configure

    Compile the application:

    $ sudo make
  4. Generate Your Vanity Onion Address

    $ sudo ./mkp224o test -v -n 1 -d ~/ONION -t 4
  5. Use Your New Onion Address

    1. Delete the old host and key files from your hidden service directory:
      /var/lib/tor/hidden_service
    2. Copy the newly generated host file and keys to /var/lib/tor/hidden_service.
    3. Restart the TOR service:
    4. $ sudo systemctl restart tor

    After restarting, your hidden service will be available via the new vanity onion address!

Command Breakdown

Adjust these options based on your hardware and preferences.

How Long Does It Take?

Because v3 onion addresses are 32-character Base32-encoded strings, the time needed increases rapidly:

Characters Estimated Time (4 Threads)
1–3 characters Almost instant to a few seconds
4 characters Up to a few minutes
5 characters Several minutes
6 characters 5 hours to 3 days
7 characters Several weeks to months
8+ characters Not recommended

Due to the random nature of the process, actual times can vary.

Using Your New Onion Address

  1. Delete the old host and key files from your hidden service directory:
    /var/lib/tor/hidden_service
  2. Copy the newly generated host file and keys to /var/lib/tor/hidden_service.
  3. Restart the TOR service:
  4. $ sudo systemctl restart tor

After restarting, your hidden service will be available via the new vanity onion address!