Tahoe-LAFS: Difference between revisions

imported>Echarlie
No edit summary
imported>Mhazinsk
Update to latest instructions
Line 11: Line 11:
** Available in Arch's community repo
** Available in Arch's community repo
* Install various dependencies.
* Install various dependencies.
** On CentOS 6, you'll need to <code>yum -y install libffi libffi-devel python-devel openssl-devel</code>
** On Debian 9, install <code>python-txtorcon tahoe-lafs tor</code>
* Get the latest version of Tahoe-LAFS. To use it with Torsocks 2.x, you must use [https://github.com/tahoe-lafs/tahoe-lafs the latest version from their Github] containing [[User:Mjh|mhazinsk]]'s patch.
** On Debian 8, the distro packages are too old so you need to install things manually.
* Create a hidden service by editing the <code>torrc</code> file, usually found at <code>/etc/tor/torrc</code>. Add the following:
*** <code>pip2 install -U pyopenssl txtorcon tahoe-lafs</code>
  HiddenServiceDir /var/lib/tor/tahoe_storage/
*** Follow the Tor Project's [https://www.torproject.org/docs/debian.html.en instructions] for installing the latest stable version of tor on Debian Jessie.
  HiddenServicePort 4456 127.0.0.1:4456
** CentOS 6 is unsupported, as Tahoe-LAFS now requires Python 2.7.
* Get the hostname for the hidden service by restarting tor and running <code>cat /var/lib/tor/tahoe_storage/hostname</code>
* Edit <code>/etc/tor/torrc</code> and uncomment the <code>ControlPort 9051</code> line, then restart tor.
* cd to where you cloned the Tahoe-LAFS repo and do the following:
* Edit the tahoe defaults file (<code>/etc/defaults/tahoe-lafs</code>) to start your nodes along with tahoe-lafs startup. Note that in this example, I have two node directories underneath "/srv/tahoe-storage", "introducer" and "tor-storage". For most users you should only have one node directory for storage.
** <code>python setup.py build</code> to build the necessary binaries
<pre>
** <code>bin/tahoe create-node ''path''</code> to create a Tahoe directory in the given ''path''. Note that your this will be used for both configuration data and encrypted blob storage.
# Start only these tahoe-lafs nodes automatically via init script. Allowed
** <code>vim ''path''/tahoe.cfg</code> and make it look like the following:
# values are "all", "none" or space separated list of tahoe-lafs nodes. If
  [node]
# empty, "none" is assumed.
  # Nicknames are optional but useful
#
  nickname = mhazinsk-2 
#AUTOSTART="all"
  # Optional web interface.  
AUTOSTART="introducer tor-storage"
  web.port = tcp:3456:interface=127.0.0.1 
#AUTOSTART="home office"
  web.static = public_html
 
  # This is what what you defined in tor.
# Pass arguments to tahoe start. Default to "--syslog".
  tub.port = tcp:4456:interface=127.0.0.1
DAEMONARGS="--syslog"
  tub.location = yourhiddenservicehostname.onion:4456
CONFIG_DIR="/srv/tahoe-storage"
 
</pre>
  [client]
* Create a Tahoe user and add it to the tor group
  introducer.furl = pb://getthisstringfromanofficer@hiddenservice.onion:37204/otherstuff
** <code>useradd tahoe-lafs</code>
 
** <code>usermod -aG debian-tor tahoe-lafs</code>
  [storage]
* Create the appropriate tahoe services,  and start them:
  enabled = true
** <code>sudo -u tahoe-lafs tahoe create-node --listen=tor -n YOUR_NODE_NAME -C /srv/tahoe-storage/vtluug-tor-storage -i GET_THIS_STRING_FROM_AN_OFFICER</code>
  # You can change this if you have less space, but less than a
** <code>systemctl start tahoe-lafs</code>
  # few 10's of GB is not useful
 
  reserved_space = 100G
  expire.enabled = true
  expire.mode = age
  expire.override_lease_duration = 2 month
 
  # Read tahoe's docs if you want to use the other options
  [helper]
  enabled = false
 
  [drop_upload]
  enabled = false
* Finally, run <code>torify bin/tahoe start ''path''</code>. This will daemonize.


=== Tuning ===
=== Tuning ===