Run an Ethereum Client
Chainlink nodes must be able to connect to an Ethereum client with an active websocket connection. This is accomplished by running both an execution client and a consensus client. You can run these clients yourself, but running Ethereum clients requires significant storage and network resources. Optionally, you can use External Services that manage these clients for you.
Geth
You can use the Geth client for the Sepolia testnet and the Ethereum Mainnet. See the Geth Documentation for a list of supported networks.
Download the latest version:
docker pull ethereum/client-go:latest
Create a local directory to persist the data:
mkdir ~/.geth-sepolia
mkdir ~/.geth
Run the container:
docker run --name eth -p 8546:8546 -v ~/.geth-sepolia:/geth -it \
ethereum/client-go --sepolia --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 --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
Follow Geth's instructions for Connecting to Consensus Clients. This will require some additional configuration settings for the Docker command that runs Geth.
Return to Running a Chainlink Node.
Nethermind
You can use the Nethermind client for the Ethereum Mainnet. See the Nethermind supported network configurations page for a list of supported networks.
Download the latest version:
docker pull nethermind/nethermind:latest
Create a local directory to persist the data:
mkdir ~/.nethermind-sepolia
mkdir ~/.nethermind
Run the container:
docker run --name eth -p 8545:8545 \
-v ~/.nethermind-sepolia/:/nethermind/data \
-it nethermind/nethermind:latest --config sepolia \
--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/:/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
Follow Nethermind's instructions for Installing and configuring the Consensus Client. This will require some additional configuration settings for the Docker command that runs Nethermind.
Return to Running a Chainlink Node.
External Services
The following services offer Ethereum clients with websockets connectivity known to work with the Chainlink node.
Alchemy
Example connection setting:
ETH_URL=wss://eth-sepolia.alchemyapi.io/v2/YOUR_PROJECT_ID
ETH_URL=wss://eth-mainnet.alchemyapi.io/v2/YOUR_PROJECT_ID
Chainstack
Example connection setting:
ETH_URL=wss://user-name:[email protected]
Fiews
Example connection setting:
ETH_URL=wss://cl-main.fiews.io/v2/YOUR_API_KEY
GetBlock
Example connection setting:
ETH_URL=wss://eth.getblock.io/sepolia/?api_key=YOUR_API_KEY
ETH_URL=wss://eth.getblock.io/mainnet/?api_key=YOUR_API_KEY
Infura
Example connection setting. Replace YOUR_PROJECT_ID with the ID Infura provides you on your project settings page.
ETH_URL=wss://sepolia.infura.io/ws/v3/YOUR_PROJECT_ID
ETH_URL=wss://mainnet.infura.io/ws/v3/YOUR_PROJECT_ID
LinkPool
Example connection setting:
ETH_URL=wss://main-rpc.linkpool.io/ws
QuikNode
Example connection setting:
ETH_URL=wss://your-node-name.sepolia.quiknode.pro/security-hash/
ETH_URL=wss://your-node-name.quiknode.pro/security-hash/
Configuring your ETH node
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.