Example datastore configurations can be found on the data lake integration page.
CAPTIVE_CORE_STORAGE_PATH and DB_PATH to it accordingly.
Then, you should create a configuration file for Stellar Core. You can find sample configuration files for Testnet and Pubnet
When using docker, you should create and mount a volume mount a volume on your container where the above configuration is stored.
If you are running locally on a unix-style machine, you could create a folder in your home directory called ~/rpc-config
- soroban-rpc-config.toml
- stellar-captive-core.cfg
-v /Users/<USERNAME>/test-rpc-config:/opt/stellar to your docker run command.
Your running container would mount that volume at the path /opt/stellar
Backfilling History on Startup
SetBACKFILL = true to populate the database with a trailing window of history synchronously on startup, before live ingestion begins. This option was added in RPC v25.1.0 and defaults to false.
HISTORY_RETENTION_WINDOW sets the target size of that window. The default is 120960 ledgers, which is about 7 days.
RPC treats this value as a target, not an exact count. Datastore coverage, ledgers already in the local database, and checkpoint boundaries can each reduce what the node fetches.
BACKFILL also requires datastore serving. Set SERVE_LEDGERS_FROM_DATASTORE = true. If you enable BACKFILL alone, RPC fails to start with this error: