chainlink node setup using xdai.
public part of config files for virtual server setup.
assumption: only ssh access is possible
- open new shell (green)
- ssh login using the command below
ssh <user>@<ip-address>
<user>
your ssh username<ip-address>
the ip address of the machine where your chainlink node runs
then, in the chainlink node shell
- use docker ps to check the state of running containers and their names.
- use docker exec to open a shell inside the chainlink container
cd /opt/chainlinknode
cat api
docker ps -a
docker exec -it chainlinknode_chainlink_1 bash
inside the chainlink docker container you can now use the chainlink cli.
the chainlink cli first needs an admin login (see file api
for the credentials)
chainlink admin login
chainlink help
- open new shell (green)
- ssh tunnel using the command below
- access api endpoints via
localhost:/6688
ssh -L 6688:localhost:6688 <user>@<ip-address>
<user>
your ssh username<ip-address>
the ip address of the machine where your chainlink node runs
chainlink node auth can be done via session cookies.
curl can be used to create a session cookie (./cookie
) as shown below.
export USERNAME=<chainlink admin user name>
export PASSWORD=<chainlink admin user password>
curl -c ./cookie -H 'Content-Type: application/json' -d '{"email":"'${USERNAME}'", "PASSWORD":"'${PASSWORD}'"}' localhost:6688/sessions
examples below: use the cookie to show the node's accounting address and list the oracle node jobs
curl -b ./cookie -c ./cookie localhost:6688/v2/keys/eth
curl -b ./cookie -c ./cookie localhost:6688/v2/jobs
chainlink api endpoints extracted from the chainlink go source on github
/health
/readyz
/v2/bridge_types
/v2/chains/evm
/v2/config
/v2/external_initiators
/v2/features
/v2/feeds_managers
/v2/job_proposals
/v2/jobs
/v2/keys/csa
/v2/keys/eth
/v2/keys/ocr
/v2/keys/p2p
/v2/keys/vrf
/v2/log
/v2/ping
/v2/pipeline/runs
/v2/transactions/
/v2/tx_attempts
- open new shell (green)
- ssh tunnel using the command below
- open ui in your browser via url http://localhost:6688/
ssh -L 6688:localhost:6688 <user>@<ip-address>
<user>
your ssh username<ip-address>
the ip address of the machine where your chainlink node runs
- ssh tunnel
- open new shell (green)
- connect to postgresql db with
postgresql://<db-user>:<db-password>@localhost:5432/chainlink
ssh -L 5432:localhost:5432 <user>@<ip-address>
<db-user>
the db user name (see postgres.env)<db-password>
the db user password (see postgres.env)<user>
your ssh username<ip-address>
the ip address of the machine where your chainlink node runs
cd operator
docker run -it --rm \
-v $PWD:/projects/operator \
brownie
inside container
cd operator
brownie pm install OpenZeppelin/[email protected]
brownie pm install smartcontractkit/[email protected]
brownie compile
brownie run deploy