> For the complete documentation index, see [llms.txt](https://docs.old-faithful.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.old-faithful.net/running-old-faithful/installation-and-setup/configuration-files.md).

# Configuration Files

To configure the Old Faithful RPC server, you create a YAML configuration file per epoch of data you want the server to support.&#x20;

You can provide as few or as many epochs as you want, just make sure each has it's own configuration file.

### Storage

Store the configuration files on disk in a folder that can be accessed by the Old Faithful binary.

A common folder structure is like this

<pre data-full-width="false"><code><strong>configs/
</strong>  epoch-0.yml
  epoch-2.yml
  epoch-3.yml
  ...
</code></pre>

### Old Faithful YAML Config File Format

* `version`: current version is 1
* `epoch`: the epoch that this config file is for, an Old Faithful server can only host one config per epoch
* `genesis`: (only used for epoch 0), provide a URI to a genesis file if you want to serve epoch 0.
* `data`: retrieval configuration for the block/transaction data&#x20;
  * `car`: used for [Filecoin v1,](/running-old-faithful/installation-and-setup/configuration-files/filecoin-v1-retrievals.md) [http](/running-old-faithful/installation-and-setup/configuration-files/http.md), and [local file system](/running-old-faithful/installation-and-setup/configuration-files/local-file-system.md) retrievals
  * `filecoin`: used for [Filecoin v2](/running-old-faithful/installation-and-setup/configuration-files/filecoin-v2-retrievals.md) retrievals
* `indexes`: retrieval configuration for the index data (each index header is a `uri` argument)
  * `slot_to_cid`: provide a local file system path or HTTP URI to the slot-to-cid index
  * `cid_to_offset_and_size`: provide a local file system path or HTTP URI to the cid-to-offset-and-size index
  * `sig_to_cid`: provide a local file system path or HTTP URI to the sig-to-cid index&#x20;
  * `sig_exists`: provide a local file system path or HTTP URI to the sig exists index
  * `gsfa`: provide a local file system path to an unpacked `gsfa` index folder.&#x20;
    * If you want to use a remote URI, you need to start the faithful RPC with `--gsfa-only-signatures.`

<details>

<summary>Sample config file</summary>

```yaml
epoch: 0 # epoch number (required)
version: 1 # version number (required)
data: # data section (required)
  car:
    # Source the data from a CAR file (car-mode).
    # The URI can be a local filepath or an HTTP url.
    # This makes the indexes.cid_to_offset_and_size required.
    # If you are running in filecoin-mode, you can omit the car section entirely.
    uri: /media/runner/solana/cars/epoch-0.car
  filecoin:
    # filecoin-mode section: source the data directly from filecoin.
    # If you are running in car-mode, you can omit this section.
    # if enable=true, then the data will be sourced from filecoin.
    # if enable=false, then the data will be sourced from a CAR file (see 'car' section above).
    enable: false
genesis: # genesis section (required for epoch 0 only)
  # Local filepath to the genesis tarball.
  # You can download the genesis tarball from
  # wget https://api.mainnet-beta.solana.com/genesis.tar.bz2
  uri: /media/runner/solana/genesis.tar.bz2
indexes: # indexes section (required)
  cid_to_offset_and_size:
    # Required when using a CAR file; you can provide either a local filepath or a HTTP url.
    # Not used when running in filecoin-mode.
    uri: '/media/runner/solana/indexes/epoch-0/epoch-0-bafyreifljyxj55v6jycjf2y7tdibwwwqx75eqf5mn2thip2sswyc536zqq-mainnet-cid-to-offset-and-size.index'
  slot_to_cid:
    # required (always); you can provide either a local filepath or a HTTP url:
    uri: '/media/runner/solana/indexes/epoch-0/epoch-0-bafyreifljyxj55v6jycjf2y7tdibwwwqx75eqf5mn2thip2sswyc536zqq-mainnet-slot-to-cid.index'
  sig_to_cid:
    # required (always); you can provide either a local filepath or a HTTP url:
    uri: '/media/runner/solana/indexes/epoch-0/epoch-0-bafyreifljyxj55v6jycjf2y7tdibwwwqx75eqf5mn2thip2sswyc536zqq-mainnet-sig-to-cid.index'
  sig_exists:
    # required (always); you can provide either a local filepath or a HTTP url:
    uri: '/media/runner/solana/indexes/epoch-0/epoch-0-bafyreifljyxj55v6jycjf2y7tdibwwwqx75eqf5mn2thip2sswyc536zqq-mainnet-sig-exists.index'
  gsfa: # getSignaturesForAddress index
    # optional; must be a local directory path.
    uri: '/media/runner/solana/indexes/epoch-0/gsfa/epoch-0-bafyreifljyxj55v6jycjf2y7tdibwwwqx75eqf5mn2thip2sswyc536zqq-gsfa.indexdir'
```

</details>
