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

# Testing Against a Live Sia Indexer

> Run the developer integration test against a real Sia indexer.

This page is for contributors testing the Sia storage integration directly.
For a guided evaluation of the released CLI, use the
[Sia backend tutorial](/tutorials/sia-backend) instead.

The normal test suite uses the local backend and needs no Sia account. This
optional test uploads data to a real indexer, retrieves it, and verifies the
hash chain.

## 1. Build with Sia enabled

```sh theme={null}
cargo build -p obsidianlog-cli --features sia
```

## 2. Connect an app to an indexer

Generate or enter a recovery phrase only in your terminal. Never commit,
publish, or paste it into an issue. The onboarding example prints an approval
URL. Open it, approve the app, then copy the returned 64-character hexadecimal
App Key.

```sh theme={null}
cargo run -p obsidianlog-store --features sia --example onboard
```

## 3. Run the integration test

Set the indexer URL and App Key only in your shell environment:

```sh theme={null}
export OBSIDIANLOG_INDEXD_URL=https://sia.storage
export OBSIDIANLOG_APP_KEY=<your-64-hex-app-key>
cargo test -p obsidianlog-store --features sia --test sia -- --nocapture
```

The test ingests records, archives them to Sia, reads them back, and verifies
the hash chain. It may take several minutes for a first write while Sia
storage is provisioned.

Without both environment variables, this test skips cleanly so the ordinary CI
suite remains independent of a Sia account and external service.

## Hosted-account considerations

The hosted [`sia.storage`](https://sia.storage) option currently offers a
free plan, but pricing, quotas, and terms are controlled by Sia Storage and
may change. Review its current terms before using it for production archives.
