Chainlink Developers

Welcome to the Chainlink documentation site. You'll find comprehensive guides and documentation to help you start working with Chainlink as quickly as possible, as well as support if you get stuck. Click here for an introductory walkthrough on how to create a Chainlink request on the Ropsten test network!

Building on Chainlink? Click here to get started!

Get Started

Configuration Variables

ALLOW_ORIGINS

Specifies the addresses/URLs of allowed connections to the API on CLIENT_NODE_URL. Input may be a comma-separated (no spaces) list.

BRIDGE_RESPONSE_URL

  • Default: none

Represents the URL for bridges to send a response to.

CHAINLINK_DEV

  • Default: "false"

Configures "development" mode. Allows for use of the /service_agreements endpoint. Development purposes only. New features will occasionally be placed behind the "dev" flag, which refers to this configuration variable.

CHAINLINK_PORT

  • Default: "6688"

Port used for the API Reference and GUI.

CHAINLINK_TLS_HOST

  • Default: none

The hostname configured for TLS to be used by the Chainlink node. This is useful if you've configured a domain name specific for your Chainlink node.

CHAINLINK_TLS_PORT

  • Default: "6689"

The port used for HTTPS connections.

CHAINLINK_TLS_REDIRECT

  • Default: "false"

Forces TLS redirect for unencrypted connections.

CHAINLINK_TX_ATTEMPT_LIMIT

  • Default: "10"

Represents the maximum number of transaction attempts that the Chainlink node should allow to for a transaction.

CLIENT_NODE_URL

This is the URL that you will use to interact with the node, including the GUI.

DATABASE_TIMEOUT

  • Default: "500ms"

If the database file is already in use, the Chainlink node will wait the specified value (with a given time unit) for the database to become available.

DATABASE_URL

  • Default: none

As an alternative to using a local Sqlite database, you can provide a remote PostgreSQL URI.

DEFAULT_HTTP_LIMIT

  • Default: "32768"

Prevents an endpoint from returning a payload larger than 32kb (the default) via the HttpGet and HttpPost core adapters.

ETH_CHAIN_ID

  • Default: "0"

Represents the chain ID to use for transactions. The Ethereum client must support the eth_chainId RPC method. Use the following command (with RPC calls enabled) to call your Ethereum client to ensure that it's supported. Geth and Parity's latest versions should support this call.

curl -k -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"eth_chainId","id":1}' http://localhost:8545

ETH_GAS_BUMP_THRESHOLD

  • Default: "12"

The number of blocks to wait if the transaction has still not been confirmed before resubmitting the transaction.

ETH_GAS_BUMP_WEI

  • Default: "5000000000"

The amount of wei to increase for the resubmitted transaction.

ETH_GAS_PRICE_DEFAULT

  • Default: "20000000000"

The default gas price to use when submitting transactions to the blockchain. Can be used with the chainlink setgasprice to be updated while the node is still running.

ETH_URL

  • Default: "ws://localhost:8546"

This is the websocket address of the Ethereum client that the Chainlink node will connect to. All interaction with the Ethereum blockchain will occur through this connection.

EXPLORER_URL

  • Default: none

The Explorer websocket URL for the node to push stats to.

EXPLORER_ACCESS_KEY

  • Default: none

The access key for authenticating with the Explorer.

EXPLORER_SECRET

  • Default: none

The secret for authenticating with the Explorer.

JSON_CONSOLE

  • Default: "false"

Flag to print the console output in JSON or in human-friendly output.

LINK_CONTRACT_ADDRESS

  • Default: "0x514910771AF9Ca656af840dff83E8264EcF986CA"

The address of the LINK token contract. Used for displaying the node account's LINK balance.

LOG_LEVEL

  • Default: "info"

The LOG_LEVEL environment variable determines both what is printed on the screen and what is written to the logfile, located at $ROOT/log.jsonl.

The available options are:

  • "debug"
  • "info"
  • "warn"
  • "error"
  • "panic"

LOG_SQL

  • Default: "false"

Tells Chainlink to log all SQL statements made using the default logger.

LOG_TO_DISK

  • Default: "true"

Enables or disables the node writing to the $ROOT/log.jsonl file.

MAXIMUM_SERVICE_DURATION

  • Default: "8760h"

The maximum duration that a service agreement can be valid for. Default is one year.

MIN_INCOMING_CONFIRMATIONS

  • Default: "3"

The number of block confirmations to wait before beginning a task run.

MIN_OUTGOING_CONFIRMATIONS

  • Default: "12"

The number of block confirmations to wait after a task run has been ran to regard it as "completed" in the node.

MINIMUM_CONTRACT_PAYMENT

  • Default: "1000000000000000000"

For jobs that use the EthTx adapter, this is the minimum payment amount in order for the node to accept and process the job. Since there are no decimals on the EVM, the value is represented like wei. This makes the default value 1 LINK.

MINIMUM_REQUEST_EXPIRATION

  • Default: "300"

Service agreement encumbrance parameter for the request expiration time.

MINIMUM_SERVICE_DURATION

  • Default: "0s"

The minimum duration that a service agreement can be valid for.

ORACLE_CONTRACT_ADDRESS

  • Default: none

The address of the oracle contract. This is used for the withdraw function from the node.

REAPER_EXPIRATION

  • Default: "240h"

Cleans up stale sessions in the node.

ROOT

  • Default: "~/.chainlink"

This is the directory where the db.sqlite3 and log.jsonl files reside. The db.sqlite3 file is the local database that the Chainlink node uses to keep track of JobSpecs, JobRuns, their status according to each interaction, and BridgeTypes (for external adapters). log.jsonl is the log as written by the Chainlink node, depending on the LOG_LEVEL specified by the environment variable's value.

SECURE_COOKIES

  • Default: "true"

Requires the use of secure cookies for authentication. Set to false to enable standard http requests along with CHAINLINK_TLS_PORT=0.

SESSION_TIMEOUT

  • Default: "15m"

This value determines the amount of idle time to elapse before the GUI signs out users from their sessions.

TLS_CERT_PATH

  • Default: none

Location of the TLS certificate file. Example: /home/$USER/.chainlink/tls/server.crt

TLS_KEY_PATH

  • Default: none

Location of the TLS private key file. Example: /home/$USER/.chainlink/tls/server.key

Configuration Variables


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.