Bare Metal
These instructions will walk you through spinning up a Graph node on a generic Linux host.
Prerequisites
A Linux machine with access to the internet.
Sudo privileges on this machine.
A Klaytn API Endpoint.
This guide, with examples and the complete Docker configuration can be found on the Klaytn Indexing repo published and deployed by Bware Labs.
Setup
NOTE: : These instructions were tested on Ubuntu 22.04 LTS
Connect to your machine.
We will run services in docker, so we have to install it first. The way to do it is described here
NOTE: : It might be useful to allow non-root users to run docker too:
sudo chmod 666 /var/run/docker.sock
Configure docker to start automatically on boot:
Install other useful tools for debugging issues:
Copy the
nginx.conf
file to/etc/nginx/nginx.conf
on your host.
NOTE: : You might first have to create the directory:
sudo mkdir -p /etc/nginx
Edit
docker-compose.yml
and fill in your Klaytn API URL. Search forKLAYTN_API_URL
.Copy the
docker-compose.yml
file somewhere on your host.Start the docker containers. Run this command from the same folder as your
docker-compose.yml
:
Verify everything is running correctly:
Check the running docker containers:
You should see the following containers:
query-node
,index-node
,ipfs
,postgres
,nginx
Verify ports used by these services are open:
You should see the following ports:
80
,5001
,5432
,8000
,8020
Check if the index-node has started sync-ing:
You should see something like this:
Navigate to the
http://<EXTERNAL_IP>/subgraphs/graphql
url in a browser to confirm it is working correctly
NOTE: : If you are doing everything on localhost, then navigate to
http://localhost/subgraphs/graphql
NOTE: : To stop the services run
docker compose down
Last updated