Operators
Node Basics
Deploy with Docker

Deploying a Tangle Network Node with Docker

A Tangle Network node can be spun up quickly using Docker. This guide covers both Full Node and Validator Node deployment. . For more information on installing Docker, please visit the official Docker docs (opens in a new tab). Make sure that your system meets the requirements which can read here.

Setup the Docker Environment

The quickest and easiest way to get started is to make use of our published Docker Tangle image. In doing so, users simply pull down the image from ghcr.io, set their keys, fetch the applicable chainspec and run the start command to get up and running.

1. Pull the Tangle Docker image:

pull
# Only use "main" if you know what you are doing, it will use the latest and maybe unstable version of the node.
 
docker pull ghcr.io/webb-tools/tangle/tangle:main

2. Create a local directory to store the chain data:

Let us create a directory where we will store all the data for our node. This includes the chain data, and logs.

mkdir
mkdir /var/lib/tangle/

3. Select and Start your Node Type

4. Start Tangle full node:

Note: Full nodes do not participate in block production or consensus so no required keys are necessary.

To start the node run the following command:

docker run
docker run --rm -it -v /var/lib/tangle/:/data ghcr.io/webb-tools/tangle/tangle:main \
  --chain tangle-mainnet \
  --name="YOUR-NODE-NAME" \
  --base-path /data \
  --rpc-cors all \
  --port 9946 \
  --telemetry-url "wss://telemetry.polkadot.io/submit/ 1"

For an overview of the above flags, please refer to the Substrate node-template CLI Tool (opens in a new tab).

Once Docker pulls the necessary images, your Tangle node will start, displaying lots of information, such as the chain specification, node name, role, genesis state, and more.

If you followed the installation instructions for Tangle, once synced, you will be connected to peers and see blocks being produced on the Tangle network! Note that in this case you need to also sync to the Polkadot/Kusama relay chain, which might take a few days.

Update the Client

As Tangle development continues, it will sometimes be necessary to upgrade your node software. Node operators will be notified on our Discord channel when upgrades are available and whether they are necessary (some client upgrades are optional). The upgrade process is straightforward and is the same for a full node.

  1. Stop the docker container:
docker stop
sudo docker stop `CONTAINER_ID`
  1. Get the latest version of Tangle from the Tangle GitHub Release (opens in a new tab)

  2. Pull the latest version of Tangle binary by doing docker pull ghcr.io/webb-tools/tangle/tangle:{VERSION_CODE}. Example, if the latest version of Tangle is v0.1.2, then the command would be docker pull ghcr.io/webb-tools/tangle/tangle:v0.1.12

  3. Restart the tangle container and you should have the updated version of the client.

Purge Your Node

If you need a fresh instance of your Tangle node, you can purge your node by removing the associated data directory.

You'll first need to stop the Docker container:

docker stop
sudo docker stop `CONTAINER_ID`

If you did not use the -v flag to specify a local directory for storing your chain data when you spun up your node, then the data folder is related to the Docker container itself. Therefore, removing the Docker container will remove the chain data.

If you did spin up your node with the -v flag, you will need to purge the specified directory. For example, for the suggested data directly, you can run the following command to purge your parachain node data:

rm
# purges standalone data
sudo rm -rf /data/chains/*

Now that your chain data has been purged, you can start a new node with a fresh data directory!

Logs

If you'd like to run the node with verbose logs, you may add the following arguments during initial setup. Adjust the target for the desired logging level (debug | error | info| trace | warn):

-ldkg=debug \
-ldkg_metadata=debug \
-lruntime::offchain=debug \
-ldkg_proposal_handler=debug \
-ldkg_proposals=debug

Begin Validating

Now that your node is setup, continue onto our Validator guides to understand token bonding and more..

Support and Questions

Visit our Discord's validator channel (opens in a new tab) for community assistance.