# Configure a standalone node

Start from the `config.toml` included in the matched source checkout. The downloadable [sample configuration](/smts/examples/config.toml) is the repository configuration used for these guides.

## Start with explicit paths

```sh
cargo run -p smts-server -- --config config.toml
```

`data_dir` is relative to the process working directory. Restart from the same working directory, or use an absolute data path. Keep standalone evaluation bound to loopback.

```toml
bind = "127.0.0.1:9070"
data_dir = "data"
debug_stats = true
```

## Request and concurrency limits

| Setting | Sample value | What it bounds |
| --- | --- | --- |
| `max_body_bytes` | 4,194,304 | HTTP write body |
| `max_line_bytes` | 65,536 | Encoded ILP line |
| `max_batch_points` | 10,000 | Points in one batch |
| `queue_capacity` | 64 | Queued work |
| `max_connections` | 128 | Accepted HTTP connections |
| `max_inflight_writes` | 32 | Admitted write requests |
| `max_inflight_scans` | 2 | Shared SQL/scan admission |
| `read_workers` | 2 | Reader execution threads |

Increasing concurrency multiplies request, snapshot, decoder, and operator memory. These are logical budgets, not a strict RSS cap.

## Storage and WAL

The sample WAL limit is 1 GiB with 64 MiB segments. `[storage]` allows 256 committed files and 32 GiB of Parquet data. `[catalog]` uses a 10,000-point / 8 MiB logical buffer plus bounded schema metadata.

Flush and compaction publish immutable files before reclaiming covered history. Disk usage also includes WAL, temporary output, and retired files still pinned by readers. Budget those alongside committed segments.

## Query and snapshot memory

`[query]` controls output rows/bytes, scanned rows, SQL size, operator memory, scan memory, and deadlines. `[storage.snapshots]` controls active views, captured metadata, and retained replaced files.

When a limit rejects a query, first narrow time ranges, reduce projections, and close slow readers. Increase budgets only after checking physical memory and the total concurrent workload.

## Change configuration safely

1. Save the current config and identify the active data directory.
2. Stop the node cleanly and inspect the shutdown result.
3. Change the intended settings without changing table identity policies.
4. Restart, wait for readiness, and read known data.
5. Check capacity and rejection metrics before adding load.

Lowering buffer limits below the uncheckpointed WAL suffix can prevent recovery. Standalone table policies are persisted; editing them is not a migration. Do not remove storage files to make a changed configuration start.
