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

# Configuration Reference

> Complete guide to all ServFlow configuration options and environment variables

ServFlow Pro is configured using a TOML file. This reference covers all available configuration options for running ServFlow in development and production environments.

<Tip>
  All configuration values can be overridden using environment variables, making it easy to manage settings across different environments.
</Tip>

## Server Configuration

The `[server]` section configures the main API server that handles incoming requests to your workflows.

```toml theme={null}
[server]
port = "8080"
config_folder = "./configs"
engine_config_file = "./integrations.yaml"
env = "production"
```

| Field                | Environment Variable                 | Default      | Description                                                |
| -------------------- | ------------------------------------ | ------------ | ---------------------------------------------------------- |
| `port`               | `SERVFLOW_SERVER_PORT`               | `8080`       | Port for the API server                                    |
| `config_folder`      | `SERVFLOW_SERVER_CONFIG_FOLDER`      | —            | **Required.** Directory containing API configuration files |
| `engine_config_file` | `SERVFLOW_SERVER_ENGINE_CONFIG_FILE` | —            | Path to engine integrations YAML file                      |
| `env`                | `SERVFLOW_SERVER_ENV`                | `production` | Environment mode (`production` or `development`)           |

<Note>
  The `config_folder` is the only required configuration. ServFlow will use sensible defaults for all other settings.
</Note>

## Dashboard Configuration

The `[dashboard]` section configures the web dashboard interface for building and managing APIs visually.

```toml theme={null}
[dashboard]
port = "3000"
configs_folder = "./configs"
master_key = "your-secure-master-key"
```

| Field            | Environment Variable                | Default                        | Description                                                         |
| ---------------- | ----------------------------------- | ------------------------------ | ------------------------------------------------------------------- |
| `port`           | `SERVFLOW_DASHBOARD_PORT`           | `3000`                         | Port for the dashboard server                                       |
| `configs_folder` | `SERVFLOW_DASHBOARD_CONFIGS_FOLDER` | Same as `server.config_folder` | Directory for dashboard config storage                              |
| `master_key`     | `SERVFLOW_DASHBOARD_MASTER_KEY`     | —                              | Master encryption key for secrets (required for secrets management) |

<Warning>
  Keep your `master_key` secure and never commit it to version control. Use environment variables in production.
</Warning>

## SQLite Configuration

The `[sqlite]` section configures persistent storage for secrets, OAuth tokens, and metrics.

```toml theme={null}
[sqlite]
path = "./data/servflow.db"
```

| Field  | Environment Variable   | Default         | Description                  |
| ------ | ---------------------- | --------------- | ---------------------------- |
| `path` | `SERVFLOW_SQLITE_PATH` | `./database.db` | Path to SQLite database file |

<Note>
  If the `path` is empty or the `[sqlite]` section is omitted, ServFlow falls back to file-based storage with reduced functionality. See [Secrets Management](/references/secrets) for details on what features require SQLite.
</Note>

## Tracing Configuration

The `[tracing]` section configures OpenTelemetry distributed tracing for debugging and monitoring your API workflows.

```toml theme={null}
[tracing]
enabled = false
service_name = "servflow-pro"
org_id = ""
collector_endpoint = ""
```

| Field                | Environment Variable                  | Default | Description                                 |
| -------------------- | ------------------------------------- | ------- | ------------------------------------------- |
| `enabled`            | `SERVFLOW_TRACING_ENABLED`            | `false` | Enable OpenTelemetry tracing                |
| `service_name`       | `SERVFLOW_TRACING_SERVICE_NAME`       | —       | Service name for trace identification       |
| `org_id`             | `SERVFLOW_TRACING_ORG_ID`             | —       | Organization ID for multi-tenant collectors |
| `collector_endpoint` | `SERVFLOW_TRACING_COLLECTOR_ENDPOINT` | —       | OTLP collector endpoint URL                 |

<Tip>
  For local development, you can use Jaeger as a tracing collector. See the [Local Environment Setup](/development) guide for instructions.
</Tip>

## Complete Example

Here's a complete configuration file with all available options:

```toml theme={null}
[server]
port = "8080"
config_folder = "./configs"
engine_config_file = "./integrations.yaml"
env = "production"

[dashboard]
port = "3000"
configs_folder = "./configs"
master_key = "your-secure-master-key"

[sqlite]
path = "./data/servflow.db"

[tracing]
enabled = false
service_name = "servflow-pro"
org_id = ""
collector_endpoint = ""
```

## Environment Variable Overrides

Environment variables take precedence over values in the TOML file. This is useful for:

* **Production deployments** — Keep secrets out of configuration files
* **Container environments** — Configure via Docker/Kubernetes environment variables
* **CI/CD pipelines** — Override settings per environment

Example using environment variables with Docker:

```bash theme={null}
docker run -d \
  --name servflow-pro \
  -e SERVFLOW_SERVER_PORT=9000 \
  -e SERVFLOW_DASHBOARD_MASTER_KEY=my-secret-key \
  -e SERVFLOW_SQLITE_PATH=/data/servflow.db \
  -v $(pwd)/config.toml:/app/config.toml \
  servflow/servflow-pro start --config /app/config.toml --dashboard
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Local Environment Setup" icon="laptop-code" href="/development">
    Set up ServFlow Pro for local development with detailed configuration examples.
  </Card>

  <Card title="Secrets Management" icon="key" href="/references/secrets">
    Learn how to securely manage API keys and credentials.
  </Card>

  <Card title="Installation" icon="download" href="/installation">
    Deploy ServFlow Pro to your infrastructure.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Build your first API with ServFlow.
  </Card>
</CardGroup>
