Getting Zeronet to work on eos

Ok, I just spent the last hour or two figuring this out, so I thought I’d share with the crew.

I wanted to play with Zeronet, which is an alternative network which uses Bittorrent & Bitcoin’s cryptography to host uncensorable websites. It’s a network similar to I2P, Tor, and Freenet.

You can find out more about it here:
website
https://zeronet.io/
docs
https://zeronet.readthedocs.io/en/latest/
faq
https://zeronet.io/docs/faq/

The arch wiki page is here:
https://wiki.archlinux.org/title/ZeroNet

In the arch wiki they tell you to download the aur package and then tell you to edit some config files to use Zeronet over Tor by default, which is beneficial because it can conceal your IP address.

Zeronet comes configured to use clearnet & tor, and the arch wiki shows how to make it only use Tor. If you use it over clearnet, peers can see your IP address, which may or not be good depending on your use case.

The package in the AUR did not work for me, I couldn’t get it to work over localhost on clearnet or over Tor. I tried to search for solutions and troubleshoot, but I eventually gave up and uninstalled the AUR version.

Instead, I installed it from the Zeronet website, as described in the Zeronet github:

  • wget https://github.com/HelloZeroNet/ZeroNet-linux/archive/dist-linux64/ZeroNet-py3-linux64.tar.gz
  • tar xvpfz ZeroNet-py3-linux64.tar.gz
  • cd ZeroNet-linux-dist-linux64/
  • Start with: ./ZeroNet.sh
  • Open the ZeroHello landing page in your browser by navigating to: http://127.0.0.1:43110/

If it worked, you should be able to see the Zeronet Hello Page which looks like this

From there you can see the Port Button & Tor Buttons at the top. When I first visited the site Tor was giving me an error:

Tor Error: Status: Error ([Errno 13] Permission denied: ‘/var/lib/tor/control_auth_cookie’)

I had to configure Tor as described in the arch wiki page with two additional steps.

Archwiki instructions:

Tor

By default, ZeroNet uses clearnet and Tor if available. To enable Tor support you first need to install Tor. Then, give ZeroNet access to control Tor using the following instructions.

sudo usermod -a -G tor zeronet

Append or edit the following options in /etc/tor/torrc:

ControlPort 9051
DataDirectoryGroupReadable 1
CacheDirectoryGroupReadable 1
CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFile /var/lib/tor/control_auth_cookie

You may also want to start/enable tor.service.

Eventually check Tor file permissions

#stat -c %a /var/lib/tor

should print 750. if not, run sudo chmod 0750 /var/lib/tor

To force all ZeroNet connections through Tor,
append to your /etc/zeronet.conf file

tor = always

The two additional steps that I had to do were:

  1. Add my user to the Tor group (not just zeronet):

sudo usermod -a -G tor youruser

  1. I had to add this additional line to the /etc/tor/torrc file

ExtORPortCookieAuthFileGroupReadable 1

Then I had to reboot.

After rebooting I launched zeronet with ./ZeroNet.sh

This time Tor was working, and I was able to click the Tor button and activate “Always Tor Mode”

Then I re-Iaunched zeronet with ./ZeroNet.sh

This closed the clearnet port on the ports button and now my Zeronet is working only over Tor.

This github thread helped me figure out how to troubleshoot this. Going to include it in case it helps:

Hopefully this was easy to follow, makes sense and is clear and helpful.

1 Like