Creating nodes locally
Local nodes are used for testing and demo purposes only.
There are two ways you can create a node locally:
- Manually: create a local directory, add the relevant node and CorDapp files, and configure them.
- Automatically: use the Cordform or Dockerform gradle plug-ins, which automatically generate and configure a local set of nodes.
Create a local node manually
To create a local node manually, make a new directory and add the following files and sub-directories:
- The Corda JAR artifact file, downloaded from Maven.
- A node configuration file with a name
node.conf
, configured as described in the Node configuration section. - A sub-directory with a name
cordapps
, containing any CorDapp JAR files you want the node to load. - An up-to-date version of the
network-parameters
file (see The network map), generated by the bootstrapper tool.
The remaining node files and directories will be generated at runtime. These are described in the Node folder structure section.
Run the database migration script if upgrading
- Remove any
transactionIsolationLevel
,initialiseSchema
, orinitialiseAppSchema
entries from the database section of your configuration. - Start the node with
run-migration-scripts
sub-command with--core-schemas
and--app-schemas
:
java -jar corda.jar run-migration-scripts --core-schemas --app-schemas
The node will perform any automatic data migrations required, which may take some time. If the migration process is interrupted, it can be continued simply by starting the node again, without harm. The node will stop automatically when migration is complete. See Upgrading your node for more information.
Start the node in the normal way
Start the node in the normal way.
Use Cordform or Dockerform to create a set of local nodes automatically
Corda provides two gradle
plug-ins: Cordform
and Dockerform
. They both allow you to run tasks that automatically generate and configure a local set of nodes for testing and demonstration purposes.
A
Cordform
task creates nodes in thebuild/nodes
directory. The exampleCordform
task used in this document creates three nodes:Notary
,PartyA
, andPartyB
, however you are free to spin up more nodes, specify what nodes you need on the network, change node names, and update node configurations.Nodes deployed via
Dockerform
use Docker containers. ADockerform
task is similar toCordform
but it provides an extra file that enables you to easily spin up nodes usingdocker-compose
. This creates adocker-compose
file that enables you to run a single command to control the deployment of Corda nodes and databases (instead of deploying each node/database manually).For more information about the plugins, visit the Dockerform and Cordform pages.
Was this page helpful?
Thanks for your feedback!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.
We're sorry this page wasn't helpful. Let us know how we can make it better!
Chat with us
Chat with us on our #docs channel on slack. You can also join a lot of other slack channels there and have access to 1-on-1 communication with members of the R3 team and the online community.
Create an issue
Create a new GitHub issue in this repository - submit technical feedback, draw attention to a potential documentation bug, or share ideas for improvement and general feedback.
Propose documentation improvements directly
Help us to improve the docs by contributing directly. It's simple - just fork this repository and raise a PR of your own - R3's Technical Writers will review it and apply the relevant suggestions.