Search
In order to run a Chainlink node, it must be able to connect to an Ethereum client with an active websocket connection. This is accomplished by running either Geth, Parity, Nethermind, or using a 3rd party connection. The examples below show how to run Geth, Parity and Nethermind in their official Docker containers for each network that they support.
We would recommend to use one of the external services for your Ethereum client, since running one on your own managed machine will consume a lot of resources. If you do choose to run either Geth, Parity or Nethermind with their native clients, please be sure to enable the websockets API, since it is required for the Chainlink node to communicate with the Ethereum blockchain.
The Geth client can be used for the Rinkeby test network, as well as the Ethereum main network.
Download the latest version:
docker pull ethereum/client-go:latest
Create a local directory to persist the data:
mkdir ~/.geth-rinkeby
mkdir ~/.geth
Run the container:
docker run --name eth -p 8546:8546 -v ~/.geth-rinkeby:/geth -it \
ethereum/client-go --rinkeby --ws --ipcdisable \
--ws.addr 0.0.0.0 --ws.origins="*" --datadir /geth
docker run --name eth -p 8546:8546 -v ~/.geth:/geth -it \
ethereum/client-go --syncmode fast --ws --ipcdisable \
--ws.addr 0.0.0.0 --ws.origins="*" --datadir /geth
Once the Ethereum client is running, you can use Ctrl + P, Ctrl + Q
to detach from the container without stopping it. You will need to leave the container running for the Chainlink node to connect to it.
If the container was stopped and you need to run it again, you can simply use the following command:
docker start -i eth
Return to Running a Chainlink Node.
The OpenEthereum client can be used for the Kovan test network, as well as the Ethereum main network.
Download the latest version:
docker pull openethereum/openethereum:stable
Create a local directory to persist the data:
mkdir ~/.openethereum-kovan
mkdir ~/.parity
Run the container:
docker run --name eth -p 8546:8546 \
-v ~/.openethereum-kovan/:/home/openethereum/.local/share/io.parity.ethereum/ \
-it openethereum/openethereum:latest --chain=kovan \
--ws-interface=all --ws-origins="all" \
--base-path /home/openethereum/.local/share/io.parity.ethereum/
docker run --name eth -p 8546:8546 \
-v ~/.parity:/home/parity/.local/share/io.parity.ethereum/ \
-it parity/parity:stable --ws-interface=all --ws-origins="all" \
--base-path /home/parity/.local/share/io.parity.ethereum/
Once the Ethereum client is running, you can use Ctrl + P, Ctrl + Q
to detach from the container without stopping it. You will need to leave the container running for the Chainlink node to connect to it.
If the container was stopped and you need to run it again, you can simply use the following command:
docker start -i eth
Return to Running a Chainlink Node.
The Nethermind client can be used for Ethereum Mainnet and test networks such as Kovan, Rinkeby and Ropsten. To see a full list of supported networks, see the Nethermind supported network configurations page.
Download the latest version:
docker pull nethermind/nethermind:latest
Create a local directory to persist the data:
mkdir ~/.nethermind-kovan
mkdir ~/.nethermind
Run the container:
docker run --name eth -p 8545:8545 \
-v ~/.nethermind-kovan/:/nethermind/data \
-it nethermind/nethermind:latest --config kovan \
--Init.WebSocketsEnabled true --JsonRpc.Enabled true --JsonRpc.Host 0.0.0.0 --NoCategory.CorsOrigins * \
--datadir data
docker run --name eth -p 8545:8545 \
-v ~/.nethermind-kovan/:/nethermind/data \
-it nethermind/nethermind:latest --Sync.FastSync true \
--Init.WebSocketsEnabled true --JsonRpc.Enabled true --JsonRpc.Host 0.0.0.0 --NoCategory.CorsOrigins * \
--datadir data
After the Ethereum client is running, you can use Ctrl + P, Ctrl + Q
to detach from the container without stopping it. You will need to leave the container running for the Chainlink node to connect to it.
If the container was stopped and you need to run it again, use the following command to start it:
docker start -i eth
Return to Running a Chainlink Node.
The following services offer Ethereum clients with websockets connectivity known to work with the Chainlink node.
Example connection setting:
ETH_URL=wss://eth-rinkeby.alchemyapi.io/v2/YOUR_PROJECT_ID
ETH_URL=wss://eth-kovan.alchemyapi.io/v2/YOUR_PROJECT_ID
ETH_URL=wss://eth-mainnet.alchemyapi.io/v2/YOUR_PROJECT_ID
Example connection setting:
ETH_URL=wss://user-name:pass-word-pass-word-pass-word@ws-nd-123-456-789.p2pify.com
Example connection setting:
ETH_URL=wss://cl-rinkeby.fiews.io/v1/YOUR_API_KEY
ETH_URL=wss://cl-main.fiews.io/v1/YOUR_API_KEY
Example connection setting:
ETH_URL=wss://eth.getblock.io/rinkeby/?api_key=YOUR_API_KEY
ETH_URL=wss://eth.getblock.io/kovan/?api_key=YOUR_API_KEY
ETH_URL=wss://eth.getblock.io/ropsten/?api_key=YOUR_API_KEY
ETH_URL=wss://eth.getblock.io/goerli/?api_key=YOUR_API_KEY
ETH_URL=wss://eth.getblock.io/sepolia/?api_key=YOUR_API_KEY
ETH_URL=wss://eth.getblock.io/mainnet/?api_key=YOUR_API_KEY
Example connection setting. Replace YOUR_PROJECT_ID with the ID Infura provides you on your project settings page.
ETH_URL=wss://rinkeby.infura.io/ws/v3/YOUR_PROJECT_ID
ETH_URL=wss://kovan.infura.io/ws/v3/YOUR_PROJECT_ID
ETH_URL=wss://mainnet.infura.io/ws/v3/YOUR_PROJECT_ID
Example connection setting:
ETH_URL=wss://main-rpc.linkpool.io/ws
Example connection setting:
ETH_URL=wss://your-node-name.rinkeby.quiknode.pro/security-hash/
ETH_URL=wss://your-node-name.kovan.quiknode.pro/security-hash/
ETH_URL=wss://your-node-name.quiknode.pro/security-hash/
Warning
By default, go-ethereum rejects transactions that exceed the built-in RPC gas/txfee caps. The node will fatally error transactions if this happens. If you ever exceed the caps, the node will miss transactions.
At a minimum, disable the default RPC gas and txfee caps on your ETH node. This can be done in the TOML file as seen below, or by running go-ethereum with the command line arguments: --rpc.gascap=0 --rpc.txfeecap=0
.
To learn more about configuring ETH nodes, see the configuration page.