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

# Overview

> How snapr finds its YAML config file, the top-level structure, and how env: references keep secrets out of the file.

snapr is configured by a single YAML file.

## File location

snapr resolves the config file in this order. The first match wins:

1. `-config <path>` CLI flag
2. `SNAPR_CONFIG_FILE` environment variable
3. `./snapr.yaml`
4. `~/.config/snapr/snapr.yaml`
5. `~/snapr.yaml`
6. `/etc/snapr/snapr.yaml`

## Top-level shape

```yaml snapr.yaml theme={null}
logs: { ... }
server: { ... }
jobs:
  - { ... }
```

| Option   | Type   | Required | Description                                                                                 |
| -------- | ------ | -------- | ------------------------------------------------------------------------------------------- |
| `logs`   | object | No       | On-disk log files and rotation. See [Logs](/configuration/logs).                            |
| `server` | object | No       | HTTP listener and web UI. Enabled by default. See [Server](/configuration/server/overview). |
| `jobs`   | array  | Yes      | At least one backup job. See [Jobs](/configuration/jobs).                                   |

## Environment references

Any string value can use the `env:` prefix to read its value from an environment variable at load time. Use this to keep secrets out of the YAML file.

```yaml snapr.yaml theme={null}
server:
  secret: env:SNAPR_JWT_SECRET

jobs:
  - name: postgres
    sources:
      - type: postgresql
        password: env:PG_PASSWORD
```

<Warning>If the referenced variable is not set, snapr fails to start.</Warning>

## Applying changes

snapr loads the config once at startup. To apply edits, restart snapr. The previous configuration stays active until the new process loads successfully — a malformed file fails the restart with the error logged.

## Where to go next

<Columns cols={2}>
  <Card title="Server" icon="server" href="/configuration/server/overview">
    HTTP listener, auth, permissions, and the web UI.
  </Card>

  <Card title="Jobs" icon="clock" href="/configuration/jobs">
    Schedules, compression, retention, and hook scripts.
  </Card>

  <Card title="Sources" icon="database" href="/configuration/sources/overview">
    What to back up: databases, files, and object storage.
  </Card>

  <Card title="Storages" icon="hard-drive" href="/configuration/storages/overview">
    Where archives go: local disk, S3, SFTP, WebDAV, and bunny.net.
  </Card>

  <Card title="Encryption" icon="lock" href="/configuration/encryption">
    Symmetric encryption of finished archives.
  </Card>

  <Card title="Splitter" icon="scissors" href="/configuration/splitter">
    Split large archives into fixed-size parts.
  </Card>

  <Card title="Notifiers" icon="bell" href="/configuration/notifiers/overview">
    Webhook, Telegram, and email notifications.
  </Card>

  <Card title="Logs" icon="list" href="/configuration/logs">
    File logging and rotation.
  </Card>

  <Card title="Full example" icon="code" href="/configuration/full-example">
    A complete annotated snapr.yaml.
  </Card>
</Columns>
