Running nodes locally ===================== .. contents:: .. note:: You should already have generated your node(s) with their CorDapps installed by following the instructions in :doc:`generating-a-node`. There are several ways to run a Corda node locally for testing purposes. Starting all nodes at once -------------------------- .. note:: ``runnodes`` is a shell script (or batch file on Windows) that is generated by ``deployNodes`` to allow you to quickly start up all nodes and their webservers. ``runnodes`` should only be used for testing purposes. Start the nodes with ``runnodes`` by running the following command from the root of the project: * Linux/macOS: ``build/nodes/runnodes`` * Windows: ``call build\nodes\runnodes.bat`` .. warn:: On macOS, do not click/change focus until all the node terminal windows have opened, or some processes may fail to start. Starting an individual Corda node --------------------------------- Run the node by opening a terminal window in the node's folder and running: .. code-block:: shell java -jar corda.jar .. warning:: By default, the node will look for a configuration file called ``node.conf`` and a CorDapps folder called ``cordapps`` in the current working directory. You can override the configuration file and workspace paths on the command line (e.g. ``./corda.jar --config-file=test.conf --base-directory=/opt/r3corda/nodes/test``). Optionally run the node's webserver as well by opening a terminal window in the node's folder and running: .. code-block:: shell java -jar corda-webserver.jar .. warning:: The node webserver is for testing purposes only and will be removed soon. Starting a node with remote debugging enabled --------------------------------------------- To enable remote debugging of the node, run the following from the terminal window: ``java -Dcapsule.jvm.args="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" -jar corda.jar`` This command line will start the debugger on port 5005 and pause the process awaiting debugger attachment.