Connext Router Setup
https://www.connext.network/
https://www.connext.network/

Connext router node setup for Connext Contributor Program

Official documents:

Spinning Up a Router

Minimum Hardware Requirements:

  • 8GB RAM
  • 30GB Storage
  • Redis

Update packages

sudo apt update && sudo apt upgrade -y

Install docker

sudo apt-get install ca-certificates curl gnupg lsb-release -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io -y

Install docker compose

mkdir -p ~/.docker/cli-plugins/
curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
sudo chown $USER /var/run/docker.sock 

Cloning the Repository

cd ~
git clone https://github.com/connext/nxtp-router-docker-compose.git
cd nxtp-router-docker-compose
git checkout amarok

Environment Config

Create a .env file in the root directory of the repository based on the env.example file.

Modify the following environment variables:

  • ROUTER_VERSION - The version of the router to use (e.g. v0.1.0). See the releases page for the latest released version.
  • ROUTER_EXTERNAL_PORT - Exposed port of the router. Remember to not expose this port to the public.
  • GRAFANA_EXTERNAL_PORT - Exposed port of the Grafana dashboard.
  • LOGDNA_KEY - This key is used by logna container. You can get this key by sign up her
https://www.logdna.com/
https://www.logdna.com/

Use this commands for preparing your .env file

mv .env.example .env

nano .env

Verify your .env file

################################################################################

General configuration

ROUTER_VERSION=0.2.0-alpha.10

ROUTER_EXTERNAL_PORT=8000
GRAFANA_EXTERNAL_PORT=3008
WEB3SIGNER_HTTP_LISTEN_PORT=9000

################################################################################

Monitoring configuration

LOGDNA_KEY=
LOGDNA_TAG=

DISCORD_WEBHOOK=

Create Router Config

Create a config.json file based on the config.example.json file. At minumum, change the following values:

  • sequencerUrl - The URL of the Sequencer node.
  • redis - The Redis instance to use.
  • server - Internal HTTP server config (adminToken).
  • chains - Add your desired chains, assets, and provider URLs. Use domain mappings instead of chainIds. For more domain ids of chains, please check https://raw.githubusercontent.com/connext/chaindata/main/crossChain.json . Make sure you use multiple providers for each chain! Example with the current testnet assets:
nano ~/nxtp-router-docker-compose/config.json
{
  "chains": {
    "1111": {
      "assets": [
        {
          "address": "0xB7b1d3cC52E658922b2aF00c5729001ceA98142C",
          "name": "TEST"
        }
      ],
      "providers": ["https://eth-rinkeby.alchemyapi.io/v2/Bi4KoxT0rgjHsmVvMRtdY_9rwrTsdY2h", "https://rpc.ankr.com/eth_rinkeby"]
    },
    "2221": {
      "assets": [
        {
          "address": "0xB5AabB55385bfBe31D627E2A717a7B189ddA4F8F",
          "name": "TEST"
        }
      ],
      "providers": ["https://eth-kovan.alchemyapi.io/v2/eEcEgHdAt3fkZkRmzbaI-Sv_1Gw6OxrB"]
    }
  },
  "logLevel": "debug",
  "mnemonic": "",
  "sequencerUrl": "https://sequencer.testnet.connext.ninja",
  "server": { "adminToken": "blahblahblah" },
  "environment": "production"
}

Redis Config

The router uses an internal Redis instance in Docker by default. However, if you prefer to use your external Redis instance, you can set the corresponding host and port field in config.json. Instructions can be found on the Redis website.

Web3Signer Config

Set up Web3Signer config files to set the private key securely. Fill the private key of your signer to key.example.yaml.

mv key.example.yaml key.yaml

nano ~/nxtp-router-docker-compose/key.yaml

Add your private key to to key.yaml.

type: "file-raw"
keyType: "SECP256K1"
privateKey: "c41a12b71d297b7bea5be41f4b752"

Create docker-compose service

cd ~/nxtp-router-docker-compose
docker-compose create

Run docker-compose

docker-compose up -d

Check the logs

docker logs --follow --tail 100 router

Restart docker-compose service

docker-compose restart

Update Version

  1. Modify .env to change NXTP_VERSION
  2. Update stack
docker-compose pull
docker-compose up -d

Claim test tokens

Visit faucet and claim TEST tokens:

Add Liquidity

Paste your router address to the link

https://testnet.amarok.connextscan.io/router/<your router address>

Click “Manage Router” and add your liquidity

Congratulation! You started Connext Router!

Subscribe to cyberG|DVS
Receive the latest updates directly to your inbox.
Verification
This entry has been permanently stored onchain and signed by its creator.