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
- A hosted hidden service
- Build tools installed:
$ sudo apt install gcc libc6-dev libsodium-dev make autoconf git -y
Steps
-
Clone the Repository
$ git clone https://github.com/cathugger/mkp224o.git
-
Navigate into the Project Directory
$ cd mkp224o
-
Build from Source
Run the autogen script:
$ sudo ./autogen.sh
Configure the build:
$ sudo ./configure
Compile the application:
$ sudo make
-
Generate Your Vanity Onion Address
$ sudo ./mkp224o test -v -n 1 -d ~/ONION -t 4
-
Use Your New Onion Address
- Delete the old host and key files from your hidden service directory:
/var/lib/tor/hidden_service
- Copy the newly generated host file and keys to
/var/lib/tor/hidden_service
. - Restart the TOR service:
$ sudo systemctl restart tor
After restarting, your hidden service will be available via the new vanity onion address!
- Delete the old host and key files from your hidden service directory:
Command Breakdown
- test: The string to appear at the beginning of the .onion address.
- -v: Verbose mode (more detailed output).
- -n 1: Generate 1 matching address.
- -d ~/ONION: Output directory for the keys.
- -t 4: Use 4 CPU threads for the search.
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
- Delete the old host and key files from your hidden service directory:
/var/lib/tor/hidden_service
- Copy the newly generated host file and keys to
/var/lib/tor/hidden_service
. - Restart the TOR service:
$ sudo systemctl restart tor
After restarting, your hidden service will be available via the new vanity onion address!