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>

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Massive Genesis Staking Updates

Build A Simple Chat Bot GUI Using Python

Importing Flat Files with Inconsistent Formatting Using SSIS

Do you know how your Android reboot when you press the power button?

Community Writer Series

Kubernetes network note

Fisher’s exact test in R: independence test for a small sample

Fisher’s exact test in R: independence test for a small sample

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

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

More from Medium

Samizdat with Lică Sainciuc

Creative Photography shoot in our photo studio in London

Ethos Audit — BUSD Paycheck

How Secure Is the NDB Token? ‘Very’, Say the Experts