Skip to content

Development Setup Guide

pavel-raykov edited this page Apr 3, 2024 · 43 revisions

The Complete Setup Guide for a Chainlink Development Environment

Install Go, Git, developer tools, Python (2.7), curl

Debian-based Linux (Ubuntu, Mint, etc.)

sudo apt install -y git build-essential python curl

Red Hat-based Linux (CentOS, Fedora, etc.)

sudo yum groupinstall -y 'C Development Tools and Libraries' 
sudo yum install -y git python curl

Mac OSX

brew install git curl golang

Windows-based environments can follow the instructions here.

After this point, instructions should be general for any *nix flavored operating system.

Install Node.JS v16

Install PNPM

npm install -g pnpm

Download Go (if not previously installed)

Setup paths

If needed, adjust the location of your Go installation and .bashrc to your setup.

mkdir -p ~/go/bin
export GOPATH=~/go
export PATH=$PATH:/usr/local/go/bin:~/go/bin
echo "export GOPATH=$GOPATH" >> ~/.bashrc
echo "export PATH=$PATH" >> ~/.bashrc
source ~/.bashrc

Download Chainlink and install dependencies

git clone https://github.com/smartcontractkit/chainlink.git
cd chainlink
make install

The first time running make install will take a while to finish.

Once complete, you can run chainlink -h to check that the binary was created (note that the binary is placed in ~/go/bin).

For local development, tools are available in the tools/bin/ directory:

  • cldev: sets environment variables and runs the source of the node directly
  • gethnet: (requires Geth to be installed) runs a local Geth Ethereum instance
  • devnet: (requires Docker to be installed) runs a local Parity Ethereum instance

More

See our Development Tips for more information on the tools we've set up to make developing Chainlink easier.

Clone this wiki locally