{{tag>Brouillon Stockage FS}}
= Notes Tahoe-LAFS
https://www.digitalocean.com/community/tutorials/tahoe-lafs
**Brouillon. (source http://killyourtv.i2p/tahoe-lafs/running/)**
If you're not using a multi-introducer capable Tahoe installation, most are using killyourtv's introducer to connect to the grid so that would be a good choice to use as a primary introducer. Updating your Tahoe-LAFS installation is recommended.
If you're using the multi-introducer build, copy and paste the following into ~/.tahoe/introducers:
apt-get install tahoe-lafs
tahoe --version
Warning: dependency 'cryptography' (version '0.6.1') found by pkg_resources not found by import.
Warning: dependency 'six' (version '1.8.0') found by pkg_resources not found by import.
Warning: dependency 'cffi' (version '0.8.6') found by pkg_resources not found by import.
Warning: dependency 'pycparser' (version '2.10') found by pkg_resources not found by import.
For debugging purposes, the PYTHONPATH was
None
install_requires was
['setuptools >= 0.6c6', 'zfec >= 1.1.0', 'simplejson >= 1.4', 'zope.interface == 3.6.0, == 3.6.1, == 3.6.2, >= 3.6.5', 'Twisted >= 11.0.0', 'foolscap >= 0.6.3', 'pyOpenSSL', 'Nevow >= 0.6.0', 'pycrypto == 2.1.0, == 2.3, >= 2.4.1', 'pyasn1 >= 0.0.8a', 'mock >= 0.8.0', 'pycryptopp >= 0.6.0']
sys.path after importing pkg_resources was
/usr/bin:
/usr/lib/python2.7:
/usr/lib/python2.7/plat-x86_64-linux-gnu:
/usr/lib/python2.7/lib-tk:
/usr/lib/python2.7/lib-old:
/usr/lib/python2.7/lib-dynload:
/usr/local/lib/python2.7/dist-packages:
/usr/lib/python2.7/dist-packages:
/usr/lib/pymodules/python2.7
Voilà ce qui se passe quand on install des paquets de Debian Stretch sur Debian Jessie. C'est moche. Vive les virtualenv
Activer les dêpots de Debian Stretch
apt-get install tahoe-lafs python-cryptography python-pyasn1 python-cffi python-ply python-pycparser python-numpy
Autre solution
virtualenv tahoenv
cd tahoenv
source bin/activate
pip install --upgrade allmydata-tahoe
tahoe create-node
Node created in '/home/exploit/.tahoe'
Please set [client]introducer.furl= in tahoe.cfg!
The node cannot connect to a grid without it.
Please set [node]nickname= in tahoe.cfg
== Client node
A client node is used to communicate with storage nodes in order to store and retrieve files on the grid. There is a web interface (default on http://127.0.0.1:3456/) and a command line interface (via tahoe) for accessing this data. Other interfaces are available, see the Tahoe-LAFS site for details.
tahoe --version
tahoe create-client
Specify a nickname for your node. This is shown to all nodes in the grid so choose the nickname carefully.
Edit the configuration file ~/.tahoe/tahoe.cfg. Modify the following options, the other values should be left at the defaults for now:
[node]
nickname = yourclientnodename
web.port = tcp:3456:interface=127.0.0.1
http_proxy = 127.0.0.1:4444
tub.location =
~/.tahoe/tahoe.cfg
uncomment tub.location otherwise your (at worse external!) IP will be leaked to introducers:
In client section remove None word in introducer.furl,
Uncomment tub.location but leave it empty. This will prevent your other interfaces besides 127.0.0.1 from being broadcast to the introducer. /!\ WARNING: Make sure that you do this to avoid leaking your IP address! /!\
[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
[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/
== Upload
tahoe create-alias YOURALIAS
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 .tahoe\private\aliases file to get your private keys, and go into website: http://127.0.0.1:3456/uri/URI:DIR2:.
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:/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
== Introducer
Setting up and running your own introducer on I2P involves a few simple steps.
The first of these steps is to create the introducer node:
$ tahoe create-introducer ~/.tahoe/introducer
The introducer can exist anywhere on your filesystem. If you don't want it to be contained within your ~/.tahoe directory, simply specify a different directory.
Next, edit ~/.tahoe/introducer/tahoe.cfg. Fill out the web.port. In this example we'll use 3460:
[node]
web.port = tcp:3460:interface=127.0.0.1
web.static = public_html
Start your introducer:
$ tahoe start ~/.tahoe/introducer
$ cat introducer.port
17337
Choose Type: Standard (don't pick HTTP; it won't work). Point it to the port listed in introducer.port (in the example above, 17337).
Start the server tunnel and take note of the Base32 destination. Edit ~/.tahoe/introducer/tahoe.cfg once more and set the tub.location to the introducer's Base32 destination. Restart your introducer node once more.
$ tahoe restart ~/.tahoe/introducer
At this point you have an introducer running and a tunnel pointing to it so it can be used on I2P. Of course, no one will be able to use your introducer without its existence being known. You will find the introducer.furl to give to others in the file ~/.tahoe/introducer/private/introducer.furl
$ cat ~/.tahoe/introducer/private/introducer.furl
pb://c6w5ernw7y7rp3uwmdyu5clujyt2y4m4@w2zrwz5gplkkufix7cb4gmxfbrkwg2abnsgk62bm5iifzlahe7kq.b32.i2p/introducer
Introducers on Tahoe-LAFS define the grid and their addresses should be published to everyone who wishes to connect to this grid. The example below points to a test introducer operated by KillYourTV. To use KYTV's introducer, add the following introducer.furl to tahoe.cfg.
[client]
introducer.furl = pb://c6w5ernw7y7rp3uwmdyu5clujyt2y4m4@w2zrwz5gplkkufix7cb4gmxfbrkwg2abnsgk62bm5iifzlahe7kq.b32.i2p/introducer
Add each introducer that you want to use to ~/.tahoe/introducers -- one per line! For example, I currently have
$ cat ~/.tahoe/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
You will need to restart your tahoe node after editing ~/.tahoe/introducers with tahoe restart. Any existing introducer.furl entries in tahoe.cfg will be automatically copied to ~/.tahoe/introducers.
== Node Operation
To start your node as a daemon:
$ tahoe start
You can now access your node via the web interface at http://127.0.0.1:3456.
To stop your node if running as daemon:
$ tahoe stop
== Storage node
~/.tahoe/tahoe.cfg
[node]
tub.port = tcp:3459:interface=127.0.0.1
tub.location = n6k7tu37diq4obmcmv3f144oxxxnehp6njz5lwu4hllp5gp6hbga.b32.i2p
[storage]
enabled = true
Optionally you may define how much disk space is reserved with reserved_space:
reserved_space = 5GB