Skip to main content
There are three primary ways to deploy a subgraph on Goldsky:
  1. From source code
  2. Migrating from The Graph or any other subgraph host
  3. Via instant, no-code subgraphs
For any of the above, you’ll need to have the Goldsky CLI installed and be logged in; you can do this by following the instructions below.
  1. Install the Goldsky CLI: For macOS/Linux:
    For Windows:
    Windows users need to have Node.js and npm installed first. Download from nodejs.org if not already installed.
  2. Log into your Project by running:
    This opens your browser to sign in (Google, GitHub, SSO, or email). Once you authenticate, the CLI is logged in automatically — there’s no API key to copy or paste.
    On a headless or remote machine (or in CI), create an API key on your Project Settings page and pass it directly with goldsky login --token <API_KEY>. Use goldsky login --no-browser to print the login URL instead of opening a browser.
  3. Now that you are logged in, run goldsky to get started:
For these examples we’ll use the Ethereum contract for POAP.

From source code

If you’ve developed your own subgraph, you can deploy it from the source. In our example we’ll work off of a clone of the POAP subgraph. First we need to clone the Git repo.
Now change into that directory. From here, we’ll build the subgraph from templates. Open source subgraphs have different instructions to get them to build, so check the README.md or look at the package.json for hints as to the correct build commands. Usually it’s a two step process, but since POAP is deployed on multiple chains, there’s one extra step at the start to generate the correct data from templates.
Then you can deploy the subgraph to Goldsky using the following command.

From The Graph or another host

For a detailed walkthrough, follow our dedicated guide.

Via instant, low-code subgraphs

For a detailed walkthrough, follow our dedicated guide.