]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/blob - docs/configuration.rst
magic first line tells emacs to use utf8+bom
[tahoe-lafs/tahoe-lafs.git] / docs / configuration.rst
1 .. -*- coding: utf-8-with-signature -*-
2
3 =============================
4 Configuring a Tahoe-LAFS node
5 =============================
6
7 1.   `Node Types`_
8 2.  `Overall Node Configuration`_
9 3.  `Client Configuration`_
10 4.  `Storage Server Configuration`_
11 5.  `Frontend Configuration`_
12 6.  `Running A Helper`_
13 7.  `Running An Introducer`_
14 8.  `Other Files in BASEDIR`_
15 9.  `Other files`_
16 10. `Example`_
17
18 A Tahoe-LAFS node is configured by writing to files in its base directory.
19 These files are read by the node when it starts, so each time you change
20 them, you need to restart the node.
21
22 The node also writes state to its base directory, so it will create files on
23 its own.
24
25 This document contains a complete list of the config files that are examined
26 by the client node, as well as the state files that you'll observe in its
27 base directory.
28
29 The main file is named "``tahoe.cfg``", and is an ".INI"-style configuration
30 file (parsed by the Python stdlib 'ConfigParser' module: "``[name]``" section
31 markers, lines with "``key.subkey: value``", rfc822-style
32 continuations). There are also other files containing information that does
33 not easily fit into this format. The "``tahoe create-node``" or "``tahoe
34 create-client``" command will create an initial ``tahoe.cfg`` file for
35 you. After creation, the node will never modify the ``tahoe.cfg`` file: all
36 persistent state is put in other files.
37
38 The item descriptions below use the following types:
39
40 ``boolean``
41
42     one of (True, yes, on, 1, False, off, no, 0), case-insensitive
43
44 ``strports string``
45
46     a Twisted listening-port specification string, like "``tcp:80``" or
47     "``tcp:3456:interface=127.0.0.1``". For a full description of the format,
48     see `the Twisted strports documentation
49     <https://twistedmatrix.com/documents/current/api/twisted.application.strports.html>`_.
50     Please note, if interface= is not specified, Tahoe-LAFS will attempt to
51     bind the port specified on all interfaces.
52
53 ``FURL string``
54
55     a Foolscap endpoint identifier, like
56     ``pb://soklj4y7eok5c3xkmjeqpw@192.168.69.247:44801/eqpwqtzm``
57
58
59 Node Types
60 ==========
61
62 A node can be a client/server, an introducer, a statistics gatherer, or a
63 key generator.
64
65 Client/server nodes provide one or more of the following services:
66
67 * web-API service
68 * SFTP service
69 * FTP service
70 * drop-upload service
71 * helper service
72 * storage service.
73
74 A client/server that provides storage service (i.e. storing shares for
75 clients) is called a "storage server". If it provides any of the other
76 services, it is a "storage client" (a node can be both a storage server and a
77 storage client). A client/server node that provides web-API service is called
78 a "gateway".
79
80
81 Overall Node Configuration
82 ==========================
83
84 This section controls the network behavior of the node overall: which ports
85 and IP addresses are used, when connections are timed out, etc. This
86 configuration applies to all node types and is independent of the services
87 that the node is offering.
88
89 If your node is behind a firewall or NAT device and you want other clients to
90 connect to it, you'll need to open a port in the firewall or NAT, and specify
91 that port number in the tub.port option. If behind a NAT, you *may* need to
92 set the ``tub.location`` option described below.
93
94 ``[node]``
95
96 ``nickname = (UTF-8 string, optional)``
97
98     This value will be displayed in management tools as this node's
99     "nickname". If not provided, the nickname will be set to "<unspecified>".
100     This string shall be a UTF-8 encoded Unicode string.
101
102 ``web.port = (strports string, optional)``
103
104     This controls where the node's web server should listen, providing node
105     status and, if the node is a client/server, providing web-API service as
106     defined in `webapi.rst <frontends/webapi.rst>_`.
107
108     This file contains a Twisted "strports" specification such as "``3456``"
109     or "``tcp:3456:interface=127.0.0.1``". The "``tahoe create-node``" or
110     "``tahoe create-client``" commands set the ``web.port`` to
111     "``tcp:3456:interface=127.0.0.1``" by default; this is overridable by the
112     ``--webport`` option. You can make it use SSL by writing
113     "``ssl:3456:privateKey=mykey.pem:certKey=cert.pem``" instead.
114
115     If this is not provided, the node will not run a web server.
116
117 ``web.static = (string, optional)``
118
119     This controls where the ``/static`` portion of the URL space is
120     served. The value is a directory name (``~username`` is allowed, and
121     non-absolute names are interpreted relative to the node's basedir), which
122     can contain HTML and other files. This can be used to serve a
123     Javascript-based frontend to the Tahoe-LAFS node, or other services.
124
125     The default value is "``public_html``", which will serve
126     ``BASEDIR/public_html`` .  With the default settings,
127     ``http://127.0.0.1:3456/static/foo.html`` will serve the contents of
128     ``BASEDIR/public_html/foo.html`` .
129
130 ``tub.port = (integer, optional)``
131
132     This controls which port the node uses to accept Foolscap connections
133     from other nodes. If not provided, the node will ask the kernel for any
134     available port. The port will be written to a separate file (named
135     ``client.port`` or ``introducer.port``), so that subsequent runs will
136     re-use the same port.
137
138 ``tub.location = (string, optional)``
139
140     In addition to running as a client, each Tahoe-LAFS node also runs as a
141     server, listening for connections from other Tahoe-LAFS clients. The node
142     announces its location by publishing a "FURL" (a string with some
143     connection hints) to the Introducer. The string it publishes can be found
144     in ``BASEDIR/private/storage.furl`` . The ``tub.location`` configuration
145     controls what location is published in this announcement.
146
147     If you don't provide ``tub.location``, the node will try to figure out a
148     useful one by itself, by using tools like "``ifconfig``" to determine the
149     set of IP addresses on which it can be reached from nodes both near and
150     far.  It will also include the TCP port number on which it is listening
151     (either the one specified by ``tub.port``, or whichever port was assigned
152     by the kernel when ``tub.port`` is left unspecified).
153
154     You might want to override this value if your node lives behind a
155     firewall that is doing inbound port forwarding, or if you are using other
156     proxies such that the local IP address or port number is not the same one
157     that remote clients should use to connect. You might also want to control
158     this when using a Tor proxy to avoid revealing your actual IP address
159     through the Introducer announcement.
160
161     The value is a comma-separated string of host:port location hints, like
162     this::
163
164       123.45.67.89:8098,tahoe.example.com:8098,127.0.0.1:8098
165
166     A few examples:
167
168     * Emulate default behavior, assuming your host has IP address
169       123.45.67.89 and the kernel-allocated port number was 8098::
170
171         tub.port = 8098
172         tub.location = 123.45.67.89:8098,127.0.0.1:8098
173
174     * Use a DNS name so you can change the IP address more easily::
175
176         tub.port = 8098
177         tub.location = tahoe.example.com:8098
178
179     * Run a node behind a firewall (which has an external IP address) that
180       has been configured to forward port 7912 to our internal node's port
181       8098::
182
183         tub.port = 8098
184         tub.location = external-firewall.example.com:7912
185
186     * Run a node behind a Tor proxy (perhaps via ``torsocks``), in
187       client-only mode (i.e. we can make outbound connections, but other
188       nodes will not be able to connect to us). The literal
189       '``unreachable.example.org``' will not resolve, but will serve as a
190       reminder to human observers that this node cannot be reached. "Don't
191       call us.. we'll call you"::
192
193         tub.port = 8098
194         tub.location = unreachable.example.org:0
195
196     * Run a node behind a Tor proxy, and make the server available as a Tor
197       "hidden service". (This assumes that other clients are running their
198       node with ``torsocks``, such that they are prepared to connect to a
199       ``.onion`` address.) The hidden service must first be configured in
200       Tor, by giving it a local port number and then obtaining a ``.onion``
201       name, using something in the ``torrc`` file like::
202
203         HiddenServiceDir /var/lib/tor/hidden_services/tahoe
204         HiddenServicePort 29212 127.0.0.1:8098
205
206       once Tor is restarted, the ``.onion`` hostname will be in
207       ``/var/lib/tor/hidden_services/tahoe/hostname``. Then set up your
208       ``tahoe.cfg`` like::
209
210         tub.port = 8098
211         tub.location = ualhejtq2p7ohfbb.onion:29212
212
213     Most users will not need to set ``tub.location``.
214
215 ``log_gatherer.furl = (FURL, optional)``
216
217     If provided, this contains a single FURL string that is used to contact a
218     "log gatherer", which will be granted access to the logport. This can be
219     used to gather operational logs in a single place. Note that in previous
220     releases of Tahoe-LAFS, if an old-style ``BASEDIR/log_gatherer.furl``
221     file existed it would also be used in addition to this value, allowing
222     multiple log gatherers to be used at once. As of Tahoe-LAFS v1.9.0, an
223     old-style file is ignored and a warning will be emitted if one is
224     detected. This means that as of Tahoe-LAFS v1.9.0 you can have at most
225     one log gatherer per node. See ticket `#1423`_ about lifting this
226     restriction and letting you have multiple log gatherers.
227
228     .. _`#1423`: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1423
229
230 ``timeout.keepalive = (integer in seconds, optional)``
231
232 ``timeout.disconnect = (integer in seconds, optional)``
233
234     If ``timeout.keepalive`` is provided, it is treated as an integral number
235     of seconds, and sets the Foolscap "keepalive timer" to that value. For
236     each connection to another node, if nothing has been heard for a while,
237     we will attempt to provoke the other end into saying something. The
238     duration of silence that passes before sending the PING will be between
239     KT and 2*KT. This is mainly intended to keep NAT boxes from expiring idle
240     TCP sessions, but also gives TCP's long-duration keepalive/disconnect
241     timers some traffic to work with. The default value is 240 (i.e. 4
242     minutes).
243
244     If timeout.disconnect is provided, this is treated as an integral number
245     of seconds, and sets the Foolscap "disconnect timer" to that value. For
246     each connection to another node, if nothing has been heard for a while,
247     we will drop the connection. The duration of silence that passes before
248     dropping the connection will be between DT-2*KT and 2*DT+2*KT (please see
249     ticket `#521`_ for more details). If we are sending a large amount of
250     data to the other end (which takes more than DT-2*KT to deliver), we
251     might incorrectly drop the connection. The default behavior (when this
252     value is not provided) is to disable the disconnect timer.
253
254     See ticket `#521`_ for a discussion of how to pick these timeout values.
255     Using 30 minutes means we'll disconnect after 22 to 68 minutes of
256     inactivity. Receiving data will reset this timeout, however if we have
257     more than 22min of data in the outbound queue (such as 800kB in two
258     pipelined segments of 10 shares each) and the far end has no need to
259     contact us, our ping might be delayed, so we may disconnect them by
260     accident.
261
262     .. _`#521`: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/521
263
264 ``ssh.port = (strports string, optional)``
265
266 ``ssh.authorized_keys_file = (filename, optional)``
267
268     This enables an SSH-based interactive Python shell, which can be used to
269     inspect the internal state of the node, for debugging. To cause the node
270     to accept SSH connections on port 8022 from the same keys as the rest of
271     your account, use::
272
273       [tub]
274       ssh.port = 8022
275       ssh.authorized_keys_file = ~/.ssh/authorized_keys
276
277 ``tempdir = (string, optional)``
278
279     This specifies a temporary directory for the web-API server to use, for
280     holding large files while they are being uploaded. If a web-API client
281     attempts to upload a 10GB file, this tempdir will need to have at least
282     10GB available for the upload to complete.
283
284     The default value is the ``tmp`` directory in the node's base directory
285     (i.e. ``BASEDIR/tmp``), but it can be placed elsewhere. This directory is
286     used for files that usually (on a Unix system) go into ``/tmp``. The
287     string will be interpreted relative to the node's base directory.
288
289
290 Client Configuration
291 ====================
292
293 ``[client]``
294
295 ``introducer.furl = (FURL string, mandatory)``
296
297     This FURL tells the client how to connect to the introducer. Each
298     Tahoe-LAFS grid is defined by an introducer. The introducer's FURL is
299     created by the introducer node and written into its private base
300     directory when it starts, whereupon it should be published to everyone
301     who wishes to attach a client to that grid
302
303 ``helper.furl = (FURL string, optional)``
304
305     If provided, the node will attempt to connect to and use the given helper
306     for uploads. See `<helper.rst>`_ for details.
307
308 ``key_generator.furl = (FURL string, optional)``
309
310     If provided, the node will attempt to connect to and use the given
311     key-generator service, using RSA keys from the external process rather
312     than generating its own.
313
314 ``stats_gatherer.furl = (FURL string, optional)``
315
316     If provided, the node will connect to the given stats gatherer and
317     provide it with operational statistics.
318
319 ``shares.needed = (int, optional) aka "k", default 3``
320
321 ``shares.total = (int, optional) aka "N", N >= k, default 10``
322
323 ``shares.happy = (int, optional) 1 <= happy <= N, default 7``
324
325     These three values set the default encoding parameters. Each time a new
326     file is uploaded, erasure-coding is used to break the ciphertext into
327     separate shares. There will be ``N`` (i.e. ``shares.total``) shares
328     created, and the file will be recoverable if any ``k``
329     (i.e. ``shares.needed``) shares are retrieved. The default values are
330     3-of-10 (i.e.  ``shares.needed = 3``, ``shares.total = 10``). Setting
331     ``k`` to 1 is equivalent to simple replication (uploading ``N`` copies of
332     the file).
333
334     These values control the tradeoff between storage overhead and
335     reliability. To a first approximation, a 1MB file will use (1MB *
336     ``N``/``k``) of backend storage space (the actual value will be a bit
337     more, because of other forms of overhead). Up to ``N``-``k`` shares can
338     be lost before the file becomes unrecoverable.  So large ``N``/``k``
339     ratios are more reliable, and small ``N``/``k`` ratios use less disk
340     space. ``N`` cannot be larger than 256, because of the 8-bit
341     erasure-coding algorithm that Tahoe-LAFS uses. ``k`` can not be greater
342     than ``N``. See `<performance.rst>`_ for more details.
343
344     ``shares.happy`` allows you control over how well to "spread out" the
345     shares of an immutable file. For a successful upload, shares are
346     guaranteed to be initially placed on at least ``shares.happy`` distinct
347     servers, the correct functioning of any ``k`` of which is sufficient to
348     guarantee the availability of the uploaded file. This value should not be
349     larger than the number of servers on your grid.
350
351     A value of ``shares.happy`` <= ``k`` is allowed, but this is not
352     guaranteed to provide any redundancy if some servers fail or lose shares.
353     It may still provide redundancy in practice if ``N`` is greater than
354     the number of connected servers, because in that case there will typically
355     be more than one share on at least some storage nodes. However, since a
356     successful upload only guarantees that at least ``shares.happy`` shares
357     have been stored, the worst case is still that there is no redundancy.
358
359     (Mutable files use a different share placement algorithm that does not
360     currently consider this parameter.)
361
362 ``mutable.format = sdmf or mdmf``
363
364     This value tells Tahoe-LAFS what the default mutable file format should
365     be. If ``mutable.format=sdmf``, then newly created mutable files will be
366     in the old SDMF format. This is desirable for clients that operate on
367     grids where some peers run older versions of Tahoe-LAFS, as these older
368     versions cannot read the new MDMF mutable file format. If
369     ``mutable.format`` is ``mdmf``, then newly created mutable files will use
370     the new MDMF format, which supports efficient in-place modification and
371     streaming downloads. You can overwrite this value using a special
372     mutable-type parameter in the webapi. If you do not specify a value here,
373     Tahoe-LAFS will use SDMF for all newly-created mutable files.
374
375     Note that this parameter applies only to files, not to directories.
376     Mutable directories, which are stored in mutable files, are not
377     controlled by this parameter and will always use SDMF. We may revisit
378     this decision in future versions of Tahoe-LAFS.
379
380     See `<specifications/mutable.rst>`_ for details about mutable file
381     formats.
382
383 Frontend Configuration
384 ======================
385
386 The Tahoe client process can run a variety of frontend file-access protocols.
387 You will use these to create and retrieve files from the virtual filesystem.
388 Configuration details for each are documented in the following
389 protocol-specific guides:
390
391 HTTP
392
393     Tahoe runs a webserver by default on port 3456. This interface provides a
394     human-oriented "WUI", with pages to create, modify, and browse
395     directories and files, as well as a number of pages to check on the
396     status of your Tahoe node. It also provides a machine-oriented "WAPI",
397     with a REST-ful HTTP interface that can be used by other programs
398     (including the CLI tools). Please see `<frontends/webapi.rst>`_ for full
399     details, and the ``web.port`` and ``web.static`` config variables above.
400     The `<frontends/download-status.rst>`_ document also describes a few WUI
401     status pages.
402
403 CLI
404
405     The main "bin/tahoe" executable includes subcommands for manipulating the
406     filesystem, uploading/downloading files, and creating/running Tahoe
407     nodes. See `<frontends/CLI.rst>`_ for details.
408
409 SFTP, FTP
410
411     Tahoe can also run both SFTP and FTP servers, and map a username/password
412     pair to a top-level Tahoe directory. See `<frontends/FTP-and-SFTP.rst>`_
413     for instructions on configuring these services, and the ``[sftpd]`` and
414     ``[ftpd]`` sections of ``tahoe.cfg``.
415
416 Drop-Upload
417
418     As of Tahoe-LAFS v1.9.0, a node running on Linux can be configured to
419     automatically upload files that are created or changed in a specified
420     local directory. See `<frontends/drop-upload.rst>`_ for details.
421
422
423
424 Storage Server Configuration
425 ============================
426
427 ``[storage]``
428
429 ``enabled = (boolean, optional)``
430
431     If this is ``True``, the node will run a storage server, offering space
432     to other clients. If it is ``False``, the node will not run a storage
433     server, meaning that no shares will be stored on this node. Use ``False``
434     for clients who do not wish to provide storage service. The default value
435     is ``True``.
436
437 ``readonly = (boolean, optional)``
438
439     If ``True``, the node will run a storage server but will not accept any
440     shares, making it effectively read-only. Use this for storage servers
441     that are being decommissioned: the ``storage/`` directory could be
442     mounted read-only, while shares are moved to other servers. Note that
443     this currently only affects immutable shares. Mutable shares (used for
444     directories) will be written and modified anyway. See ticket `#390
445     <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/390>`_ for the current
446     status of this bug. The default value is ``False``.
447
448 ``reserved_space = (str, optional)``
449
450     If provided, this value defines how much disk space is reserved: the
451     storage server will not accept any share that causes the amount of free
452     disk space to drop below this value. (The free space is measured by a
453     call to ``statvfs(2)`` on Unix, or ``GetDiskFreeSpaceEx`` on Windows, and
454     is the space available to the user account under which the storage server
455     runs.)
456
457     This string contains a number, with an optional case-insensitive scale
458     suffix, optionally followed by "B" or "iB". The supported scale suffixes
459     are "K", "M", "G", "T", "P" and "E", and a following "i" indicates to use
460     powers of 1024 rather than 1000. So "100MB", "100 M", "100000000B",
461     "100000000", and "100000kb" all mean the same thing. Likewise, "1MiB",
462     "1024KiB", "1024 Ki", and "1048576 B" all mean the same thing.
463
464     "``tahoe create-node``" generates a tahoe.cfg with
465     "``reserved_space=1G``", but you may wish to raise, lower, or remove the
466     reservation to suit your needs.
467
468 ``expire.enabled =``
469
470 ``expire.mode =``
471
472 ``expire.override_lease_duration =``
473
474 ``expire.cutoff_date =``
475
476 ``expire.immutable =``
477
478 ``expire.mutable =``
479
480     These settings control garbage collection, in which the server will
481     delete shares that no longer have an up-to-date lease on them. Please see
482     `<garbage-collection.rst>`_ for full details.
483
484
485 Running A Helper
486 ================
487
488 A "helper" is a regular client node that also offers the "upload helper"
489 service.
490
491 ``[helper]``
492
493 ``enabled = (boolean, optional)``
494
495     If ``True``, the node will run a helper (see `<helper.rst>`_ for
496     details).  The helper's contact FURL will be placed in
497     ``private/helper.furl``, from which it can be copied to any clients that
498     wish to use it. Clearly nodes should not both run a helper and attempt to
499     use one: do not create ``helper.furl`` and also define
500     ``[helper]enabled`` in the same node.  The default is ``False``.
501
502
503 Running An Introducer
504 =====================
505
506 The introducer node uses a different ``.tac`` file (named
507 "``introducer.tac``"), and pays attention to the ``[node]`` section, but not
508 the others.
509
510 The Introducer node maintains some different state than regular client nodes.
511
512 ``BASEDIR/private/introducer.furl``
513
514   This is generated the first time the introducer node is started, and used
515   again on subsequent runs, to give the introduction service a persistent
516   long-term identity. This file should be published and copied into new
517   client nodes before they are started for the first time.
518
519
520 Other Files in BASEDIR
521 ======================
522
523 Some configuration is not kept in ``tahoe.cfg``, for the following reasons:
524
525 * it is generated by the node at startup, e.g. encryption keys. The node
526   never writes to ``tahoe.cfg``.
527 * it is generated by user action, e.g. the "``tahoe create-alias``" command.
528
529 In addition, non-configuration persistent state is kept in the node's base
530 directory, next to the configuration knobs.
531
532 This section describes these other files.
533
534 ``private/node.pem``
535
536   This contains an SSL private-key certificate. The node generates this the
537   first time it is started, and re-uses it on subsequent runs. This
538   certificate allows the node to have a cryptographically-strong identifier
539   (the Foolscap "TubID"), and to establish secure connections to other nodes.
540
541 ``storage/``
542
543   Nodes that host StorageServers will create this directory to hold shares of
544   files on behalf of other clients. There will be a directory underneath it
545   for each StorageIndex for which this node is holding shares. There is also
546   an "incoming" directory where partially-completed shares are held while
547   they are being received.
548
549 ``tahoe-client.tac``
550
551   This file defines the client, by constructing the actual Client instance
552   each time the node is started. It is used by the "``twistd``" daemonization
553   program (in the ``-y`` mode), which is run internally by the "``tahoe
554   start``" command. This file is created by the "``tahoe create-node``" or
555   "``tahoe create-client``" commands.
556
557 ``tahoe-introducer.tac``
558
559   This file is used to construct an introducer, and is created by the
560   "``tahoe create-introducer``" command.
561
562 ``tahoe-key-generator.tac``
563
564   This file is used to construct a key generator, and is created by the
565   "``tahoe create-key-gernerator``" command.
566
567 ``tahoe-stats-gatherer.tac``
568
569   This file is used to construct a statistics gatherer, and is created by the
570   "``tahoe create-stats-gatherer``" command.
571
572 ``private/control.furl``
573
574   This file contains a FURL that provides access to a control port on the
575   client node, from which files can be uploaded and downloaded. This file is
576   created with permissions that prevent anyone else from reading it (on
577   operating systems that support such a concept), to insure that only the
578   owner of the client node can use this feature. This port is intended for
579   debugging and testing use.
580
581 ``private/logport.furl``
582
583   This file contains a FURL that provides access to a 'log port' on the
584   client node, from which operational logs can be retrieved. Do not grant
585   logport access to strangers, because occasionally secret information may be
586   placed in the logs.
587
588 ``private/helper.furl``
589
590   If the node is running a helper (for use by other clients), its contact
591   FURL will be placed here. See `<helper.rst>`_ for more details.
592
593 ``private/root_dir.cap`` (optional)
594
595   The command-line tools will read a directory cap out of this file and use
596   it, if you don't specify a '--dir-cap' option or if you specify
597   '--dir-cap=root'.
598
599 ``private/convergence`` (automatically generated)
600
601   An added secret for encrypting immutable files. Everyone who has this same
602   string in their ``private/convergence`` file encrypts their immutable files
603   in the same way when uploading them. This causes identical files to
604   "converge" -- to share the same storage space since they have identical
605   ciphertext -- which conserves space and optimizes upload time, but it also
606   exposes file contents to the possibility of a brute-force attack by people
607   who know that string. In this attack, if the attacker can guess most of the
608   contents of a file, then they can use brute-force to learn the remaining
609   contents.
610
611   So the set of people who know your ``private/convergence`` string is the
612   set of people who converge their storage space with you when you and they
613   upload identical immutable files, and it is also the set of people who
614   could mount such an attack.
615
616   The content of the ``private/convergence`` file is a base-32 encoded
617   string.  If the file doesn't exist, then when the Tahoe-LAFS client starts
618   up it will generate a random 256-bit string and write the base-32 encoding
619   of this string into the file. If you want to converge your immutable files
620   with as many people as possible, put the empty string (so that
621   ``private/convergence`` is a zero-length file).
622
623
624 Other files
625 ===========
626
627 ``logs/``
628
629   Each Tahoe-LAFS node creates a directory to hold the log messages produced
630   as the node runs. These logfiles are created and rotated by the
631   "``twistd``" daemonization program, so ``logs/twistd.log`` will contain the
632   most recent messages, ``logs/twistd.log.1`` will contain the previous ones,
633   ``logs/twistd.log.2`` will be older still, and so on. ``twistd`` rotates
634   logfiles after they grow beyond 1MB in size. If the space consumed by
635   logfiles becomes troublesome, they should be pruned: a cron job to delete
636   all files that were created more than a month ago in this ``logs/``
637   directory should be sufficient.
638
639 ``my_nodeid``
640
641   this is written by all nodes after startup, and contains a base32-encoded
642   (i.e. human-readable) NodeID that identifies this specific node. This
643   NodeID is the same string that gets displayed on the web page (in the
644   "which peers am I connected to" list), and the shortened form (the first
645   few characters) is recorded in various log messages.
646
647 ``access.blacklist``
648
649   Gateway nodes may find it necessary to prohibit access to certain
650   files. The web-API has a facility to block access to filecaps by their
651   storage index, returning a 403 "Forbidden" error instead of the original
652   file. For more details, see the "Access Blacklist" section of
653   `<frontends/webapi.rst>`_.
654
655
656 Example
657 =======
658
659 The following is a sample ``tahoe.cfg`` file, containing values for some of
660 the keys described in the previous section. Note that this is not a
661 recommended configuration (most of these are not the default values), merely
662 a legal one.
663
664 ::
665
666   [node]
667   nickname = Bob's Tahoe-LAFS Node
668   tub.port = 34912
669   tub.location = 123.45.67.89:8098,44.55.66.77:8098
670   web.port = 3456
671   log_gatherer.furl = pb://soklj4y7eok5c3xkmjeqpw@192.168.69.247:44801/eqpwqtzm
672   timeout.keepalive = 240
673   timeout.disconnect = 1800
674   ssh.port = 8022
675   ssh.authorized_keys_file = ~/.ssh/authorized_keys
676   
677   [client]
678   introducer.furl = pb://ok45ssoklj4y7eok5c3xkmj@tahoe.example:44801/ii3uumo
679   helper.furl = pb://ggti5ssoklj4y7eok5c3xkmj@helper.tahoe.example:7054/kk8lhr
680   
681   [storage]
682   enabled = True
683   readonly = True
684   reserved_space = 10000000000
685   
686   [helper]
687   enabled = True
688
689
690 Old Configuration Files
691 =======================
692
693 Tahoe-LAFS releases before v1.3.0 had no ``tahoe.cfg`` file, and used
694 distinct files for each item. This is no longer supported and if you have
695 configuration in the old format you must manually convert it to the new
696 format for Tahoe-LAFS to detect it. See `<historical/configuration.rst>`_.