Learn about Chainlink by working through basic examples using Ethereum Sepolia, Arbitrum Sepolia, or Polygon Amoy.
.
├── Arbitrum/
│ ├── chainlink-volume/
│ │ ├── .api
│ │ ├── config.toml
│ │ └── secrets.toml
│ ├── data
│ ├── .env
│ ├── database.env
│ └── docker-compose.yml
├── Ethereum/
│ ├── chainlink-volume/
│ │ ├── .api
│ │ ├── config.toml
│ │ └── secrets.toml
│ ├── data
│ ├── .env
│ ├── database.env
│ └── docker-compose.yml
├── Polygon/
│ ├── chainlink-volume/
│ │ ├── .api
│ │ ├── config.toml
│ │ └── secrets.toml
│ ├── data
│ ├── .env
│ ├── database.env
│ └── docker-compose.yml
├── LICENSE
└── README.md
- Install Docker
- Create an Infura account:
- Go to the Projects section and create a new project.
- In the KEYS section, note your credentials.
- Under the ENDPOINTS tab, select Ethereum Sepolia, Arbitrum Sepolia, or Polygon Amoy.
- Copy the HTTPS and WebSocket URLs for each network.
- Example for Ethereum Sepolia:
https://sepolia.infura.io/v3/YOUR_API_KEYwss://sepolia.infura.io/ws/v3/YOUR_API_KEY
- Example for Arbitrum Sepolia:
https://arbitrum-sepolia.infura.io/v3/YOUR_API_KEYwss://arbitrum-sepolia.infura.io/ws/v3/YOUR_API_KEY
- Example for Polygon Amoy:
https://polygon-amoy.infura.io/v3/YOUR_API_KEYwss://polygon-amoy.infura.io/ws/v3/YOUR_API_KEY
- Example for Ethereum Sepolia:
These will be used to connect your Chainlink node to the blockchain via RPC.
-
Set up the environment file for the database
The project contains two folders for network-specific configurations: Ethereum Sepolia, Arbitrum Sepolia, or Polygon Amoy.
Navigate to the folder for the network you want to run. For example:cd EthereumInside this folder, create a database.env file with the following values
POSTGRES_USER=postgres POSTGRES_PASSWORD=mysecretpassword POSTGRES_DB=chainlink-sepolia
- POSTGRES_USER — PostgreSQL username.
- POSTGRES_PASSWORD — password to access the database.
- POSTGRES_DB — name of the PostgreSQL database instance.
-
Modify
.apifile for Oracle Node authenticationIn the
chainlink-volumefolder, edit the.apifile to contain your login credentials for the Oracle Node: These details serve as the login username and password for the Oracle Node. They are required only during the initial creation of the PostgreSQL database instance but will remain valid for its entire lifecycle. The email must contain an @ symbol, and the password must be between 16 and 50 characters long.sampleemail@email.com mysecretpassword -
Modify
config.tomlfileIn the
chainlink-volumefolder, update the config.toml file to match the appropriate ChainID (e.g., 11155111 for Ethereum Sepolia). Replace the WSURL and HTTPURL values with the endpoints provided by your Infura account. Below is an example configuration for Ethereum Sepolia:[Log] Level = 'warn' [WebServer] AllowOrigins = '\*' SecureCookies = false [WebServer.TLS] HTTPSPort = 0 [[EVM]] ChainID = '11155111' [[EVM.Nodes]] Name = 'Sepolia' WSURL = 'wss://sepolia.infura.io/ws/v3/YOUR_API_KEY' HTTPURL = 'https://sepolia.infura.io/v3/YOUR_API_KEY'
-
Modify
secret.tomlfileIn the
chainlink-volumefolder, update the keystore secret key if necessary. This key serves as the wallet password used to unlock the generated keystore file. Also, update the database URL to ensure that the mysecretpassword and chainlink-sepolia values match the credentials and database name you set in step 1 for the PostgreSQL instance.[Password] Keystore = 'mysecretkeystorepassword' [Database] URL = "postgresql://postgres:mysecretpassword@host.docker.internal:5432/chainlink-sepolia?sslmode=disable"
-
Run Docker instances
From one directory above the
chainlink-volumefolder, the setup is automated using thedocker-compose.ymlfile. This file defines two services- chainlink_db: Runs a PostgreSQL database with environment variables from database.env, stores data locally, and includes a health check.
- chainlink: Runs the Chainlink node (v2.26.0) after the database is healthy, using configs and secrets from mounted volumes, exposing port 6688, and connecting to the host network. It essentially provisions a ready-to-run Chainlink node with a persistent Postgres backend. Run the following syntax in Bash to run docker instances.
docker compose up
- Open
http://localhost:6688in your browser to access the Chainlink node login page. - Sign in using the credentials from your
.apifile. - To find your account address, click the Configuration tab in the top‑right corner and look for the ACCOUNT_ADDRESS value.
- Fund your address with test LINK and ETH/POL by copying the account address and visiting the Chainlink Faucet .
The work contained in this repository is based on the official instructions provided in the Chainlink Nodes documentation.
It follows the recommended setup and configuration steps for running a Chainlink node, adapted with network‑specific examples for Ethereum Sepolia, Arbitrum Sepolia, and Polygon Amoy.
All configurations, environment variables, and deployment processes have been aligned with the guidelines outlined in the documentation to ensure compatibility and best practices.