> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
