> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/zen-firewall/zen-installation-instructions/configuration-via-environment-variables.md).

# 環境変数による設定

## トークン <a href="#token" id="token"></a>

次を使用します: `AIKIDO_TOKEN` Aikidoで生成したトークンを設定するための環境変数:

```bash
AIKIDO_TOKEN="token"
```

## ブロッキングモード <a href="#blocking-mode" id="blocking-mode"></a>

次を使用できます `AIKIDO_BLOCK` ブロッキングモードを有効にするための環境変数です。

```bash
AIKIDO_BLOCK="true"
```

> ダッシュボードでブロッキングモードと検出のみモードを切り替えることもできます。環境変数は開始時のモードとして使用されます。設定が取得されると、Zen はダッシュボードで設定されたモードに切り替わります。

## エージェントを無効化 <a href="#disable-the-agent" id="disable-the-agent"></a>

次を使用できます `AIKIDO_DISABLE` Zen を完全に無効にするための環境変数です。万が一 Zen が問題を引き起こす場合でも、コードや環境変数を削除せずに Zen を無効化できます（例: `AIKIDO_TOKEN` など）。

```bash
AIKIDO_DISABLE="true"
```

## デバッグ <a href="#debugging" id="debugging"></a>

次を使用できます `AIKIDO_DEBUG` より多くの情報を出力するための環境変数:

* 特定のパッケージがサポートされているかどうか
* トークンが検出されたかどうか
* Zen が検出のみモードで実行されているかどうか

```bash
AIKIDO_DEBUG="true"
```

## プロキシ設定 <a href="#proxy-settings" id="proxy-settings"></a>

次を使用できます `AIKIDO_TRUST_PROXY` のための環境変数 [プロキシを信頼する](/docs/docs-ja/zen-firewall/zen-installation-instructions/proxy-load-balancer-settings.md):

> デフォルトでは、trust proxy は **有効です**.

```bash
AIKIDO_TRUST_PROXY="false"
```

## インスタンス名の上書き <a href="#limit-api-discovery-samples" id="limit-api-discovery-samples"></a>

`AIKIDO_INSTANCE_NAME` ホスト名だけでは十分に分かりやすくない場合（たとえば、コンテナ化された環境や一時的な環境）に便利な、アプリケーションインスタンスのカスタム名を設定します。デフォルトはホスト名です。

```bash
AIKIDO_INSTANCE_NAME="custom-name"
```

## API探索サンプル数の制限 <a href="#limit-api-discovery-samples" id="limit-api-discovery-samples"></a>

各ルートごとに収集されるリクエストサンプル数を制限します。各サンプルには次が含まれます:

* リクエストボディの構造と型（GraphQL 以外のリクエスト）
* クエリパラメータ
* 使用された認証方法

これらのサンプルは、想定されるリクエスト形式や認証要件を含め、API の構造を分析し、ドキュメント化するのに役立ちます。

```bash
AIKIDO_MAX_API_DISCOVERY_SAMPLES="10"
```

## 最大リクエストボディサイズ（NodeJS） <a href="#maximum-request-body-size-nodejs" id="maximum-request-body-size-nodejs"></a>

受信する HTTP リクエストボディの最大サイズ（MB単位）を設定します。この制限は、非常に大きなリクエストによるメモリ枯渇からアプリケーションを保護するのに役立ちます。

```bash
AIKIDO_MAX_BODY_SIZE_MB="10" # MB
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.aikido.dev/docs/docs-ja/zen-firewall/zen-installation-instructions/configuration-via-environment-variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
