Deploying subgraph on Ubuntu 18.04

ssh root@<IP>
sudo apt update
sudo apt upgrade
sudo apt install git
git config — global user.name “your-github-username”
git config — global user.email “your-github-email”
curl -sL https://deb.nodesource.com/setup_14.x | \sudo -E bash — && \
sudo apt install -y nodejs && sudo npm install -g npm@latest
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
source ~/.profile
nvm install 14.15.1
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo “deb https://dl.yarnpkg.com/debian/ stable main” | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn
yarn global add @graphprotocol/graph-cli
graph init --from-example <your-github-username>/<subgraph-name>
yarn install
cd <subgraph-name>
yarn codegen
graph deploy --access-token <your-access-token> \
--debug \
--node https://api.thegraph.com/deploy/ \
--ipfs https://api.thegraph.com/ipfs/ \
<your-github-username>/<subgraph-name>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ivan Staker

Ivan Staker

12 Followers

Professional validator, taking part in major testnets and running mainnets.