Deploying Corda to Corda Testnet from your local environment
This document explains how to set up your local network to enable a Corda node to connect to the Corda Testnet. This assumes you are downloading a node ZIP from: https://marketplace.r3.com/network/testnet.
- Register for an account on https://marketplace.r3.com/network/testnet.
Set up your local network
For a Corda node to be able to connect to the Corda Testnet and be reachable by counterparties on that network it needs to be reachable on the open internet. Corda is a server which requires an externally visible IP address and several ports in order to operate correctly.
We recommend running your Coda node on cloud infrastructure. If you wish to run Corda on your local machine then you will need to configure your network to enable the Corda node to be reachable from the internet.
Set up static IP address local host machine
The next steps will configure your router to forward packets to the Corda node, but for this it is required to set the host machine to have a static IP address. If this isn’t done, and the network is using DHCP dynamic address allocation then the next time the host machine is rebooted it may be on a different IP and the port forwarding will no longer work.
Please consult your operating system documentation for instructions on setting a static IP on the host machine.
Set up port forwarding on your router
Port forwarding is a method of making a computer on your network accessible to computers on the Internet, even though it is behind a router.
192.168.0.1) in your browser bar.
port forwardingsection of the admin console.
Add rules for the following ports which Corda uses:
10002 10003 8080
Please consult your router documentation for specific details on enabling port forwarding.
Open firewall ports
If you are operating a firewall on your host machine or local network you will also need to open the above ports for incoming traffic.
Please consult your firewall documentation for details.
Optional: Configure a static external IP address
Corda expects nodes to have stable addresses over long periods of time. ISPs typically assign dynamic IP addresses to a router and so if your router is rebooted it may not obtain the same external IP and therefore your Corda node will change its address on the Testnet.
You can request a static IP address from your ISP however this may incur a cost.
If the IP address does change then this doesn’t cause issues but it will result in an update to the network map which then needs to be propagated to all peers in the network. There may be some delay in the ability to transact while this happens.
Test if the ports are open
You can use a port checking tool to make sure the ports are open properly.
Download and install your node
Navigate to https://marketplace.r3.com/network/testnet/platform.
Click on the
Download button and wait for the ZIP
file to download:
Unzip the file in your Corda root directory:
mkdir corda cd corda cp <PATH_TO_DOWNLOAD>/node.zip . unzip node.zip cd node
run-corda.sh script to start your Corda node.
Congratulations! You now have a running Corda node on Testnet.
node.zipfile from your local machine to any other host machine and run the Corda node from there. Do not run multiple copies of the same node (i.e. with the same identity). If a new copy of the node appears on the network then the network map server will interpret this as a change in the address of the node and route traffic to the most recent instance. Any states which are on the old node will no longer be available and undefined behaviour may result. Please provision a new node from the application instead.
Testing your deployment
To test your deployment is working correctly follow the instructions in Using the Node Explorer to test a Corda node on Corda Testnet to set up the Finance CorDapp and issue cash to a counterparty.