Deploy a Sonic Indexer on OnFinality

Learn how to deploy a SubQuery indexer on the Sonic blockchain with OnFinality’s RPC and managed infrastructure. Build fast, scalable dApps with real-time blockchain data.

Deploy a Sonic Indexer on OnFinality

Last month, we proudly announced that Sonic is powered by OnFinality’s high-performance RPC services. Now, developers can go even further by deploying Sonic indexers directly onto OnFinality’s managed infrastructure - giving dApps seamless access to real-time Sonic blockchain data.

In this guide, we’ll walk you through how to publish and deploy a SubQuery project for the Sonic network, ensuring your application can scale with reliable RPC nodes and flexible indexing solutions.

What is a Sonic Indexer?

A Sonic indexer is a tool that processes and organizes raw data from the Sonic blockchain so developers can query it quickly and reliably. Instead of manually parsing blockchain data (which is slow and inefficient), an indexer transforms chain events, transactions, and states into structured datasets that can be accessed through an easy-to-use queries.

For Sonic developers, this means:

  • Faster access to on-chain data
  • Reduced RPC overhead
  • Easier integration with front-end applications

Why SubQuery + OnFinality for your Sonic Indexer?

SubQuery is a powerful open-source framework for building custom blockchain indexers. With SubQuery, you can extract, transform, and serve blockchain data to your dApp using a flexible GraphQL API.

By publishing your SubQuery project on OnFinality, you benefit from:

  • One-click deployment — No need to run your own infrastructure
  • Auto-scaling infrastructure — Scales with your app's usage
  • Reliable Sonic RPC Node Access – OnFinality provides globally distributed Sonic RPC endpoints, ensuring low-latency and high-uptime connections.

Steps to run a Sonic Indexer on OnFinality

🛠 Prerequisites

Before getting started, ensure you have:

  • A working SubQuery project for the Sonic network
  • A GitHub repository or IPFS-hosted version of your project - we'll use QmYFogkTFm89ghYSG5kQJMVpChRWoFF2gPmpRisepJVXH8 for this guide
  • An account on OnFinality’s Indexing Service

Step 1: Log In to OnFinality’s Indexing Service

To create your first project, head to OnFinality Indexing Service. You'll need to authenticate with your GitHub account to login.

Stellar Indexer: Log in to OnFinality

 OnFinality Indexing Service is where you manage all your hosted projects uploaded to the OnFinality Indexing Service platform. You can create, delete, and even upgrade projects all from this application.

Stellar Indexer: Select SubQuery

Step 2: Create Your Sonic Indexing Project

There are two methods to create a project in the OnFinality Indexing Service: you can use the UI or directly via the subql cli tool

Using the UI

Start by clicking on "Create Project". You'll be taken to the new project form. Start by selecting what project type you would like to deploy (SubQuery), and then follow the steps and enter the following (you can change this in the future):

  • Project Name: Name your project.
  • Description: Provide a description of your project.
  • Database: Premium customers can access dedicated databases to host production SubQuery projects from. If this interests you, you can contact sales@onfinality.io to have this setting enabled.
  • Visible in Explorer: If selected, this will show the project from the public explorer to share with the community.
Stellar Indexer: Fill in project name and description

 Create your project and you'll see it on your OnFinality’s Indexing Project's list. Next, we just need to deploy the first version of it.

Stellar Indexer: Deploy first version

Using the CLI

You can also use @subql/cli to create a new deployment of your project to our Indexing Service. Please follow the guide on how to create a new project on the OnFinality’s Indexing Service in the CLI documentation.

Step 4: Deploy your First Version

While creating a project will setup the display details of the project, you must deploy a version of it before it becomes operational. Deploying a version triggers an indexing operation to start, and sets up the required query service to start accepting GraphQL requests. You can also deploy new versions to existing projects here.

With your new project, you'll see a "Deploy your first version" button. Click this, and fill in the required information about the deployment:

Stellar Indexer: enter Deployment CID
  • CID: Provide your IPFS deployment CID from Step 1
  • Manifest: The details are obtained from the contents of the provided CID, used to confirm that you have the correct deployment
Stellar Indexer: Select latest query version
  • Query Version: This is the version of SubQuery's query service that you want to run this project on. We suggest using the latest version
  • Advanced Settings: There are numerous advanced settings which are explained via the in built help feature.
Stellar Indexer: Enter OnFinality RPC Endpoint

Network Endpoints: You can use OnFinality’s limited public Sonic endpoint to get started:
https://sonic.api.onfinality.io/public

For best results, sign up at https://app.onfinality.io/signup to retrieve an endpoint with higher rate limits

How to get an unlimited Sonic RPC Endpoint in OnFinality

Once submitted, OnFinality will begin indexing your project. Depending on Sonic's chain state and your query configuration, this may take a few minutes to fully sync.

Step 5: Connect to your Project

Once your deployment has successfully completed and our nodes have indexed your data from the chain, you'll be able to connect to your project via the displayed GraphQL Query endpoint.

Stellar Indexer: Check status and make test queries

 Alternatively, you can click on the three dots next to the title of your project, and view it on SubQuery Explorer. There you can use the in browser playground to get started.

Stellar Indexer: Use Subquery's playground

Additional Resources

For deeper insights, check out these resources:

Common Questions

What is the best data indexer for Sonic?

The best data indexer for Sonic is SubQuery, which provides flexible, high-performance indexing and deploys seamlessly with OnFinality’s scalable infrastructure.

How do I build my first Sonic SubQuery project?
Start by creating a SubQuery project using the official SubQuery documentation. Once built, you can deploy it directly to OnFinality’s Indexing Service for production use.

What RPC should I use for Sonic?
You can begin with OnFinality’s free public Sonic RPC endpoint. For production workloads or higher rate limits, sign up for a dedicated endpoint at OnFinality.

Who needs to index Sonic data?
Any developer building on Sonic that requires structured, queryable data - such as DeFi apps, NFT platforms, explorers, or analytics dashboards - will benefit from running a SubQuery indexer.

Final Thoughts

Indexing is one of the most important steps in building scalable and data-driven applications on any blockchain. By combining SubQuery’s powerful indexing framework with OnFinality’s enterprise-grade infrastructure, developers on Sonic can move faster, reduce complexity, and deliver richer user experiences.

Whether you’re building a DeFi protocol, NFT marketplace, or an analytics dashboard, deploying your SubQuery project on OnFinality ensures reliability, speed, and global reach - so you can focus on your dApp, not infrastructure.

As Sonic continues to grow, having access to indexed blockchain data will be essential for any serious project. OnFinality makes this process simple, scalable, and production-ready from day one.


Need help? Contact support@onfinality.io or join our Telegram community.

Let’s build the future of Web3 on Sonic 🚀