1. Home
  2. Docs
  3. Chainlink Node Setup
  4. Chainlink Node Setup
  5. Run Chainlink & Ethereum Containers W/ Docker

Run Chainlink & Ethereum Containers W/ Docker

Prerequisites

  • Docker
  • Python (Version 3)
  • Git
  • Make
  • OpenSSL (should be installed on all Linux systems)

General Setup and Run

Follow the links below for system-specific instructions to install the prerequisites

Clone this repo and enter the directory:

git clone https://github.com/thodges-gh/cldocker.git && cd cldocker

Now run the following commands after entering the directory:

make
make setup

The setup script will display several prompts, each with a default value, and will start the node for you when complete. If you take the defaults for all the questions, it will spin up a Parity light client on Ropsten and prompt you for information about the node (passwords and API user).

Interacting with the Node

Navigate to https://localhost:6689/ to view the web interface. Use the same credentials that you entered in the setup script. If using a VPS, replace localhost with your instance’s public IP. By default the node uses a self-signed certificate, so your browser may complain about that, simply add an exception (Firefox) or continue anyway (Chrome) to access the GUI.

The first thing you should do once signed in is take note of your ETH address by going to the Configuration page of the UI, you will need to send some ether to it in order for the node to pay for gas.

You can follow the logs of all containers by running:

make logs

Or to just view the output of the Chainlink container(s):

make logs-cl

Or just the Ethereum container:

make logs-eth

Starting and stopping

After you have gone through the setup, you can use the following commands to maintain the containers.

Chainlink node

To start a new Chainlink container instance:

make start-cl

To stop running Chainlink containers:

make stop-cl

Performing a rolling upgrade can be done with a single command which:

  • Pulls latest image
  • Starts a new container with the port incremented
  • Stops the old container
make update-cl

To only pull the latest Chainlink image (useful to see if you even need to do an update):

make pull-cl

Ethereum client

To restart the Ethereum client:

make restart-eth

To stop the Ethereum client:

make stop-eth

To pull the latest (stable) image for your Ethereum client:

make pull-geth

Or

make pull-parity

Resetting the environment file

Run the following command:

make clean

This will reset the environment file to its defaults. You will then need to run make setup again before starting nodes.


Amazon AWS Instructions

Deploy Amazon Linux 2 AMI instance and connect

Install base programs:

sudo yum install -y git curl openssl make python3

Install and Setup Docker:

sudo amazon-linux-extras install docker
sudo systemctl start docker
sudo gpasswd -a $USER docker
exit

Log in again through ssh. Test that Docker works without sudo by running docker ps.

Follow the instructions under General Setup and Run.

Debian-based Linux Distribution Instructions

This should work for Debian, Ubuntu, and similar Linux distributions on any VPS provider.

Install base programs:

sudo apt install -y git curl openssl make python3

Install and Setup Docker:

curl -sSL https://get.docker.com/ | sh
sudo usermod -aG docker $USER
exit

Log in to the machine again and test that Docker works without sudo by running docker ps.

Follow the instructions under General Setup and Run.

Red Hat-based Linux Distribution Instructions

This should work for CentOS, Fedora, and similar Linux distributions on any VPS provider.

Install base programs:

sudo yum install -y git curl openssl make python3

Install and Setup Docker:

curl -sSL https://get.docker.com/ | sh
sudo systemctl start docker
sudo usermod -aG docker $USER
exit

Log in to the machine again and test that Docker works without sudo by running docker ps.

Follow the instructions under General Setup and Run.

Was this article helpful to you? Yes No

How can we help?