> ## 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 the Sia Backend

> Connect ObsidianLog to the real Sia network and archive, query, and verify against it.

This walks through connecting ObsidianLog to Sia for real, using the
hosted Sia Storage indexer at [sia.storage](https://sia.storage). You don't
need to run Sia infrastructure yourself, but you will approve ObsidianLog
through a Sia Storage account during setup.

Takes about ten minutes, most of it waiting on a one-time Sia write.

## 1. Get the binary

Download and extract the release binary for your system, following
[Installing a release binary](/get-started/quickstart#installing-a-release-binary)
in the Quickstart (or the [FAQ](/get-started/faq) if you're not sure which
file to grab). The `sia` backend is already built into the official
release binary, so there's nothing extra to install or compile.

The rest of this tutorial writes commands as `./obsidianlog` (macOS/Linux).
On Windows, that's `.\obsidianlog.exe` instead.

## 2. Run init and choose Sia

```sh theme={null}
./obsidianlog init --config sia-test/config.toml
```

Using a separate `--config` path like this keeps this test's configuration
and local data separate from anything you set up in the local backend
tutorial. The credential bundle is shared by your OS user, though: if you
already ran `init`, ObsidianLog safely reuses the existing encryption key and
adds the Sia app key to that bundle. For a genuinely clean keychain-prompt
test, use a separate OS user or test keychain, not merely a different config
path.

Answer the prompts, and when asked for a storage backend, choose **sia**.
You'll then be asked for an indexd URL (press Enter to accept the
default, `sia.storage`) and a recovery phrase. Type `seed` to generate a
brand new one:

```text theme={null}
Your new recovery phrase — this is your master key, save it securely, it
is never stored by obsidianlog:

    <a newly generated recovery phrase appears here>
```

Save the newly generated phrase somewhere safe. It's the master key for your
Sia account, and ObsidianLog never stores it for you. Never use a recovery
phrase shown in documentation or shared by someone else.

## 3. Approve the connection in your browser

```text theme={null}
Open this URL and approve the app in your Sia account:

    https://sia.storage/auth/connect/...

Waiting for approval (this blocks until you approve)...
```

Open that URL and approve. `init` blocks until you do.

Once approved, `init` finishes the remaining prompts (bind address,
chunk window) and writes your config. On macOS, this whole flow should
cost **at most one** keychain prompt, separate from the browser approval
step. Please note how many you actually saw.

## 4. Start the server and send a log

```sh theme={null}
./obsidianlog serve --config sia-test/config.toml
```

Leave that terminal running. Open a second terminal in the same extracted
release folder, then send the test log:

```sh theme={null}
curl -s -X POST http://localhost:7080/ingest \
  -H 'content-type: application/json' \
  -d '[{"timestamp":"2026-09-18T10:00:00Z","service":"tutorial","level":"info","msg":"hello from Sia"}]'
```

<Note>
  The **first** write to a brand new Sia account can take several minutes,
  not seconds. It's forming a real storage contract behind the scenes, and
  a plain `curl` gives you no progress indicator while that happens. If it
  seems to hang, that's expected. Just let it run. Subsequent writes are
  much faster.
</Note>

## 5. Query and verify

```sh theme={null}
./obsidianlog query --config sia-test/config.toml --service tutorial --format human
./obsidianlog verify --config sia-test/config.toml
```

`query` decrypts and prints the log line back, and `verify` walks the hash
chain and confirms nothing archived has been tampered with, exactly like a
local backend install. The difference here is that this data actually
lives on the Sia network now, encrypted under a key only you hold.

## Tell us how it went

Please open a
[feedback report](https://github.com/emmaglorypraise/ObsidianLog/issues/new?template=feedback.yml)
either way. If you noticed roughly how long `init` took, or how long the
first write took before `curl` returned, those numbers help a lot. There's
a spot for them in the form.

## What's next

Try [Testing as a Returning User](/tutorials/returning-user) to see how
ObsidianLog behaves when you re-run `init` later, instead of only on a
fresh install, or [Testing with Vector](/tutorials/vector-integration) to
see a real log shipper feed it instead of a single `curl` request.

Once you're done testing and want a real, ongoing setup rather than a
scratch folder, see the [Quickstart](/get-started/quickstart).

When you finish the tutorial, return to the terminal running `serve` and
press `Ctrl-C` to stop it.
