2014-08-19 18:24:38 +00:00
|
|
|
.. -*- coding: utf-8-with-signature-unix; fill-column: 73; -*-
|
|
|
|
.. -*- indent-tabs-mode: nil -*-
|
2013-11-08 20:31:08 +00:00
|
|
|
|
2011-05-10 19:16:50 +00:00
|
|
|
=====================
|
|
|
|
How To Run Tahoe-LAFS
|
|
|
|
=====================
|
|
|
|
|
|
|
|
Intro
|
|
|
|
=====
|
|
|
|
|
2011-05-10 19:36:53 +00:00
|
|
|
This is how to run a Tahoe-LAFS client or a complete Tahoe-LAFS grid.
|
|
|
|
First you have to install the Tahoe-LAFS software, as documented in
|
2013-11-11 22:04:11 +00:00
|
|
|
quickstart.rst_.
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2011-05-10 19:36:53 +00:00
|
|
|
The ``tahoe`` program in the ``bin`` directory is used to create,
|
|
|
|
start, and stop nodes. Each node lives in a separate base directory, in
|
|
|
|
which there is a configuration file named ``tahoe.cfg``. Nodes read and
|
2011-05-10 19:16:50 +00:00
|
|
|
write files within this base directory.
|
|
|
|
|
2011-05-10 19:36:53 +00:00
|
|
|
A grid consists of a set of *storage nodes* and *client nodes* running
|
|
|
|
the Tahoe-LAFS code. There is also an *introducer node* that is
|
2011-05-10 19:16:50 +00:00
|
|
|
responsible for getting the other nodes talking to each other.
|
|
|
|
|
2013-11-11 22:04:11 +00:00
|
|
|
If you're getting started we recommend you try connecting to the `public test
|
|
|
|
grid`_ as you only need to create a client node. When you want to create your
|
|
|
|
own grid you'll need to create the introducer and several initial storage
|
|
|
|
nodes (see the note about small grids below).
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2011-05-10 19:36:53 +00:00
|
|
|
If the Tahoe-LAFS ``bin`` directory is not on your PATH, then in all
|
2011-05-10 19:16:50 +00:00
|
|
|
the command lines below, specify the full path to ``bin/tahoe``.
|
|
|
|
|
2014-08-19 18:24:38 +00:00
|
|
|
To construct a client node, run “``tahoe create-client``”, which will create
|
2013-11-11 22:04:11 +00:00
|
|
|
``~/.tahoe`` to be the node's base directory. Acquire the ``introducer.furl``
|
|
|
|
(see below if you are running your own introducer, or use the one from the
|
|
|
|
`TestGrid page`_), and paste it after ``introducer.furl =`` in the
|
2014-08-19 18:24:38 +00:00
|
|
|
``[client]`` section of ``~/.tahoe/tahoe.cfg``. Then use “``tahoe run
|
|
|
|
~/.tahoe``”. After that, the node should be off and running. The first thing
|
2013-11-11 22:04:11 +00:00
|
|
|
it will do is connect to the introducer and get itself connected to all other
|
|
|
|
nodes on the grid.
|
2011-07-18 00:59:49 +00:00
|
|
|
|
2014-08-19 18:24:38 +00:00
|
|
|
By default, “``tahoe create-client``” creates a client-only node, that
|
2011-07-17 19:43:15 +00:00
|
|
|
does not offer its disk space to other nodes. To configure other behavior,
|
2014-08-19 18:24:38 +00:00
|
|
|
use “``tahoe create-node``” or see configuration.rst_.
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2011-05-10 19:36:53 +00:00
|
|
|
To construct an introducer, create a new base directory for it (the
|
2011-05-10 19:16:50 +00:00
|
|
|
name of the directory is up to you), ``cd`` into it, and run
|
2014-08-19 18:24:38 +00:00
|
|
|
“``tahoe create-introducer .``”. Now run the introducer using
|
|
|
|
“``tahoe start .``”. After it starts, it will write a file named
|
2013-03-20 22:10:47 +00:00
|
|
|
``introducer.furl`` into the ``private/`` subdirectory of that base
|
|
|
|
directory. This file contains the URL the other nodes must use in order
|
2014-08-19 18:24:38 +00:00
|
|
|
to connect to this introducer. (Note that “``tahoe run .``” doesn't
|
2013-11-11 22:04:11 +00:00
|
|
|
work for introducers, this is a known issue: `#937`_.)
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2014-08-19 18:24:38 +00:00
|
|
|
The “``tahoe run``” command above will run the node in the foreground.
|
2011-05-10 19:36:53 +00:00
|
|
|
On Unix, you can run it in the background instead by using the
|
2014-08-19 18:24:38 +00:00
|
|
|
“``tahoe start``” command. To stop a node started in this way, use
|
|
|
|
“``tahoe stop``”. ``tahoe --help`` gives a summary of all commands.
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2013-11-11 22:04:11 +00:00
|
|
|
See configuration.rst_ for more details about how to configure Tahoe-LAFS,
|
|
|
|
including how to get other clients to connect to your node if it is behind a
|
|
|
|
firewall or NAT device.
|
|
|
|
|
|
|
|
.. _quickstart.rst: quickstart.rst
|
|
|
|
.. _public test grid: https://tahoe-lafs.org/trac/tahoe-lafs/wiki/TestGrid
|
|
|
|
.. _TestGrid page: https://tahoe-lafs.org/trac/tahoe-lafs/wiki/TestGrid
|
|
|
|
.. _configuration.rst: configuration.rst
|
|
|
|
.. _#937: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/937
|
|
|
|
|
2011-05-10 19:16:50 +00:00
|
|
|
|
|
|
|
A note about small grids
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
By default, Tahoe-LAFS ships with the configuration parameter
|
2013-11-11 22:04:11 +00:00
|
|
|
``shares.happy`` set to 7. If you are using Tahoe-LAFS on a grid with fewer
|
2014-08-19 18:24:38 +00:00
|
|
|
than 7 storage nodes, this won't work well for you — none of your uploads
|
2013-11-11 22:04:11 +00:00
|
|
|
will succeed. To fix this, see configuration.rst_ to learn how to set
|
2011-06-09 22:37:19 +00:00
|
|
|
``shares.happy`` to a more suitable value for your grid.
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2013-11-11 22:04:11 +00:00
|
|
|
|
2011-05-10 19:16:50 +00:00
|
|
|
Do Stuff With It
|
|
|
|
================
|
|
|
|
|
|
|
|
This is how to use your Tahoe-LAFS node.
|
|
|
|
|
|
|
|
The WUI
|
|
|
|
-------
|
|
|
|
|
2014-08-19 18:24:38 +00:00
|
|
|
Point your web browser to `http://127.0.0.1:3456`_ — which is the URL of the
|
|
|
|
gateway running on your own local computer — to use your newly created node.
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2014-08-19 18:24:38 +00:00
|
|
|
Create a new directory (with the button labelled “create a directory”).
|
2011-05-10 19:36:53 +00:00
|
|
|
Your web browser will load the new directory. Now if you want to be
|
|
|
|
able to come back to this directory later, you have to bookmark it, or
|
|
|
|
otherwise save a copy of the URL. If you lose the URL to this directory,
|
2011-05-10 19:16:50 +00:00
|
|
|
then you can never again come back to this directory.
|
|
|
|
|
2013-11-11 22:04:11 +00:00
|
|
|
.. _http://127.0.0.1:3456: http://127.0.0.1:3456
|
|
|
|
|
|
|
|
|
2011-05-10 19:16:50 +00:00
|
|
|
The CLI
|
|
|
|
-------
|
|
|
|
|
2014-08-19 18:24:38 +00:00
|
|
|
Prefer the command-line? Run “``tahoe --help``” (the same command-line tool
|
2013-11-11 22:04:11 +00:00
|
|
|
that is used to start and stop nodes serves to navigate and use the
|
|
|
|
decentralized filesystem). To get started, create a new directory and mark it
|
2014-08-19 18:24:38 +00:00
|
|
|
as the 'tahoe:' alias by running “``tahoe create-alias tahoe``”. Once you've
|
|
|
|
done that, you can do “``tahoe ls tahoe:``” and “``tahoe cp LOCALFILE
|
|
|
|
tahoe:foo.txt``” to work with your filesystem. The Tahoe-LAFS CLI uses
|
2013-11-11 22:04:11 +00:00
|
|
|
similar syntax to the well-known scp and rsync tools. See CLI.rst_ for more
|
|
|
|
details.
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2014-08-19 18:24:38 +00:00
|
|
|
To backup a directory full of files and subdirectories, run “``tahoe backup
|
|
|
|
LOCALDIRECTORY tahoe:``”. This will create a new LAFS subdirectory inside the
|
|
|
|
“tahoe” LAFS directory named “Archive”, and inside “Archive”, it will create
|
|
|
|
a new subdirectory whose name is the current date and time. That newly
|
|
|
|
created subdirectory will be populated with a snapshot copy of all files and
|
|
|
|
directories currently reachable from LOCALDIRECTORY. Then ``tahoe backup``
|
|
|
|
will make a link to that snapshot directory from the “tahoe” LAFS directory,
|
|
|
|
and name the link “Latest”.
|
|
|
|
|
|
|
|
``tahoe backup`` cleverly avoids uploading any files or directories that
|
|
|
|
haven't changed, and it also cleverly deduplicates any files or directories
|
|
|
|
that have identical contents to other files or directories that it has
|
|
|
|
previously backed-up. This means that running ``tahoe backup`` is a nice
|
|
|
|
incremental operation that backs up your files and directories efficiently,
|
|
|
|
and if it gets interrupted (for example by a network outage, or by you
|
|
|
|
rebooting your computer during the backup, or so on), it will resume right
|
|
|
|
where it left off the next time you run ``tahoe backup``.
|
|
|
|
|
|
|
|
See `<frontends/CLI.rst>`__ for more information about the ``tahoe backup``
|
|
|
|
command, as well as other commands.
|
|
|
|
|
2011-05-10 19:36:53 +00:00
|
|
|
As with the WUI (and with all current interfaces to Tahoe-LAFS), you
|
|
|
|
are responsible for remembering directory capabilities yourself. If you
|
|
|
|
create a new directory and lose the capability to it, then you cannot
|
2011-05-10 19:16:50 +00:00
|
|
|
access that directory ever again.
|
|
|
|
|
2013-11-11 22:04:11 +00:00
|
|
|
.. _CLI.rst: frontends/CLI.rst
|
|
|
|
|
|
|
|
|
2011-05-10 19:16:50 +00:00
|
|
|
The SFTP and FTP frontends
|
|
|
|
--------------------------
|
|
|
|
|
2013-11-11 22:04:11 +00:00
|
|
|
You can access your Tahoe-LAFS grid via any SFTP_ or FTP_ client.
|
|
|
|
See `FTP-and-SFTP.rst`_ for how to set
|
2011-05-10 19:36:53 +00:00
|
|
|
this up. On most Unix platforms, you can also use SFTP to plug
|
2014-08-05 20:50:30 +00:00
|
|
|
Tahoe-LAFS into your computer's local filesystem via ``sshfs``, but see
|
|
|
|
the `FAQ about performance problems`_.
|
2011-05-10 19:16:50 +00:00
|
|
|
|
2013-11-11 22:04:11 +00:00
|
|
|
The SftpFrontend_ page on the wiki has more information about using SFTP with
|
|
|
|
Tahoe-LAFS.
|
|
|
|
|
|
|
|
.. _SFTP: https://en.wikipedia.org/wiki/SSH_file_transfer_protocol
|
2014-08-05 20:50:30 +00:00
|
|
|
.. _FTP: https://en.wikipedia.org/wiki/File_Transfer_Protocol
|
2013-11-11 22:04:11 +00:00
|
|
|
.. _FTP-and-SFTP.rst: frontends/FTP-and-SFTP.rst
|
2014-08-05 20:50:30 +00:00
|
|
|
.. _FAQ about performance problems: https://tahoe-lafs.org/trac/tahoe-lafs/wiki/FAQ#Q23_FUSE
|
2013-11-11 22:04:11 +00:00
|
|
|
.. _SftpFrontend: https://tahoe-lafs.org/trac/tahoe-lafs/wiki/SftpFrontend
|
|
|
|
|
2011-05-10 19:16:50 +00:00
|
|
|
|
|
|
|
The WAPI
|
|
|
|
--------
|
|
|
|
|
2011-05-10 19:36:53 +00:00
|
|
|
Want to program your Tahoe-LAFS node to do your bidding? Easy! See
|
2013-11-11 22:04:11 +00:00
|
|
|
webapi.rst_.
|
|
|
|
|
|
|
|
.. _webapi.rst: frontends/webapi.rst
|
|
|
|
|
2011-05-10 19:16:50 +00:00
|
|
|
|
|
|
|
Socialize
|
|
|
|
=========
|
|
|
|
|
|
|
|
You can chat with other users of and hackers of this software on the
|
2013-11-11 22:04:11 +00:00
|
|
|
#tahoe-lafs IRC channel at ``irc.freenode.net``, or on the `tahoe-dev mailing
|
|
|
|
list`_.
|
|
|
|
|
|
|
|
.. _tahoe-dev mailing list: https://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev
|