blob: a2bd6fc4f5f884cd2939a15100766dc7b25e94cb [file] [log] [blame]
Yingdi Yu4e99f532014-08-25 19:40:57 -07001client.conf
2===========
3
4System configuration of NDN platform is specified in ``client.conf``.
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -07005
6The configuration file ``client.conf`` is looked up in several directories in the following order:
7
Davide Pesavento534b8412018-12-08 19:19:09 -05008- ``$HOME/.ndn``: user-specific settings
Davide Pesavento933a5672020-07-03 22:32:43 -04009- ``SYSCONFDIR/ndn``: system-wide settings (where ``SYSCONFDIR`` can be ``/usr/local/etc``,
10 ``/opt/local/etc``, or other, depending on how the library is configured)
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070011- ``/etc/ndn``: default system-wide settings
12
Davide Pesavento933a5672020-07-03 22:32:43 -040013Here is an example of ``client.conf`` for the current ndn-cxx package:
Yingdi Yu4e99f532014-08-25 19:40:57 -070014
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070015.. literalinclude:: ../../client.conf.sample
Davide Pesavento933a5672020-07-03 22:32:43 -040016 :language: ini
Yingdi Yu4e99f532014-08-25 19:40:57 -070017
Yingdi Yu4e99f532014-08-25 19:40:57 -070018
19NFD
20---
21
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070022transport
Eric Newberry52a803c2020-04-07 00:01:12 -070023 FaceUri for default connection toward local NDN forwarder. Only ``unix``, ``tcp``, ``tcp4``, and
24 ``tcp6`` FaceUris can be specified here.
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070025
Eric Newberry52a803c2020-04-07 00:01:12 -070026 By default, ``unix:///run/nfd.sock`` is used on Linux and ``unix:///var/run/nfd.sock`` is used on
27 other platforms.
Yingdi Yu4e99f532014-08-25 19:40:57 -070028
Davide Pesavento534b8412018-12-08 19:19:09 -050029 .. note::
Niv Sardi8ac87542016-12-13 15:38:06 -030030 This value can be overridden using the ``NDN_CLIENT_TRANSPORT`` environment variable.
Yingdi Yu4e99f532014-08-25 19:40:57 -070031
Davide Pesavento534b8412018-12-08 19:19:09 -050032
Yingdi Yu4e99f532014-08-25 19:40:57 -070033Key Management
34--------------
35
Yingdi Yu4e99f532014-08-25 19:40:57 -070036pib
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070037 The public key information for each private key stored in TPM. The format for this setting is::
Yingdi Yu4e99f532014-08-25 19:40:57 -070038
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070039 pib=[scheme]:[location]
Yingdi Yu4e99f532014-08-25 19:40:57 -070040
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070041 Possible values for ``[scheme]``:
Yingdi Yu4e99f532014-08-25 19:40:57 -070042
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070043 * ``pib-sqlite3``: local PIB implementation with SQLite3 storage engine
44
45 Possible values for ``[location]``:
46
47 * absolute path where SQLite3 database will be stored
48 * relative path (relative to ``config.conf``)
49 * empty: default path ``$HOME/.ndn`` will be used
50
51 When ``[location]`` is empty, trailing ``:`` can be omitted. For example::
52
53 pib=pib-sqlite3
54
Niv Sardi8ac87542016-12-13 15:38:06 -030055 Changing PIB scheme without changing location is **not** allowed. If a change like this is
56 necessary, the whole backend storage must be destroyed. For example, when the default location is
57 used::
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070058
59 rm -rf ~/.ndn/ndnsec-*
60
Davide Pesavento534b8412018-12-08 19:19:09 -050061 It is not recommended to share the same directory between machines, e.g. via NFS.
Junxiao Shi67fba7f2016-09-09 13:40:05 +000062 Simultaneous access from multiple machines may cause errors.
63
Davide Pesavento534b8412018-12-08 19:19:09 -050064 .. note::
Niv Sardi8ac87542016-12-13 15:38:06 -030065 This value can be overridden using the ``NDN_CLIENT_PIB`` environment variable.
Alexander Afanasyev57e00362016-06-23 13:22:54 -070066
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070067tpm
68 Trusted Platform Module (TPM) where the private keys are stored. The format for this setting
69 is::
70
71 tpm=[scheme]:[location]
72
73 Possible values for ``[scheme]``:
74
Davide Pesavento534b8412018-12-08 19:19:09 -050075 * ``tpm-osx-keychain`` (default on macOS): secure storage of private keys in the macOS
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070076 Keychain with OS-provided access restrictions.
77
78 ``[location]`` parameter is ignored.
79
Davide Pesavento534b8412018-12-08 19:19:09 -050080 May not work for daemon applications, as user interaction may be required to access the
81 macOS Keychain.
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070082
Davide Pesavento534b8412018-12-08 19:19:09 -050083 * ``tpm-file`` (default on all other platforms): file-based storage of private keys.
Alexander Afanasyev5208d0e2015-06-03 16:42:09 -070084
85 Possible values for ``[location]``:
86
87 * absolute path to directory that will store private/public key files (unencrypted with
88 ``0700`` permission)
89 * relative path (relative to ``config.conf``)
90 * empty: default path ``$HOME/.ndn/ndnsec-tpm-file`` will be used
91
92 When ``[location]`` is empty, trailing ``:`` can be omitted. For example::
93
94 tpm=tpm-file
95
Davide Pesavento534b8412018-12-08 19:19:09 -050096 **Changing the ``tpm`` setting is only possible together with ``pib`` setting. Otherwise,
97 an error will be generated during PIB/TPM access.**
Alexander Afanasyev57e00362016-06-23 13:22:54 -070098
Davide Pesavento534b8412018-12-08 19:19:09 -050099 It is not recommended to share the same directory between machines, e.g. via NFS.
Junxiao Shi67fba7f2016-09-09 13:40:05 +0000100 Simultaneous access from multiple machines may cause errors.
101
Davide Pesavento534b8412018-12-08 19:19:09 -0500102 .. note::
Niv Sardi8ac87542016-12-13 15:38:06 -0300103 This value can be overridden using the ``NDN_CLIENT_TPM`` environment variable.