]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - docs/running.rst
whitespace change to trigger buildbot for 1.10-b1
[tahoe-lafs/tahoe-lafs.git] / docs / running.rst
1 =====================
2 How To Run Tahoe-LAFS
3 =====================
4
5 Intro
6 =====
7
8 This is how to run a Tahoe-LAFS client or a complete Tahoe-LAFS grid.
9 First you have to install the Tahoe-LAFS software, as documented in
10 `quickstart.rst <quickstart.rst>`_.
11
12 The ``tahoe`` program in the ``bin`` directory is used to create,
13 start, and stop nodes. Each node lives in a separate base directory, in
14 which there is a configuration file named ``tahoe.cfg``. Nodes read and
15 write files within this base directory.
16
17 A grid consists of a set of *storage nodes* and *client nodes* running
18 the Tahoe-LAFS code. There is also an *introducer node* that is
19 responsible for getting the other nodes talking to each other.
20
21 If you're getting started we recommend you try connecting to
22 the `public test grid
23 <https://tahoe-lafs.org/trac/tahoe-lafs/wiki/TestGrid>`_ as you only
24 need to create a client node. When you want to create your own grid
25 you'll need to create the introducer and several initial storage nodes
26 (see the note about small grids below).
27
28 If the Tahoe-LAFS ``bin`` directory is not on your PATH, then in all
29 the command lines below, specify the full path to ``bin/tahoe``.
30
31 To construct a client node, run "``tahoe create-client``", which will
32 create ``~/.tahoe`` to be the node's base directory. Acquire the
33 ``introducer.furl`` (see below if you are running your own introducer,
34 or use the one from the `TestGrid page
35 <https://tahoe-lafs.org/trac/tahoe-lafs/wiki/TestGrid>`_), and paste it
36 after ``introducer.furl =`` in the ``[client]`` section of
37 ``~/.tahoe/tahoe.cfg``. Then use "``tahoe run ~/.tahoe``". After that,
38 the node should be off and running. The first thing it will do is
39 connect to the introducer and get itself connected to all other nodes
40 on the grid.
41
42 By default, "``tahoe create-client``" creates a client-only node, that
43 does not offer its disk space to other nodes. To configure other behavior,
44 use "``tahoe create-node``" or see `configuration.rst <configuration.rst>`_.
45
46 To construct an introducer, create a new base directory for it (the
47 name of the directory is up to you), ``cd`` into it, and run
48 "``tahoe create-introducer .``". Now run the introducer using
49 "``tahoe start .``". After it starts, it will write a file named
50 ``introducer.furl`` into the ``private/`` subdirectory of that base
51 directory. This file contains the URL the other nodes must use in order
52 to connect to this introducer. (Note that "``tahoe run .``" doesn't
53 work for introducers, this is a known issue: `#937
54 <http://allmydata.org/trac/tahoe-lafs/ticket/937>`_.)
55
56 The "``tahoe run``" command above will run the node in the foreground.
57 On Unix, you can run it in the background instead by using the
58 "``tahoe start``" command. To stop a node started in this way, use
59 "``tahoe stop``". ``tahoe --help`` gives a summary of all commands.
60
61 See `configuration.rst <configuration.rst>`_ for more details about how
62 to configure Tahoe-LAFS, including how to get other clients to connect
63 to your node if it is behind a firewall or NAT device.
64
65 A note about small grids
66 ------------------------
67
68 By default, Tahoe-LAFS ships with the configuration parameter
69 ``shares.happy`` set to 7. If you are using Tahoe-LAFS on a
70 grid with fewer than 7 storage nodes, this won't work well for
71 you -- none of your uploads will succeed. To fix this, see
72 `configuration.rst <configuration.rst>`_ to learn how to set
73 ``shares.happy`` to a more suitable value for your grid.
74
75 Do Stuff With It
76 ================
77
78 This is how to use your Tahoe-LAFS node.
79
80 The WUI
81 -------
82
83 Point your web browser to `http://127.0.0.1:3456
84 <http://127.0.0.1:3456>`_ -- which is the URL of the gateway running on
85 your own local computer -- to use your newly created node.
86
87 Create a new directory (with the button labelled "create a directory").
88 Your web browser will load the new directory.  Now if you want to be
89 able to come back to this directory later, you have to bookmark it, or
90 otherwise save a copy of the URL.  If you lose the URL to this directory,
91 then you can never again come back to this directory.
92
93 You can do more or less everything you want to do with a decentralized
94 filesystem through the WUI.
95
96 The CLI
97 -------
98
99 Prefer the command-line? Run "``tahoe --help``" (the same command-line
100 tool that is used to start and stop nodes serves to navigate and use
101 the decentralized filesystem). To get started, create a new directory
102 and mark it as the 'tahoe:' alias by running
103 "``tahoe create-alias tahoe``". Once you've done that, you can do
104 "``tahoe ls tahoe:``" and "``tahoe cp LOCALFILE tahoe:foo.txt``" to
105 work with your filesystem. The Tahoe-LAFS CLI uses similar syntax to
106 the well-known scp and rsync tools. See `CLI.rst <frontends/CLI.rst>`_
107 for more details.
108
109 As with the WUI (and with all current interfaces to Tahoe-LAFS), you
110 are responsible for remembering directory capabilities yourself. If you
111 create a new directory and lose the capability to it, then you cannot
112 access that directory ever again.
113
114 The SFTP and FTP frontends
115 --------------------------
116
117 You can access your Tahoe-LAFS grid via any `SFTP
118 <http://en.wikipedia.org/wiki/SSH_file_transfer_protocol>`_ or `FTP
119 <http://en.wikipedia.org/wiki/File_Transfer_Protocol>`_ client.
120 See `FTP-and-SFTP.rst <frontends/FTP-and-SFTP.rst>`_ for how to set
121 this up. On most Unix platforms, you can also use SFTP to plug
122 Tahoe-LAFS into your computer's local filesystem via ``sshfs``.
123
124 The `SftpFrontend
125 <https://tahoe-lafs.org/trac/tahoe-lafs/wiki/SftpFrontend>`_ page on the
126 wiki has more information about using SFTP with Tahoe-LAFS.
127
128 The WAPI
129 --------
130
131 Want to program your Tahoe-LAFS node to do your bidding?  Easy!  See
132 `webapi.rst <frontends/webapi.rst>`_.
133
134 Socialize
135 =========
136
137 You can chat with other users of and hackers of this software on the
138 #tahoe-lafs IRC channel at ``irc.freenode.net``, or on the `tahoe-dev
139 mailing list
140 <https://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev>`_.