-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Running the Docker Image
- Get Docker-CE here.
- If using the local Devnet, follow these instructions to start that image.
- If connecting to an Ethereum client, make sure that is running first with websockets enabled.
Download the latest version:
docker pull smartcontract/chainlink:latest
Create a persistent volume:
docker volume create --name chainlink
Create an environment file and populate with your variables, for example:
touch ~/.env
And populate it with values. You will need to change the ETH_CHAIN_ID to the network you're connecting to and the ETH_URL to the address of the machine running your Ethereum node.
ROOT=/chainlink
LOG_LEVEL=debug
ETH_URL=ws://172.17.0.1:8546
ETH_CHAIN_ID=3
TX_MIN_CONFIRMATIONS=2
TASK_MIN_CONFIRMATIONS=0
LINK_CONTRACT_ADDRESS=0x20fe562d797a42dcb3399062ae9546cd06f63280
CHAINLINK_DEV=true
Now you can run the Docker image:
docker run -p 6688:6688 \
-v chainlink:/chainlink \
-it --env-file=/home/$USER/.env \
smartcontract/chainlink n
Or on a Mac:
docker run -p 6688:6688 \
-v chainlink:/chainlink \
-it --env-file=/Users/$USER/.env \
smartcontract/chainlink n
The first time running the image, it will ask you for a password. This is your keystore password and you will need to keep that safe, since it will hold Ethereum that the node will use to pay for gas fees. When you start the node again, it will ask for the password unless you supply it with a file containing the password (with the -p
option).
You can now connect to your Chainlink node's UI interface by navigating to http://localhost:6688.