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 cordformation Gradle plugin to configure and generate a local set of nodes.

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 JFrog.
  • 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.

  1. Remove any transactionIsolationLevel, initialiseSchema, or initialiseAppSchema entries from the database section of your configuration.
  2. 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 performs 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. The node stops automatically when migration is complete. See Upgrading your node to Corda 4.12 for more information.

Corda’s cordformation Gradle plugin provides the Cordform and Dockerform tasks. They both allow you to run tasks that automatically generate and configure a local set of nodes for testing and demonstration purposes.

Apply the cordformation plugin to your project, and then you can register instances of the Cordform and Dockerform tasks:

import net.corda.plugins.Cordform

plugins {
    id 'net.corda.plugins.cordformation'
}

tasks.register('deployNodes', Cordform) {
    // etc
}
  • Nodes deployed via Dockerform use Docker containers. A Dockerform task is similar to Cordform but it provides an extra file that enables you to easily spin up nodes using docker-compose. This creates a docker-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 tasks, 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.