Tahoe-LAFS

From I2P Wiki
Jump to navigation Jump to search

Tahoe-LAFS (Tahoe Least-Authority Filesystem) is a Free and Open cloud storage system. It distributes your data across multiple servers. Even if some of the servers fail or are taken over by an attacker, the entire filesystem continues to function correctly, preserving your privacy and security.

Since Version 1.12.0, Tahoe-LAFS supports I2P natively. There is an I2P port of an older version that KillYourTV wrote, but there are some differences.


Tahoe-LAFS I2P-Port by KillYourTV

How to get Tahoe-LAFS for I2P

Windows

Download Tahoe from one of these sources:

Remember to check signatures if you do not download the software from the official website.

Linux

Download Tahoe from one of these sources:

Remember to check signatures if you do not download the software from the official website.

Running a client node

Windows

Check if Tahoe is installed correctly by opening Windows Command Line (press Win+R and type cmd) then typing: tahoe --version, you should see something like this:

allmydata-tahoe: 1.10.0
foolscap: 0.6.4
pycryptopp: 0.6.0.1206569328141510525648634803928199668821045408958
zfec: 1.4.22
Twisted: 11.0.0
Nevow: 0.10.0
zope.interface: unknown
python: 2.7.7
platform: Windows-7-6.1.7601-SP1
pyOpenSSL: 0.13.1
simplejson: 3.5.2
pycrypto: 2.4.1
pyasn1: 0.1.7
mock: 1.0.1

Create a new client by typing in the console: tahoe create-client.

Go into C:\Users\<YourUserName>\.tahoe catalog, open tahoe.cfg file in notepad, in section node enter any nickname, change http_proxy to 127.0.0.1:4444, uncomment tub.location otherwise your (at worse external!) IP will be leaked to introducers:

[node]
nickname = YourRandomNickname
web.port = tcp:3456:interface=127.0.0.1
web.static = public_html
http_proxy = 127.0.0.1:4444
# **IMPORTANT**
# You NEED to configure tub.location when running
# an I2P-enabled Tahoe-LAFS node. Otherwise your IP
# can be leaked to the introducers!
# Read the docs and/or come to #tahoe-lafs on Irc2P for assistence.
#tub.port =
tub.location =
#log_gatherer.furl =
#timeout.keepalive =
#timeout.disconnect =
#ssh.port = 8022
#ssh.authorized_keys_file = ~/.ssh/authorized_keys

In client section remove None word in introducer.furl, save and exit the file:

[client]
# Which services should this client connect to?
introducer.furl =
helper.furl =
#key_generator.furl =
#stats_gatherer.furl =

Create introducers file (without .txt extension) and paste the list of introducers from http://killyourtv.i2p/tahoe-lafs/introducers/:

pb://c6w5ernw7y7rp3uwmdyu5clujyt2y4m4@w2zrwz5gplkkufix7cb4gmxfbrkwg2abnsgk62bm5iifzlahe7kq.b32.i2p/introducer
pb://exupps5kk3amc5iq4q6f5ahggkm4s5fl@oj7cffq5fnk46iw3i3h2sdgncxrqbxm7wh6i4h2cbpmqsydygkcq.b32.i2p/introducer
pb://md2tltfmdjvzptg4mznha5zktaxatpmz@5nrsgknvztikjxnpvidlokquojjlsudf7xlnrnyobj7e7trdmuta.b32.i2p/introducer
pb://fmcbgy7zd6ubrbphilmrlocvb7f327z5@gdr3tt5uewgnm7r7xn54k2qikf2kuwwegjjsnkz44pjticcacsua.b32.i2p/introducer
pb://tq7rx35yopkvodmsxkqra4qqkbho3yaa@6ga2r2h2fyq6tzcyh6bf3hpio3i7r4edadbq7l4wnh4y62taj6ia.b32.i2p/introducer
pb://cys5w43lvx3oi5lbgk6liet6rbguekuo@sagljtwlctcoktizkmyv3nyjsuygty6tpkn5riwxlruh3f2oze2q.b32.i2p/introducer
pb://r3bs6joub24gtsofe7ohnnjcnwfmo2jy@qaihdh5z7osn7tc3326ahv3z46badiuaulff43wchmap7skg7euq.b32.i2p/42mrbm7zxmjemz6hzejo3i7aunx4eoun

Open Start Tahoe-LAFS shortcut in your start menu, go into Tahoe summary page: http://127.0.0.1:3456/ to check if everything works, you should be connected to about 5 introducers and 18 storage servers.

Linux

There is a official documentation :

See: http://killyourtv.i2p/tahoe-lafs/install/ (backup: http://echelon.i2p/tahoelafs/backup/install.html )

Uploading a website

Open cmd and type :

tahoe create-alias YOURALIAS

to create an alias (not visible to other users).

Upload your website into grid using tahoe cp command:

tahoe cp -r -v "C:\pathtoyourdeepsite" YOURALIAS

This is very time consuming process, uploading a single 50MB files could be faster than uploading 150 files of 5MB total, so consider for example converting all small images into base64 and embedding them into html file.

After uploading, check if all files are uploaded:

tahoe ls YOURALIAS

Type

tahoe list-aliases

, or open C:\Users\"YourUserName"\.tahoe\private\aliases file to get your private keys, and go into website: http://127.0.0.1:3456/uri/URI:DIR2:<yourprivatekey>.

Click More info on this directory and copy your public key from Directory readcap, so your website address is: http://127.0.0.1:3456/uri/URI:DIR2-RO:<yourpublickey>/index.htm.

Never share address without URI:DIR2-RO (read only) otherwise others can vandalize/delete your site!

Older files will be deleted from the network (grid). To prevent this, run the following command from time to time (once per 2 months):

tahoe deep-check -v --repair --add-lease YOURALIAS


Official Tahoe-LAFS

Installation

pip (Clearnet)

Please note that this downloads from the clearnet. Assuming python 2 and pip is installed, run the following command:

pip install tahoe-lafs[i2p]

(Instead of pip, you might need to use either pip2, python -m pip or python2 -m pip.)

If configured correctly, you should be able to run tahoe.

In case of openssl error, try: apt-get install libssl-dev as root

Creating an node

Be sure that the I2P router is running and the SAM application bridge is activated in the clients settings. You can change the node-directory using the option -C directory. The default directory is ~/.tahoe. All related files are stored in that folder.

Run one of the following commands:

  • Client node: tahoe create-client --hide-ip
  • Storage node: tahoe create-node --hide-ip --listen=i2p
  • Introducer: tahoe create-introducer --hide-ip --listen=i2p

Then open the node-directory and open tahoe.cfg with your favorite text editor. Find [connections], and change the value of tcp from tor to disabled to make an I2P-only node.

I2P support is enabled by default, so you don't need further configuration. See #Custom I2P settings on how to configure for different I2P settings.

Running and stopping an node

To start an node, either run:

  • in background: tahoe start
  • in foreground: tahoe run

To stop an node, either press CTRL + C (in foreground-mode) or run tahoe stop. Run tahoe restart to restart the node.

Configuring multiple introducers

The introducer.furl-key in the configuration file tahoe.cfg only allows one introducer. To use multiple introducers, create the file private/introducers.yaml and open it with your favorite editor. The format is:

introducers:
    petname2:
      furl: FURL2
    petname3:
      furl: FURL3

The petnames is just an locally-unique identifier. You can leave introducer.furl empty. There's a list of introducers, taken from the introducer list above:

introducers:
    introducer_by_killyourtv:
      furl: pb://c6w5ernw7y7rp3uwmdyu5clujyt2y4m4@i2p:w2zrwz5gplkkufix7cb4gmxfbrkwg2abnsgk62bm5iifzlahe7kq.b32.i2p/introducer
    introducer_by_str4d:
      furl: pb://exupps5kk3amc5iq4q6f5ahggkm4s5fl@i2p:oj7cffq5fnk46iw3i3h2sdgncxrqbxm7wh6i4h2cbpmqsydygkcq.b32.i2p/introducer
    introducer_by_COMiX:
      furl: pb://md2tltfmdjvzptg4mznha5zktaxatpmz@i2p:5nrsgknvztikjxnpvidlokquojjlsudf7xlnrnyobj7e7trdmuta.b32.i2p/introducer
    introducer_by_Meeh:
      furl: pb://fmcbgy7zd6ubrbphilmrlocvb7f327z5@i2p:gdr3tt5uewgnm7r7xn54k2qikf2kuwwegjjsnkz44pjticcacsua.b32.i2p/introducer
    introducer_by_uddh:
      furl: pb://tq7rx35yopkvodmsxkqra4qqkbho3yaa@i2p:6ga2r2h2fyq6tzcyh6bf3hpio3i7r4edadbq7l4wnh4y62taj6ia.b32.i2p/introducer
    introducer_by_zoidberg:
      furl: pb://cys5w43lvx3oi5lbgk6liet6rbguekuo@i2p:sagljtwlctcoktizkmyv3nyjsuygty6tpkn5riwxlruh3f2oze2q.b32.i2p/introducer
    introducer_by_weldok:
      furl: pb://r3bs6joub24gtsofe7ohnnjcnwfmo2jy@i2p:qaihdh5z7osn7tc3326ahv3z46badiuaulff43wchmap7skg7euq.b32.i2p/42mrbm7zxmjemz6hzejo3i7aunx4eoun
    introducer_N2_by_zoidberg
      furl: pb://s3f75h3w2wo6fhwyhqynr4isz42lcevo@i2p:yv22edrf5y34rqcrn6f2kgfkaw6guq2wlm2wnaxmg4bgyq77htgq.b32.i2p/yvt2fmerjdapxxeqef5eo74zy5w7za73

Custom I2P settings

If you're using different I2P settings, tahoe might not be able to find the I2P SAM application port. Use the option --i2p-sam-port=tcp:address:port to specify the SAM application bridge address and port. The default is tcp:127.0.0.1:7656.

If you changed the I2P settings after the configuration, you need to edit the configuration file tahoe.cfg. Search for the section [i2p] or create one.

enabled
(default: true) Whenever I2P support is enabled
sam.port
(default: tcp:127.0.0.1:7656) Address and port to the SAM application bridge.
dest
Unknown, not described on the official documentation
dest.port
Unknown, not described on the official documentation

Example configuration used by tahoe create-node --hide-ip --listen=i2p:

[i2p]
dest = true
dest.port = 3457
sam.port = tcp:127.0.0.1:7656
dest.private_key_file = private/i2p_dest.privkey

Differences with the older I2P-Port

  • The introduces addresses for I2P contains an i2p: between the @-character and the b32-address.
  • When using multiple introduces, you'd use private/introducers.yaml instead of introducers, with an different format.
  • The official Tahoe-LAFS uses the SAM application bridge, the I2P-Port uses an explicit HTTP Proxy.


External Links

https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2875 grid currently broken on i2p ,because of this ticket