<h2>Configuration File Location<aclass="headerlink"href="#configuration-file-location"title="Permalink to this headline">¶</a></h2>
<p>The Corda all in one <codeclass="docutils literal"><spanclass="pre">corda.jar</span></code> file is generated by the <codeclass="docutils literal"><spanclass="pre">gradle</span><spanclass="pre">buildCordaJAR</span></code> task and defaults to reading configuration from a <codeclass="docutils literal"><spanclass="pre">node.conf</span></code> file in the present working directory.
This behaviour can be overidden using the <codeclass="docutils literal"><spanclass="pre">--config-file</span></code> command line option to target configuration files with different names, or different file location (relative paths are relative to the current working directory).
Also, the <codeclass="docutils literal"><spanclass="pre">--base-directory</span></code> command line option alters the Corda node workspace location and if specified a <codeclass="docutils literal"><spanclass="pre">node.conf</span></code> configuration file is then expected in the root of the workspace.</p>
<p>The configuration file templates used for the <codeclass="docutils literal"><spanclass="pre">gradle</span><spanclass="pre">installTemplateNodes</span></code> task are to be found in the <codeclass="docutils literal"><spanclass="pre">/config/dev</span></code> folder. Also note that there is a basic set of defaults loaded from
the built in resource file <codeclass="docutils literal"><spanclass="pre">/node/src/main/resources/reference.conf</span></code> of the <codeclass="docutils literal"><spanclass="pre">:node</span></code> gradle module. All properties in this can be overidden in the file configuration
and for rarely changed properties this defaulting allows the property to be excluded from the configuration file.</p>
<h2>Configuration File Format<aclass="headerlink"href="#configuration-file-format"title="Permalink to this headline">¶</a></h2>
<p>Corda uses the Typesafe configuration library to parse the configuration see the <aclass="reference external"href="https://github.com/typesafehub/config/">typesafe config on Github</a> the format of the configuration files can be simple JSON, but for the more powerful substitution features
uses HOCON format see <aclass="reference external"href="https://github.com/typesafehub/config/blob/master/HOCON.md">HOCON documents</a></p>
<trclass="field-odd field"><thclass="field-name">basedir:</th><tdclass="field-body"><pclass="first">This specifies the node workspace folder either as an absolute path, or relative to the current working directory. It can be overidden by the <codeclass="docutils literal"><spanclass="pre">--base-directory</span></code> command line option, in which case the the value in the file is ignored and a <codeclass="docutils literal"><spanclass="pre">node.conf</span></code> file is expected in that workspace directory as the configuration source.</p>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">myLegalName:</th><tdclass="field-body"><pclass="first">The legal identity of the node acts as a human readable alias to the node’s public key and several demos use this to lookup the NodeInfo.</p>
<trclass="field-odd field"><thclass="field-name">nearestCity:</th><tdclass="field-body"><pclass="first">The location of the node as used to locate coordinates on the world map when running the network simulator demo. See <aclass="reference internal"href="network-simulator.html"><spanclass="doc">Network Simulator</span></a>.</p>
<trclass="field-even field"><td> </td><tdclass="field-body"><pclass="first">The password to unlock the KeyStore file (<codeclass="docutils literal"><spanclass="pre"><workspace>/certificates/sslkeystore.jks</span></code>) containing the node certificate and private key.</p>
<p>note:: This is the non-secret value for the development certificates automatically generated during the first node run. Longer term these keys will be managed in secure hardware devices.</p>
<trclass="field-odd field"><td> </td><tdclass="field-body"><pclass="first">The password to unlock the Trust store file (<codeclass="docutils literal"><spanclass="pre"><workspace>/certificates/truststore.jks</span></code>) containing the R3 Corda root certificate. This is the non-secret value for the development certificates automatically generated during the first node run.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">Longer term these keys will be managed in secure hardware devices.</p>
<trclass="field-even field"><td> </td><tdclass="field-body"><pclass="first">This section is used to configure the jdbc connection and database driver used for the nodes persistence. Currently the defaults in <codeclass="docutils literal"><spanclass="pre">/node/src/main/resources/reference.conf</span></code> are as shown in the first example. This is currently the only configuration that has been tested, although in the future full support for other storage layers will be validated.</p>
</td>
</tr>
<trclass="field-odd field"><thclass="field-name">artemisAddress:</th><tdclass="field-body"><pclass="first">The host and port on which the node is available for protocol operations over ArtemisMQ.</p>
<divclass="admonition note">
<pclass="first admonition-title">Note</p>
<pclass="last">In practice the ArtemisMQ messaging services bind to all local addresses on the specified port. However, note that the host is the included as the advertised entry in the NetworkMapService. As a result the value listed here must be externally accessible when running nodes across a cluster of machines.</p>
<trclass="field-even field"><td> </td><tdclass="field-body"><pclass="first">The address of the ArtemisMQ broker instance. If not provided the node will run one locally.</p>
</td>
</tr>
<trclass="field-odd field"><thclass="field-name">webAddress:</th><tdclass="field-body"><pclass="first">The host and port on which the node is available for web operations.</p>
<pclass="last">If HTTPS is enabled then the browser security checks will require that the accessing url host name is one of either the machine name, fully qualified machine name, or server IP address to line up with the Subject Alternative Names contained within the development certificates. This is addition to requiring the <codeclass="docutils literal"><spanclass="pre">/config/dev/corda_dev_ca.cer</span></code> root certificate be installed as a Trusted CA.</p>
<trclass="field-even field"><td> </td><tdclass="field-body"><pclass="first">A list of ServiceType id strings to be advertised to the NetworkMapService and thus be available when other nodes query the NetworkMapCache for supporting nodes. This can also include plugin services loaded from .jar files in the plugins folder.</p>
<trclass="field-odd field"><td> </td><tdclass="field-body"><pclass="first">If <cite>null</cite>, or missing the node is declaring itself as the NetworkMapService host. Otherwise the configuration value is the remote HostAndPort string for the ArtemisMQ service on the hosting node.</p>
<trclass="field-even field"><thclass="field-name">useHTTPS:</th><tdclass="field-body"><pclass="first last">If false the node’s web server will be plain HTTP. If true the node will use the same certificate and private key from the <codeclass="docutils literal"><spanclass="pre"><workspace>/certificates/sslkeystore.jks</span></code> file as the ArtemisMQ port for HTTPS. If HTTPS is enabled then unencrypted HTTP traffic to the node’s <strong>webAddress</strong> port is not supported.</p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.