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

# Configuration

> Configure your self-hosted Zmeel instance using the interactive CLI or environment variables.

Zmeel stores all configuration in `~/.zmeel/instances/default/config.json`. Use the interactive `zmeel configure` command to update any section — you rarely need to edit the file by hand.

## Configure a section

```bash theme={null}
zmeel configure --section <section>
```

Available sections:

| Section    | What it controls                    |
| ---------- | ----------------------------------- |
| `llm`      | LLM provider and API keys           |
| `database` | Database connection                 |
| `logging`  | Log level and output                |
| `server`   | Deployment mode, port, public URL   |
| `storage`  | Storage provider (local disk or S3) |
| `secrets`  | Secrets encryption settings         |

## Local storage layout

All instance state is stored under `~/.zmeel/instances/default/` by default:

| Path                 | Contents                       |
| -------------------- | ------------------------------ |
| `config.json`        | Instance configuration         |
| `db/`                | Embedded PostgreSQL data       |
| `logs/`              | Server logs                    |
| `data/storage/`      | File attachments and artifacts |
| `secrets/master.key` | Secrets encryption key         |

## Multiple instances

Use `--data-dir` on any command to isolate state to a custom directory:

```bash theme={null}
zmeel run --data-dir ./my-instance
zmeel issue list --data-dir ./my-instance
```

This keeps the instance completely separate from `~/.zmeel`.

<Tip>
  Use `--data-dir` to run multiple independent Zmeel instances on the same machine — for example, one per client or environment.
</Tip>

## Environment variable overrides

You can override the home directory and instance ID with environment variables:

```bash theme={null}
ZMEEL_HOME=/custom/home ZMEEL_INSTANCE_ID=dev zmeel run
```

| Variable            | Default    | Description                        |
| ------------------- | ---------- | ---------------------------------- |
| `ZMEEL_HOME`        | `~/.zmeel` | Base directory for all Zmeel state |
| `ZMEEL_INSTANCE_ID` | `default`  | Instance identifier                |
