? Editing: Post:21.body Save Delete Cancel


Welcome to the Linux forum!

+ Create new topic
Please wait...


^1 ^2 added ━ submitted by user_name

Main ZeroNet news How did you find ZeroNet?

How to Install and run Zeronet on any Linux server like Raspberry Pi (zeronet seedbox, public proxy)

Tutorial on how to Install and run Zeronet on any Linux computer like a virtual private server, Raspberry Pi..
Minimal hardware requirements: according to this tutorial, ZN should be able to run on 1GHz ARM CPU and 512MB RAM.
Lists of VPS offers: http://lowendstock.com/ & http://vps-list.cryto.net/index.php?action=list
Or check Storage kind of VPS plans at https://openvz.io/ , https://www.time4vps.eu/storage-vps/ , http://www.ramnode.com/vps.php (check OpenVZ HDD plans)
If you do not hury (can wait a few weeks) you can subscribe to ovh watchlist, and try to catch once they restock popular "Cortex" storage servers (€5/2TB HDD).
A) REDHAT/CENTOS: yum install epel-release -y;yum install python-pip python-devel
B) DEBIAN/UBUNTU: apt-get install python-dev python-pip python-cffi libffi-dev
then install:
pip install --upgrade pip
pip install cffi --upgrade
pip install gevent --upgrade
pip install msgpack-python --upgrade

A) redhat/centos: yum install python-cffi python-gevent python-msgpack
B) debian/ubuntu: apt-get install python-cffi python-gevent python-msgpack
But better would be to forget about errors and installing zeronet bundle which should contain everything needed. To do it, in the following command (one that starts by cd /home), do not enter address of master.tar.gz but the address of appropriate ZeroBundle - copy its URL address from this website: https://github.com/HelloZeroNet/ZeroBundle/tree/master/dist (32 vs 64 depends on your Linux type. If command "uname -a" shows 64 then you select one with 64 in its name).

cd /home;wget https://github.com/HelloZeroNet/ZeroNet/archive/master.tar.gz
tar -xzf master.tar.gz;rm -f master.tar.gz
mv ZeroNet-master zeronet;cd zeronet
OPTIONAL LINE (only for those with static IP & open port, make server act as zeronet tracker): mv plugins/disabled-Bootstrapper plugins/Bootstrapper
May be handy to append "multiuser_local" to the zeronet.conf file (it may not exist yet). my zeronet.conf looks like this:
fileserver_port = 15232
ui_ip = *
ui_port = 80
optional_limit = 90%
autodownload_bigfile_size_limit = 200
bigfile_size_limit = 1000

in that case, you would have to enable Multiuser plugin, command: mv plugins/disabled-Multiuser plugins/Multiuser

To make zeronet start after Linux boot
crontab -e
and then append new line:

@reboot /usr/bin/python /home/zeronet/zeronet.py &

(update to reflect your path)
To make zeronet start if it gets stopped, run command:
vi /root/runZNifnotrunning
append into file:

if [[ "$(ps auxf|grep -iE 'start.py|zeronet.py'|grep -Ev 'grep|siteDownload'|wc -l)" == "0" ]];then
/usr/bin/python /home/zeronet/zeronet.py &

(update your zeronet.py path above)

then run command:
chmod 600 /root/runZNifnotrunning

then add new crontab file that will execute above created script every minute:

echo -e "MAILTO=\"\"\n* * * * * root /bin/bash /root/runZNifnotrunning 2&1>/dev/null" > /etc/cron.d/zn;chmod 600 /etc/cron.d/zn

To enable Tor, follow: https://zeronet.io/docs/faq/#how-to-use-zeronet-with-tor
but in short, if you are logged in as a root, then following 3 commands should setup it:

  1. apt install tor -y 2>/dev/null || yum install tor 2>/dev/null
  2. sed -i "s|#ControlPort|ControlPort|g" /etc/tor/torrc;sed -i "s|#CookieAuthentication|CookieAuthentication|g" /etc/tor/torrc;sudo usermod -a -G debian-tor root 2>/dev/null
  3. chkconfig tor on 2>/dev/null;reboot
    (if 2nd command complains about sudo, then remove "sudo " from command)

ZN should be started by now. Open http://YOUR_SERVER_IP_ADDRESS:43110/ in your browser
Anyone in the world who know you server IP can access the zeronet and play with it. To protect your zeronet, you can use:

ui_restrict = IPaddressThatIsAllowedToAccessProxy

i thought there was also password protection, but not sure.

If you want to help seed many (3000+) sites, you can check this page.
If you are having maybe more than 1TB disk space and want to seed all kind of files, you may try to enable automatic downloading of all optional files on sites (on some sites tens of gigabytes) - do not worry about exhausting your server disk space, zeronet will take a care and delete files which are well seeded - just use zeronet.conf option: optional_limit = 90%
and it should maintain 10% disk space free). Related zeronet.conf options:
download_optional = auto

Take a note about also these config. options:
--autodownload_bigfile_size_limit MB
Also download bigfiles smaller than this limit if help
distribute option is checked (default: 1)
--bigfile_size_limit MB
Maximum size of downloaded big files (default: False)
Denies adding new sites by normal users (default:

(more by command: python zeronet.py --help)

Can also come handy: Linux bash script to periodicaly download sites recently added to "New ZeroNet Sites"

Is your server located in home LAN? If so and you want to use it as a primary zeronet access point without the need to install it on your desktop computer or android device? You may try to setup port forwarding so local ( IP gets forwarded/redirected to your server. Check Tusiko comment under this post. Or you may try Firefox Redirector plugin.

There are also another tutorials:
Tutorial: Run ZeroNet in Android by Linuxdeploy
Installing ZeroNet py3 version by Termux on Android

^4 ^5 ssdifnskdjfnsdjk posted on Jan 20, 2018
Please sign innew comment
user_nameadded ^1 ^2
romediuson Apr 09, 2019 ^1 ^2

Nice tutorial, once i find my spare raspberry pi i'll be sure to set it up.

This page is a snapshot of ZeroNet. Start your own ZeroNet for complete experience. Learn More