Skip to content

How to Host a Website on the I2P Anonymous Network ​

Written by: Δ°rem Kuyucu

The Invisible Internet Project (I2P) is a distributed network built on top of the internet. By design, the traffic within I2P is anonymized and decentralized enabling the free flow of information without censorship, protecting users from political threats and surveillance.

In this guide we will explain how to host a website on I2P network. Alternatively, you can contact us for eepsite hosting.

I2P logo and mascot with Digilol addresses

Install I2P ​

There are 2 flavors of I2P routers:

  1. i2p (Java) from geti2p.net
  2. i2pd (C++) from PurpleI2P

We recommend the C++ implementation from PurpleI2P and will be using it in this guide.

Follow the installation instructions for your OS or if you are using Debian 12 run the following commands as root user.

shell
apt install -y apt-transport-https
wget -qO - https://repo.i2pd.xyz/.help/add_repo | bash -s -
apt update
apt install -y i2pd

Configure I2P HTTP Server Tunnel ​

Configure i2pd to create HTTP server tunnel and generate keys.

Create a config file /etc/i2pd/tunnels.conf.d/digilol.net.conf and populate it as in the example.

ini
[anon-website]
type = http
host = 127.0.0.1
port = 8095
keys = digilol.net.dat

We in later steps will bind a webserver to the following port number on localhost interface so choose one that is available for you. We chose 8095.

Restart i2pd service: systemctl restart i2pd

By now it should have generated the keys at /var/lib/i2pd/digilol.net.dat. And you can find the b32 address of your service under /var/lib/i2pd/destinations directory.

# ls -l /var/lib/i2pd/destinations
total 8
-rw-r----- 1 i2pd i2pd 512 Mar 31 17:16 un5a63xeqltbvrdm456fggcxqnwwbio5zzfjhjh3v5bxvaza5saq.0.dat
-rw-r----- 1 i2pd i2pd 512 Mar 31 17:16 un5a63xeqltbvrdm456fggcxqnwwbio5zzfjhjh3v5bxvaza5saq.4.dat

Our I2P website address will be: un5a63xeqltbvrdm456fggcxqnwwbio5zzfjhjh3v5bxvaza5saq.b32.i2p.

Configure Web Server ​

We like to use Caddy for this. On Debian 12 it can be installed by running the following commands as root user.

shell
apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | tee /etc/apt/sources.list.d/caddy-stable.list
apt update
apt install -y caddy

Modify your Caddy config located at /etc/caddy/Caddyfile.

http://un5a63xeqltbvrdm456fggcxqnwwbio5zzfjhjh3v5bxvaza5saq.b32.i2p:8095 {
        bind 127.0.0.1
        root * /var/www/digilol.b32.i2p
        file_server
}

It must contain http:// part and be bound to the port we chose when configuring the HTTP tunnel in the previous step. In our case it's 127.0.0.1:8095.

In our example /var/www/digilol.b32.i2p directory contains our website files.

Reload Caddy service: systemctl reload caddy.

Your website should be live now!

Register on an Address Book (optional) ​

Currently http://un5a63xeqltbvrdm456fggcxqnwwbio5zzfjhjh3v5bxvaza5saq.b32.i2p is a long and human unfriendly address, luckily address books exist and we can claim shorter addresses. For this you will need regaddr from i2pd-tools and one of the address books:

reg.i2p domain registration form

Install i2pd-tools ​

This is a repository that contains helper binaries for I2P. You will need a binary called regaddr from here.

Most likely, i2pd-tools isn't packaged for your OS. You will need to clone the repository from PurpleI2P/i2pd-tools and compile it yourself. On Debian 12 this can be done by running the following commands.

shell
apt install -y git
git clone --recursive https://github.com/purplei2p/i2pd-tools
cd i2pd-tools
./dependencies.sh
make

In order to generate the auth string use the regaddr tool like so:

shell
./regaddr /var/lib/i2pd/digilol.net.dat digilol.i2p

Provide your key file and the short domain you would like to use as arguments. The output of this command is your auth string.

It takes around 5 days to propagate in the network so don't worry if it doesn't work immediately after submitting. You can visit the Addresshelper link to add it to the router's addressbook right away.

reg.i2p domain successfully added page

Don't forget to add your new short domain to Caddy config /etc/caddy/Caddyfile as well:

http://digilol.i2p:8095 http://un5a63xeqltbvrdm456fggcxqnwwbio5zzfjhjh3v5bxvaza5saq.b32.i2p:8095 {
        bind 127.0.0.1
        root * /var/www/digilol.i2p
        file_server
}