~/blog/"How to browse I2P from a Raspberry Pi"
2023-01-16
In this post, I’ll outline how I have set up a Raspberry Pi I had laying around the house to act as an I2P node, allowing me not only to browse I2P, but to help the network as well.
I’m not claiming this is the best way to do it. In fact, if you have any ideas on how to make it better, please let me know! But it’s probably a good starting point if you’re planing to play around with anonymous networks.
I’m assuming that you are familiar with the Linux command line, and have a Raspberry Pi already running on your home network. If there is interest in any of those topics, I can write some posts about them in the future.
Before you proceed
Please be aware that there are things on the darkweb that you’d rather not see, or are down right illegal and reprehensible. Fortunately, I have not run into any of them. I have been using I2P to browse random blogs and tinkering with the technology, but you may not be as lucky. Proceed at your own risk.
What is I2P?
I2P is a network layer, that allows anonymous and encrypted peer-to-peer communication. It’s similar to tor, but it won’t allow one to browse websites on the clearnet (at least, not directly). You can think of I2P as its own separate internet, where the sun always shines1
For a more detailed comparison, check out the official website.
Why a Raspberry Pi? Can’t I just install it on a regular computer? I have an old laptop I’m not using.
You can, but you probably don’t want to.
Another difference between tor and I2P is that each node also contributes to the network (even the people just browsing), while tor has dedicated machines acting as relays. In other words, you don’t just browse the network, but you contribute to it as well, by being one of the nodes which traffic flows through.
This means that when you connect to I2P, you won’t be able to browse any sites at first, as your node is not integrated with the network yet. It can take several hours until you start seeing some sites. Therefore, you want to keep it connected for long periods of time (ideally, 24/7). With the current energy prices, you may want to avoid doing this on a regular computer.
I don’t have a Raspberry Pi, but I do have a server that I already use for something else. Can I run it there?
You certainly can!
I haven’t tried it yet. So I’ll focus on a Raspberry Pi for now.
You can get the java version on the official website. However, I’ve found it to be unnecessarily heavy on my puny Raspberry Pi, so I switched to i2pd
. Even though it comes with less features out of the box (e.g. it does not include torrent or email capabilities built in), it’s written in C++, and is much lighter.
i2pd
and running itOn a Debian system, you can install it by running the following:
sudo apt-get install apt-transport-https
wget -q -O - https://repo.i2pd.xyz/.help/add_repo | sudo bash -s -
sudo apt-get update
sudo apt-get install i2pd
To start it, you can simply run:
i2pd
However, you probably want to start it in the background every time the Raspberry Pi boots up:
sudo systemctl enable i2pd.service # enable i2pd autostart
sudo systemctl disable i2pd.service # disable i2pd autostart
Great! You have i2pd up and running now. But how can you browse I2P websites (also known as eepsites)?
Unlike tor, i2pd does not ship with a dedicated browser, you have to configure your own browser to use it.
I prefer to have a separate browser just for I2P. So I installed librewolf and configured the connection settings as follows:
Once that’s done, you should be able to see your i2pd console by going to http://127.0.0.1:7070/
on librewolf.
So, you’ve got your Raspberry Pi set up, but it’s all the way over there, and you’re pretty comfy sitting on the couch with your laptop. What can you do?
Well, that’s pretty easy. All you have to do is to is run this on the computer you wish to browse I2P on:
ssh -fTNL 4444:127.0.0.1:4444 -L 7070:127.0.0.1:7070 <rpi-username>@<rpi-local-ip-address>
You can now browse from anywhere inside your house, as long as you are on the same network as the Raspberry Pi.
Unfortunately, the amount of sites available on I2P is fairly small, even compared with something like tor hidden services. However, you can find a big list of them here (notice the “http”, not “https”): http://identiguy.i2p. There are also search engines you can use, e.g. http://legwork.i2p.
For an RSS feed of the latest things happening on I2P, check out http://planet.i2p. Or maybe you’d like to browse some quality blogs like this one: http://orizuru.i2p (a bit of a shameless plug 🙂).
Wait, how do you host your own blog on I2P?
It’s actually pretty easy, and you can do it on the same Raspberry Pi. But I’ll leave that tutorial for another time.
EDIT (2023-01-26): Part 2 of this post is now available. It will teach you how to host a website on I2P.
1When trying to stay anonymous on the internet. Do not talk about anything that could be used to find out your location including the weather.