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

> The server block configures the HTTP listener: JSON API, bundled web UI, authentication, permissions, and log limits.

The top-level `server:` block controls the HTTP listener — the JSON API, the bundled web UI, authentication, permissions, and runtime limits.

## Options

| Option            | Type         | Required | Default        | Description                                                                                      |
| ----------------- | ------------ | -------- | -------------- | ------------------------------------------------------------------------------------------------ |
| `enabled`         | bool         | No       | `true`         | Turn the HTTP listener off to run snapr as a scheduler-only daemon.                              |
| `address`         | string       | No       | `0.0.0.0:8080` | Listen address (`host:port`).                                                                    |
| `secret`          | string       | No       | —              | JWT signing secret. Use `env:` in production.                                                    |
| `defaultLanguage` | `en` \| `ru` | No       | `en`           | Default UI language.                                                                             |
| `auth`            | object       | No       | —              | Login flow for the UI and API. See [Authentication](/configuration/server/auth).                 |
| `logLimits`       | object       | No       | —              | Initial tail size for the log viewers. See [Log limits](/configuration/server/log-limits).       |
| `permissions`     | object       | No       | —              | What authenticated users can do in the UI. See [Permissions](/configuration/server/permissions). |
| `ui`              | object       | No       | —              | Toggle the bundled web UI. See [UI](/configuration/server/ui).                                   |

<Warning>
  Setting `server.enabled: false` together with `server.ui.enabled: true` is rejected at startup — the UI cannot be
  served without a listener.
</Warning>

## Sub-pages

<Columns cols={2}>
  <Card title="Authentication" icon="lock" href="/configuration/server/auth">
    JWT-based login for the web UI and API endpoints.
  </Card>

  <Card title="Permissions" icon="user-check" href="/configuration/server/permissions">
    Control downloads, manual runs, and config visibility in the UI.
  </Card>

  <Card title="UI" icon="window" href="/configuration/server/ui">
    Serve or disable the bundled web UI for API-only mode.
  </Card>

  <Card title="Log limits" icon="scroll" href="/configuration/server/log-limits">
    Size the initial tail the log viewers request from the API.
  </Card>
</Columns>

## Scheduler-only mode

Set `server.enabled: false` to drop the HTTP listener entirely. Jobs still run on their cron schedules and write logs to the host. This is useful for:

* Minimal sidecars in a controlled environment.
* Machines where the listener would be unreachable anyway.
* Locking out manual runs and downloads at the binary level.

```yaml snapr.yaml theme={null}
server:
  enabled: false

jobs:
  - name: nightly
    schedule: '0 2 * * *'
    # ...
```

## Example

```yaml snapr.yaml theme={null}
server:
  enabled: true
  address: '0.0.0.0:8080'
  secret: env:SNAPR_JWT_SECRET
  defaultLanguage: en
  auth:
    enabled: true
    username: admin
    password: env:SNAPR_ADMIN_PASSWORD
    tokenExpiration: 60
  permissions:
    allowBackupDownload: true
    allowManualRun: true
    showConfig: true
  ui:
    enabled: true
```
