ZeroNet: Difference between revisions

From ArchWiki
(→‎Creating ZeroNet sites: Make clear where data directory is set.)
 
(16 intermediate revisions by 13 users not shown)
Line 2: Line 2:
[[ja:ZeroNet]]
[[ja:ZeroNet]]
[[zh-hans:ZeroNet]]
[[zh-hans:ZeroNet]]
From [https://zeronet.io/ ZeroNet] gives access to "open, free and uncensorable websites, using Bitcoin cryptography and BitTorrent network".
[https://zeronet.io/ ZeroNet] gives access to "open, free and uncensorable websites, using Bitcoin cryptography and the BitTorrent network".


== Installation ==
== Installation ==
Line 17: Line 17:


=== Tor ===
=== Tor ===
By default, ZeroNet uses clearnet and Tor if available. To enable Tor support you first neet to install [[Tor]] via {{Pkg|tor}}. Then, give ZeroNet access to control Tor using the following instructions.


{{bc|
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.
# usermod -a -G tor zeronet
 
# mkdir -m 750 /var/lib/tor-auth
# usermod -a -G tor zeronet
# chown tor:tor /var/lib/tor-auth
}}


[[Append]] the following lines to {{ic|/etc/tor/torrc}}:
[[Append]] or edit the following options in {{ic|/etc/tor/torrc}}:
{{bc|
{{hc|/etc/tor/torrc|
ControlPort 9051
ControlPort 9051
DataDirectoryGroupReadable 1
CacheDirectoryGroupReadable 1
CookieAuthentication 1
CookieAuthentication 1
CookieAuthFileGroupReadable 1
CookieAuthFileGroupReadable 1
CookieAuthFile /var/lib/tor-auth/control_auth_cookie
CookieAuthFile /var/lib/tor/control_auth_cookie
}}
}}
You may also want to [[start/enable]] {{ic|tor.service}}.
Check the Tor file permissions:
# stat -c %a /var/lib/tor
This should print {{ic|750}}. if not, run {{bc|# chmod 0750 /var/lib/tor}}
To force all ZeroNet connections through Tor, append to your {{ic|/etc/zeronet.conf}} file
{{hc|/etc/zeronet.conf|2=tor = always}}


== Creating ZeroNet sites ==
== Creating ZeroNet sites ==


All operations, including editing ZeroNet site files, should be done as user {{ic|zeronet}}. Use {{ic|--config_file}} to specify the configuration file. {{ic|/etc/zeronet.conf}} use {{ic|/var/lib/zeronet}} as data directory by defaul. For example:
All operations, including editing ZeroNet site files, should be done as user {{ic|zeronet}}. Use {{ic|--config_file}} to specify the configuration file. {{ic|/etc/zeronet.conf}} use {{ic|/var/lib/zeronet}} as data directory by default. For example:
{{bc|
$ sudo -u zeronet python2 zeronet.py --config_file /etc/zeronet.conf
}}


Or
[zeronet]$ python zeronet.py --config_file /etc/zeronet.conf
 
{{bc|
$ sudo su - zeronet
$ cd /opt/zeronet
$ python2 zeronet.py --config_file /etc/zeronet.conf
}}


All zites you create will have their initial data folder setup in /var/lib/zeronet/[address]. For more information on how to create a Zite, please follow the guidelines on the [http://zeronet.readthedocs.io/en/latest/using_zeronet/create_new_site/ Zeronet FAQ].
All sites you create will have their initial data folder setup in {{ic|/var/lib/zeronet/''address''}}. For more information on how to create a Zite, please follow the guidelines on the [https://zeronet.readthedocs.io/en/latest/using_zeronet/create_new_site/ ZeroNet FAQ].


== See also ==
== See also ==

Latest revision as of 12:39, 10 November 2023

ZeroNet gives access to "open, free and uncensorable websites, using Bitcoin cryptography and the BitTorrent network".

Installation

Install the zeronetAUR package.

The latest development version is also available in the zeronet-gitAUR package

Configuration

Starting

To start ZeroNet start/enable zeronet.service.

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.

# usermod -a -G tor zeronet

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

/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.

Check the Tor file permissions:

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

This should print 750. if not, run

# chmod 0750 /var/lib/tor

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

/etc/zeronet.conf
tor = always

Creating ZeroNet sites

All operations, including editing ZeroNet site files, should be done as user zeronet. Use --config_file to specify the configuration file. /etc/zeronet.conf use /var/lib/zeronet as data directory by default. For example:

[zeronet]$ python zeronet.py --config_file /etc/zeronet.conf

All sites you create will have their initial data folder setup in /var/lib/zeronet/address. For more information on how to create a Zite, please follow the guidelines on the ZeroNet FAQ.

See also