> ## 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.

# Building From Source

> Build ObsidianLog from source, including the Sia backend.

ObsidianLog isn't published to crates.io yet, so building from source
means cloning the repository directly:

```sh theme={null}
git clone https://github.com/emmaglorypraise/ObsidianLog
cd ObsidianLog
cargo build --release
```

That builds the default, Sia-free workspace. To build the CLI with the Sia
backend too, use:

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

## Running the standalone ingest server directly

`obsidianlog-ingest` is a standalone binary you can run without the CLI.
Unlike `obsidianlog serve` (which manages the key for you), the standalone
binary never reads its encryption key from the config file. It refuses to
start until you pass one via `OBSIDIANLOG_ENCRYPTION_KEY` (a 64-character hex
string) or `OBSIDIANLOG_ENCRYPTION_KEY_FILE` (a path to a file containing
that string, the convention for a mounted Docker/Kubernetes secret):

```sh theme={null}
OBSIDIANLOG_ENCRYPTION_KEY=$(openssl rand -hex 32) ./target/release/obsidianlog-ingest
```

The `obsidianlog` CLI's `init`/`serve` manage this key for you instead. See
[obsidianlog init](/cli/init) and [obsidianlog serve](/cli/serve).

## Building with the Sia backend

The official prebuilt release binaries already ship **with** the `sia` Cargo
feature. Sia is this project's Foundation-sponsored storage path, so it's
built into `obsidianlog` by default. `init` still defaults to the local
backend unless you choose Sia. Building it yourself from source needs the
feature passed explicitly. The Sia build command above does that. Default
builds/tests stay Sia-free because the integration depends on a pre-1.0 SDK (see
[ADR-0006](https://github.com/emmaglorypraise/ObsidianLog/blob/main/docs/adr/0006-sia-integration.md)).

The command above writes the Sia-capable binary to
`target/release/obsidianlog`. Use `cargo install --path
crates/obsidianlog-cli --features sia` instead only if you specifically want
Cargo to install it into your user-wide Cargo bin directory.

Without this feature, `serve`/`query`/`verify` fail with a clear error the
moment a config points at a Sia indexer, rather than silently falling back
to the local backend. See [Storage Backends](/storage-backends/choosing-a-backend)
for what the Sia backend actually connects to.
