> ## Documentation Index
> Fetch the complete documentation index at: https://docs.madra.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart for Operators

> Stand up your own StellarX402 facilitator, fund the sponsor account, and process a real paid request end-to-end.

You are running the facilitator, not calling it. This page gets a facilitator instance running locally against Stellar Testnet, funded well enough to sponsor fees, and confirmed by a real end-to-end paid request. Once that works, [Deploying to Mainnet](/guides/operators/deploying-to-mainnet) covers everything the local instance did not.

## Prerequisites

* Docker or Node.js 22+
* A Stellar keypair to use as the **sponsor account** (this pays network fees; not the same as any seller's `payTo` account)
* \~10 Testnet XLM in that sponsor account ([faucet](https://laboratory.stellar.org/#account-creator))

## 1. Pull the facilitator

```bash theme={null}
docker pull stellarx402/facilitator:latest
```

Or clone and run from source:

```bash theme={null}
git clone https://github.com/stellar/x402-stellar
cd x402-stellar/facilitator && npm install && npm run build
```

## 2. Configure

Create `.env`:

```bash theme={null}
# Network
NETWORK=stellar:testnet
STELLAR_RPC_URL=https://soroban-testnet.stellar.org

# Sponsor account (pays fees for buyers and sellers)
SPONSOR_SECRET_KEY=SA...
SPONSOR_FEE_CEILING_XLM=0.1        # per-tx max in XLM
SPONSOR_MIN_BALANCE_XLM=5          # alert threshold

# Discovery
DISCOVERY_ENABLED=true
DISCOVERY_STORAGE=postgres://...    # or sqlite:./bazaar.db

# Assets: whitelist which SEP-41 tokens you will settle
ALLOWED_ASSETS=USDC
```

Full reference: [Configuration Reference](/guides/operators/configuration-reference).

## 3. Run it

```bash theme={null}
docker run --env-file .env -p 4020:4020 stellarx402/facilitator:latest
```

You should see:

```text theme={null}
[facilitator] sponsor account funded: 10.0 XLM
[facilitator] listening on :4020
[bazaar] indexer ready
```

## 4. End-to-end smoke test

Point either the [buyer quickstart](/getting-started/quickstart-buyers) or the [seller quickstart](/getting-started/quickstart-sellers) at `http://localhost:4020` as the facilitator URL, then run the pair. If a paid request settles, your instance is healthy.

Check the supported endpoint directly:

```bash theme={null}
curl http://localhost:4020/supported
```

## Where to go next

<CardGroup cols={2}>
  <Card title="Configuration Reference" icon="sliders" href="/guides/operators/configuration-reference">
    Every environment variable and config key, grouped by subsystem.
  </Card>

  <Card title="Deploying to Mainnet" icon="rocket" href="/guides/operators/deploying-to-mainnet">
    Sponsor account funding math, RPC selection, and cutover checklist.
  </Card>

  <Card title="Observability" icon="chart-line" href="/guides/operators/observability">
    Metrics, tracing, dashboards, and what every number on them means.
  </Card>

  <Card title="Runbook" icon="book-open-reader" href="/guides/operators/runbook">
    Incident response for the situations that actually happen at 3am.
  </Card>
</CardGroup>
