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

5 Minute Fix Briefly unavailable for scheduled maintenance on WordPress

Git- Game Changer

How to Use Shazam’s Music-Recognition Feature in iOS 14

CS193p Notes —Lecture 11: Picker

Extending Object Behavior with the Decorator Pattern

How to Minimize Software Development Risks?

LeetCode — Binary Tree Zigzag Level Order Traversal

LeetCode — Implement strStr()

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

Open in app Get started

How to create a USDC (TRC-20) wallet?

Flatiron Module 1 CLI Scraper

A GUIDE TO SETUP AMAZON SIMPLE EMAIL SERVICE Complete Setup Guide to Open Your Sending Limit