How to Deploy a Chainlink Node with an Ethereum Client

Posted By : Shivam
Aug 31, 2020

What is Chainlink?

 

ChainLink is a (decentralized) network of computing nodes. It provides us with information/data from off-blockchain sources to on-blockchain smart contracts with the help of oracles. It bridges the gap between smart contracts on the blockchain and real-world applications.

 

The data sharing between the blockchain and the real world is known as “oracles”.

 

 

Prerequisites

 

  • Docker- CE
  • PSQL Database
  • Terminal (Command Line)

 

Installing Docker

 

> curl -sSL https://get.docker.com/ | sh

> sudo usermod -aG docker $USER

> Exit

# log in again

 

Setting Up an Ethereum Client

 

To run a ChainLink full node, you first need an Ethereum client with a WebSocket connection (ws/wss).

 

Download the latest eth client version from docker hub:

 

docker pull ethereum/client-go:latest

 

Run the container:

 

docker run --name eth -p 8546:8546 -v ~/.geth:/geth -it ethereum/client-go --syncmode fast --ws --ipcdisable --wsaddr 0.0.0.0 --wsorigins="*" --datadir /geth

 

Once the Eth node is synced completely, we can run the chainlink node.

 

Create an Environment File

 

mkdir ~/.chainlink

 

echo "ROOT=/chainlink

LOG_LEVEL=debug

ETH_CHAIN_ID=1

CHAINLINK_TLS_PORT=0

SECURE_COOKIES=false

GAS_UPDATER_ENABLED=true

ALLOW_ORIGINS=*" > ~/.chainlink/.env

 

Now run the following command to add the Ethereum WebSocket URL to the environment file.

 

echo "ETH_URL=ws://$ETH_CONTAINER_IP:8546" >> ~/.chainlink/.env


 

Run the following command to add the PSQL Databases URL to the environment file

 

echo "DATABASE_URL=postgresql://$USERNAME:$PASSWORD@$SERVER:$PORT/$DATABASE" >> ~/.chainlink-ropsten/.env

 

Start the Chainlink Node

 

Now you can run the Docker image:

 

cd  docker run -p 6688:6688 -v ~/.chainlink:/chainlink -it --env-file=.env smartcontract/chainlink local n

 

You may also like to read | The Increasing Inevitability of Hybrid Smart Contract Development


 

While first time running this docker image (smartcontract/chainlink ), it will ask for a password. This password will be the wallet password that you can use to unlock the keystore file generated for you. Then, you'll see a prompt to enter an API Email-address and Password.

 

 



 

 

Now you connect to your Chainlink node's user interface by opening  http://localhost:6688 in your web browser.

 

That’s it. Your Chainlink full node is all set now and you can now easily interact with the smart contracts on the Chainlink network and the Blockchain. Now, you can add some jobs and play around with the node.

 

For more information about your project development related to Chainlink, you may also connect with our skilled blockchain developers.

Leave a

Comment

Name is required

Invalid Name

Comment is required

Recaptcha is required.

blog-detail

February 22, 2024 at 08:35 am

Your comment is awaiting moderation.

By using this site, you allow our use of cookies. For more information on the cookies we use and how to delete or block them, please read our cookie notice.

Chat with Us
chat-img
We would love to hear from you!

Oodles | Blockchain Development Company

Name is required

Please enter a valid Name

Please enter a valid Phone Number

Please remove URL from text