Blog

Developer Guide

How to Build a Production-Ready Stellar App Without Running Your Own Node

Running your own Stellar infrastructure sounds empowering until you are debugging disk space issues at 3 AM because your Horizon database grew faster than expected. For most applications, managed infrastructure is the pragmatic choice.

What Running Your Own Node Actually Means

Horizon Server

  • PostgreSQL database that grows continuously (50+ GB/year)
  • Captive Core process that must stay in sync with the network
  • Ingestion pipeline processing every ledger into PostgreSQL
  • Ledger lag monitoring: If ingestion falls behind, your data is stale
  • Database maintenance: Vacuuming, index rebuilding, connection pool tuning
  • Soroban RPC

  • Captive Core (separate from Horizon's)
  • Ledger retention management
  • Health monitoring: Is the RPC responding? Is it up to date?
  • Both Require

  • 24/7 uptime with monitoring and alerting
  • Security patching for the OS, databases, and Stellar software
  • Backup strategy for the PostgreSQL database
  • Scaling plan as your traffic grows
  • The Managed Alternative

    A managed Stellar API service handles all of the above. You get an API endpoint, and the provider handles the infrastructure.

    What You Skip

  • No PostgreSQL to manage
  • No Captive Core to monitor
  • No disk space to watch
  • No ledger lag to debug
  • No security patches to apply
  • No 3 AM alerts about ingestion pipeline failures
  • Building Your App

    Step 1: Get API Access

    Sign up for a managed API and get your API key. With LumenQuery, the free tier gives you 10,000 requests per month.

    Step 2: Query Account Data

    const HORIZON = 'https://horizon.stellar.org';
    
    async function getBalances(accountId) {
      const res = await fetch(`${HORIZON}/accounts/${accountId}`);
      const account = await res.json();
      return account.balances.map(b => ({
        asset: b.asset_type === 'native' ? 'XLM' : b.asset_code,
        balance: parseFloat(b.balance).toLocaleString(),
      }));
    }

    Step 3: Submit Transactions via RPC

    async function submitTransaction(signedXdr) {
      const res = await fetch('https://rpc.lumenquery.io', {
        method: 'POST',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({
          jsonrpc: '2.0', id: 1,
          method: 'sendTransaction',
          params: { transaction: signedXdr },
        }),
      });
      return res.json();
    }

    When You Actually Need Your Own Node

  • Data sovereignty: Regulatory requirements that data stays within your infrastructure
  • Custom indexing: You need data Horizon does not expose
  • Extreme throughput: Millions of API calls per hour with sub-10ms latency
  • Validator operations: You are running a Stellar validator
  • For most apps — wallets, explorers, DeFi frontends, payment processors — managed infrastructure is the right choice.

    Cost Comparison

    AspectSelf-HostedManaged
    **Server costs**$200-500/mo$0-99/mo
    **DevOps time**10-20 hrs/month0 hrs/month
    **Time to first API call**1-3 days5 minutes
    **Scaling**ManualAutomatic

    The engineer hours spent managing infrastructure cost more than a managed API subscription.


    *Ship your Stellar app faster. LumenQuery handles the infrastructure so you can focus on your product. Free tier available.*