]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - docs/running.rst
1c4e2afbdf81a99c694f41599c69e6c325ffca82
[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 <http://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 <http://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`` in that base directory. This file contains the URL
51 the other nodes must use in order to connect to this introducer. (Note
52 that "``tahoe run .``" doesn't work for introducers, this is a known
53 issue: `#937 <http://allmydata.org/trac/tahoe-lafs/ticket/937>`_.)
54
55 The "``tahoe run``" command above will run the node in the foreground.
56 On Unix, you can run it in the background instead by using the
57 "``tahoe start``" command. To stop a node started in this way, use
58 "``tahoe stop``". ``tahoe --help`` gives a summary of all commands.
59
60 See `configuration.rst <configuration.rst>`_ for more details about how
61 to configure Tahoe-LAFS, including how to get other clients to connect
62 to your node if it is behind a firewall or NAT device.
63
64 A note about small grids
65 ------------------------
66
67 By default, Tahoe-LAFS ships with the configuration parameter
68 ``shares.happy`` set to 7. If you are using Tahoe-LAFS on a
69 grid with fewer than 7 storage nodes, this won't work well for
70 you -- none of your uploads will succeed. To fix this, see
71 `configuration.rst <configuration.rst>`_ to learn how to set
72 ``shares.happy`` to a more suitable value for your grid.
73
74 Do Stuff With It
75 ================
76
77 This is how to use your Tahoe-LAFS node.
78
79 The WUI
80 -------
81
82 Point your web browser to `http://127.0.0.1:3456
83 <http://127.0.0.1:3456>`_ -- which is the URL of the gateway running on
84 your own local computer -- to use your newly created node.
85
86 Create a new directory (with the button labelled "create a directory").
87 Your web browser will load the new directory.  Now if you want to be
88 able to come back to this directory later, you have to bookmark it, or
89 otherwise save a copy of the URL.  If you lose the URL to this directory,
90 then you can never again come back to this directory.
91
92 You can do more or less everything you want to do with a decentralized
93 filesystem through the WUI.
94
95 The CLI
96 -------
97
98 Prefer the command-line? Run "``tahoe --help``" (the same command-line
99 tool that is used to start and stop nodes serves to navigate and use
100 the decentralized filesystem). To get started, create a new directory
101 and mark it as the 'tahoe:' alias by running
102 "``tahoe create-alias tahoe``". Once you've done that, you can do
103 "``tahoe ls tahoe:``" and "``tahoe cp LOCALFILE tahoe:foo.txt``" to
104 work with your filesystem. The Tahoe-LAFS CLI uses similar syntax to
105 the well-known scp and rsync tools. See `CLI.rst <frontends/CLI.rst>`_
106 for more details.
107
108 As with the WUI (and with all current interfaces to Tahoe-LAFS), you
109 are responsible for remembering directory capabilities yourself. If you
110 create a new directory and lose the capability to it, then you cannot
111 access that directory ever again.
112
113 The SFTP and FTP frontends
114 --------------------------
115
116 You can access your Tahoe-LAFS grid via any `SFTP
117 <http://en.wikipedia.org/wiki/SSH_file_transfer_protocol>`_ or `FTP
118 <http://en.wikipedia.org/wiki/File_Transfer_Protocol>`_ client.
119 See `FTP-and-SFTP.rst <frontends/FTP-and-SFTP.rst>`_ for how to set
120 this up. On most Unix platforms, you can also use SFTP to plug
121 Tahoe-LAFS into your computer's local filesystem via ``sshfs``.
122
123 The `SftpFrontend
124 <http://tahoe-lafs.org/trac/tahoe-lafs/wiki/SftpFrontend>`_ page on the
125 wiki has more information about using SFTP with Tahoe-LAFS.
126
127 The WAPI
128 --------
129
130 Want to program your Tahoe-LAFS node to do your bidding?  Easy!  See
131 `webapi.rst <frontends/webapi.rst>`_.
132
133 Socialize
134 =========
135
136 You can chat with other users of and hackers of this software on the
137 #tahoe-lafs IRC channel at ``irc.freenode.net``, or on the `tahoe-dev
138 mailing list
139 <http://tahoe-lafs.org/cgi-bin/mailman/listinfo/tahoe-dev>`_.