> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/jp/privileged-access-manager/getting-started/gateways/gateway-environment-variables.md).

# ゲートウェイの環境変数

## ゲートウェイのコア構成 <a href="#core-gateway-configuration" id="core-gateway-configuration"></a>

<table><thead><tr><th width="138.91015625">CLIパラメータ</th><th>環境変数</th><th>デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>-d, --debug</code></td><td><code>KEEPER_GATEWAY_LOG_LEVEL</code></td><td><code>info</code></td><td>ログレベルの設定。有効な値: <code>debug</code>、<code>info</code>、<code>warning</code>、<code>error</code>、<code>critical</code></td></tr><tr><td><code>--verbose</code></td><td><code>KEEPER_GATEWAY_VERBOSE</code></td><td></td><td>詳細ログを有効化</td></tr><tr><td><code>--log-file</code></td><td><code>KEEPER_GATEWAY_LOG_FILE</code></td><td>Generated based on timestamp</td><td>ログファイルのパスを指定</td></tr><tr><td><code>--log-folder</code></td><td><code>KEEPER_GATEWAY_LOG_FOLDER</code></td><td><code>~/.keeper/logs</code> or <code>/var/log/keeper-gateway</code> for service</td><td>ログフォルダの場所を指定</td></tr><tr><td><code>--config-file, -c</code></td><td><code>GATEWAY_CONFIG_PATH</code></td><td><code>~/.keeper/gateway-config.json</code></td><td>ゲートウェイ構成ファイルへのパス</td></tr><tr><td>N/A</td><td><code>GATEWAY_CONFIG</code></td><td>None</td><td>Base64エンコードされた構成文字列</td></tr><tr><td><code>--aws-kms-secret-name</code></td><td><code>AWS_KMS_SECRET_NAME</code></td><td>None</td><td>構成用のAWS KMSシークレット名</td></tr><tr><td>N/A</td><td><code>VERIFY_SSL</code></td><td><code>TRUE</code></td><td>SSL証明書を検証するかどうか</td></tr><tr><td>N/A</td><td><code>KRELAY_SERVER</code></td><td>Auto-detected from config</td><td>TURN/STUNリレーサーバーを上書き</td></tr><tr><td>N/A</td><td><code>INSECURE_DEBUG</code></td><td><code>False</code></td><td>ログにパスワードを表示</td></tr><tr><td><code>--show-cmds</code></td><td><code>KEEPER_GATEWAY_SHOW_CMDS</code></td><td><code>False</code></td><td>実行中のコマンドを表示</td></tr><tr><td><code>--max-workers, -w</code></td><td><code>KEEPER_GATEWAY_MAX_WORKERS</code></td><td>1 for process pool, 10 for thread pool</td><td>ワーカープロセス/スレッド数</td></tr><tr><td><code>--log-to-stdout</code></td><td><code>KEEPER_GATEWAY_LOG_TO_STDOUT</code></td><td><code>False</code></td><td>ファイルではなくstdoutにログを出力</td></tr><tr><td>N/A</td><td><code>GUACD_HOST</code></td><td><code>127.0.0.1</code></td><td>guacdサービスのホスト</td></tr><tr><td>N/A</td><td><code>GUACD_PORT</code></td><td><code>4822</code></td><td>guacdサービスのポート</td></tr><tr><td>N/A</td><td><code>GUACD_PATH</code></td><td><code>pyguacd</code> (Windows) or <code>/opt/keeper/sbin/guacd</code> (Linux)</td><td>guacd実行ファイルへのパス</td></tr><tr><td><code>--tunnel-only-use-turn</code></td><td><code>KEEPER_GATEWAY_TUNNEL_ONLY_USE_TURN</code></td><td><code>False</code></td><td>TURNリレーのみを強制使用</td></tr><tr><td>N/A</td><td><code>RECORDING_PATH</code></td><td><code>/recording_pipes</code></td><td>セッション録画のパス (セッション終了後に削除)</td></tr><tr><td>N/A</td><td><code>TYPE_SCRIPT_RECORDING_PATH</code></td><td><code>/recording_pipes</code></td><td>typescript録画のパス (セッション終了後に削除)</td></tr><tr><td>N/A</td><td><code>KEEPER_GATEWAY_CVE_SECURITY_CHECKS</code></td><td><code>false</code></td><td>初期化時にCVEセキュリティチェックを有効化</td></tr><tr><td>N/A</td><td><code>KEEPER_GATEWAY_USE_GUACR</code></td><td><code>false</code></td><td>標準ではなくGuacamole録画 (guacr) を使用</td></tr></tbody></table>

## 接続タイムアウト変数 (ゲートウェイ) <a href="#connection-timeout-variables-gateway" id="connection-timeout-variables-gateway"></a>

<table><thead><tr><th>環境変数</th><th width="119.65234375">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_SET_LOCAL_DESCRIPTION_TIMEOUT</code></td><td><code>15s</code></td><td>WebRTCでローカル記述を設定するまでの時間</td></tr><tr><td><code>KEEPER_GATEWAY_OPEN_CONNECTION_TIMEOUT</code></td><td><code>60s</code></td><td>接続確立を待機する時間</td></tr><tr><td><code>KEEPER_GATEWAY_CREATE_ANSWER_TIMEOUT</code></td><td><code>30s</code></td><td>ピアICEアンサーを作成するまでの時間</td></tr><tr><td><code>KEEPER_GATEWAY_READ_TIMEOUT</code></td><td><code>15s</code></td><td>データチャネルからデータを待機する時間</td></tr><tr><td><code>KEEPER_GATEWAY_NON_PARED_READ_TIMEOUT</code></td><td><code>5s</code></td><td>ペアリング前にデータを待機する時間</td></tr><tr><td><code>KEEPER_GATEWAY_CLOSE_CONNECTION_TIMEOUT</code></td><td><code>5s</code></td><td>接続クローズを待機する時間</td></tr><tr><td><code>KEEPER_GATEWAY_TEST_CONNECTION_TIMEOUT</code></td><td><code>5s</code></td><td>テスト接続を待機する時間</td></tr><tr><td><code>KEEPER_GATEWAY_ABRUPT_DISCONNECTION_TIMEOUT</code></td><td><code>3s</code></td><td>突然の切断を検出するまでの時間</td></tr><tr><td><code>KEEPER_GATEWAY_FORCE_CLOSE_TIMEOUT</code></td><td><code>6s</code></td><td>接続を強制クローズするまでの時間</td></tr><tr><td><code>KEEPER_GATEWAY_RUST_CLEANUP_TIMEOUT</code></td><td><code>5s</code></td><td>Rustクリーンアップ操作の時間</td></tr><tr><td><code>KEEPER_GATEWAY_ACCEPT_OFFER_TIMEOUT</code></td><td>calculated</td><td>WebRTCオファーを受け入れるまでの時間 (create_answer + set_local_description + 10)</td></tr><tr><td><code>KEEPER_GATEWAY_RECORDINGS_PATH_TIMEOUT</code></td><td><code>20s</code></td><td>録画パスを作成するまでの時間</td></tr><tr><td><code>KEEPER_GATEWAY_GUACD_RECEIVE_TIMEOUT</code></td><td><code>15s</code></td><td>Guacamoleデーモンから受信するまでの時間</td></tr><tr><td><code>KEEPER_GATEWAY_DATA_CHANNEL_TIMEOUT</code></td><td><code>5s</code></td><td>データチャネル送信の時間</td></tr><tr><td><code>KEEPER_GATEWAY_CONNECTION_ESTABLISHMENT_TIMEOUT</code></td><td><code>15s</code></td><td>接続を確立するまでの時間</td></tr><tr><td><code>KEEPER_GATEWAY_JIT_ACCOUNT_CREATION_TIMEOUT</code></td><td><code>90s</code></td><td>JIT一時ユーザーの作成時間</td></tr><tr><td><code>KEEPER_GATEWAY_RECORDINGS_PATH_EPHEMERAL_TIMEOUT</code></td><td><code>60s</code></td><td>一時録画パスのセットアップ時間</td></tr></tbody></table>

## Rust WebRTCモジュール (pam-rustwebrtc) の変数 <a href="#rust-webrtc-module-pam-rustwebrtc-variables" id="rust-webrtc-module-pam-rustwebrtc-variables"></a>

### バックエンドI/O構成 <a href="#backend-i-o-configuration" id="backend-i-o-configuration"></a>

<table><thead><tr><th width="310.59375">環境変数</th><th width="125.6484375">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_BACKEND_FLUSH_TIMEOUT_MS</code></td><td><code>50ms</code></td><td>backend flush() の完了を待機する最大時間</td></tr><tr><td><code>KEEPER_GATEWAY_MAX_FLUSH_FAILURES</code></td><td><code>5</code></td><td>接続を閉じるまでの連続フラッシュ失敗回数</td></tr><tr><td><code>KEEPER_GATEWAY_CHANNEL_SHUTDOWN_GRACE_MS</code></td><td><code>100ms</code></td><td>チューブクローズ時にシグナルチャネルが終了するまでの猶予期間</td></tr></tbody></table>

### チャネルクリーンアップのタイムアウト <a href="#channel-cleanup-timeouts" id="channel-cleanup-timeouts"></a>

<table><thead><tr><th>環境変数</th><th width="129.1171875">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_DATA_CHANNEL_CLOSE_TIMEOUT_SECS</code></td><td><code>3s</code></td><td>データチャネルクローズ操作のタイムアウト</td></tr><tr><td><code>KEEPER_GATEWAY_PEER_CONNECTION_CLOSE_TIMEOUT_SECS</code></td><td><code>5s</code></td><td>ピア接続クローズ操作のタイムアウト</td></tr><tr><td><code>KEEPER_GATEWAY_DISCONNECT_TO_EOF_DELAY_MS</code></td><td><code>100ms</code></td><td>Dropクリーンアップでの切断メッセージとEOFの間の遅延</td></tr></tbody></table>

### ICE / 接続の確立 <a href="#ice-connection-establishment" id="ice-connection-establishment"></a>

<table><thead><tr><th>環境変数</th><th width="133.4140625">デフォルト</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_ICE_GATHER_TIMEOUT_SECS</code></td><td><code>30s</code></td><td>初回接続のICE収集タイムアウト</td></tr><tr><td><code>KEEPER_GATEWAY_ICE_RESTART_ANSWER_TIMEOUT_SECS</code></td><td><code>10s</code></td><td>リモートピアからのICE再起動アンサーを待機するタイムアウト</td></tr><tr><td><code>KEEPER_GATEWAY_ICE_DISCONNECTED_WAIT_SECS</code></td><td><code>2s</code></td><td>ICE切断後、再起動をトリガーするまでの待機時間</td></tr></tbody></table>

### アクティビティの監視 <a href="#activity-monitoring" id="activity-monitoring"></a>

<table><thead><tr><th>環境変数</th><th width="139.9140625">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_ACTIVITY_TIMEOUT_SECS</code></td><td><code>120s</code></td><td>ICE再起動を検討するまでの非アクティブ時間</td></tr><tr><td><code>KEEPER_GATEWAY_STALE_TUBE_SWEEP_INTERVAL_SECS</code></td><td><code>300s</code></td><td>古いチューブスイーパーの実行間隔</td></tr></tbody></table>

### 同時実行 / スケール <a href="#concurrency-scale" id="concurrency-scale"></a>

<table><thead><tr><th>環境変数</th><th width="140.51171875">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_MAX_CONCURRENT_CREATES</code></td><td><code>100</code></td><td>許可される最大同時チューブ作成数</td></tr></tbody></table>

### ルーター / HTTPタイムアウト <a href="#router-http-timeouts" id="router-http-timeouts"></a>

<table><thead><tr><th>環境変数</th><th width="142.73828125">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_ROUTER_HTTP_TIMEOUT_SECS</code></td><td><code>5s</code></td><td>ルーターAPI呼び出しのHTTPタイムアウト</td></tr><tr><td><code>KEEPER_GATEWAY_TUBE_CREATION_TIMEOUT_SECS</code></td><td><code>15s</code></td><td>チューブ作成の合計タイムアウト</td></tr><tr><td><code>KEEPER_GATEWAY_ROUTER_CIRCUIT_BREAKER_COOLDOWN_SECS</code></td><td><code>60s</code></td><td>ルーター障害後のサーキットブレーカークールダウン</td></tr><tr><td><code>KEEPER_GATEWAY_ROUTER_CIRCUIT_BREAKER_THRESHOLD</code></td><td><code>3</code></td><td>サーキットブレーカーを開くまでの連続ルーター障害回数</td></tr></tbody></table>

### WebRTCログ <a href="#webrtc-logging" id="webrtc-logging"></a>

<table><thead><tr><th>環境変数</th><th width="137.9296875">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_INCLUDE_WEBRTC_LOGS</code></td><td><code>false</code></td><td>WebRTCライブラリログを含める (非常に詳細)。有効化するには "1" または "true" を設定</td></tr><tr><td><code>KPAM_ROUTER_HOST</code></td><td>Derived from KSM config</td><td>ルーターホスト名の上書き</td></tr></tbody></table>

## ヘルスチェック変数 <a href="#health-check-variables" id="health-check-variables"></a>

<table><thead><tr><th>環境変数</th><th width="139.55859375">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_HEALTH_CHECK_ENABLED</code></td><td><code>false</code></td><td>ヘルスチェックサーバーを有効化</td></tr><tr><td><code>KEEPER_GATEWAY_HEALTH_CHECK_HOST</code></td><td><code>127.0.0.1</code></td><td>ヘルスチェックサーバーのバインドアドレス</td></tr><tr><td><code>KEEPER_GATEWAY_HEALTH_CHECK_PORT</code></td><td><code>8099</code></td><td>ヘルスチェックサーバーのポート</td></tr><tr><td><code>KEEPER_GATEWAY_HEALTH_CHECK_USE_SSL</code></td><td><code>false</code></td><td>ヘルスチェックでSSLを有効化</td></tr><tr><td><code>KEEPER_GATEWAY_HEALTH_CHECK_SSL_CERT</code></td><td>None</td><td>SSL証明書へのパス</td></tr><tr><td><code>KEEPER_GATEWAY_SSL_KEY</code></td><td>None</td><td>SSL秘密鍵へのパス</td></tr><tr><td><code>KEEPER_GATEWAY_HEALTH_CHECK_AUTH_TOKEN</code></td><td>None</td><td>ヘルスチェックAPIの認証トークン</td></tr></tbody></table>

## リソース管理変数 <a href="#resource-management-variables" id="resource-management-variables"></a>

<table><thead><tr><th width="306.1171875">環境変数</th><th width="141.28515625">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_RESOURCE_CHECK_ENABLED</code></td><td><code>true</code></td><td>リソース枯渇を防ぐためのリソースチェックを有効化</td></tr><tr><td><code>KEEPER_GATEWAY_MIN_HEADROOM_PERCENT</code></td><td><code>15</code></td><td>維持する最小メモリヘッドルーム率</td></tr><tr><td><code>KEEPER_GATEWAY_CHECK_RBI_CAPACITY</code></td><td><code>true</code></td><td>RBIセッションが利用可能リソースに収まるかチェック</td></tr><tr><td><code>KEEPER_GATEWAY_HTTP_RAM_MB</code></td><td><code>800</code></td><td>RBI/HTTP接続のRAM要件 (MB)</td></tr><tr><td><code>KEEPER_GATEWAY_RDP_RAM_MB</code></td><td><code>75</code></td><td>RDP接続のRAM要件 (MB)</td></tr><tr><td><code>KEEPER_GATEWAY_VNC_RAM_MB</code></td><td><code>65</code></td><td>VNC接続のRAM要件 (MB)</td></tr><tr><td><code>KEEPER_GATEWAY_SSH_RAM_MB</code></td><td><code>70</code></td><td>SSH接続のRAM要件 (MB)</td></tr><tr><td><code>KEEPER_GATEWAY_MYSQL_RAM_MB</code></td><td><code>35</code></td><td>MySQL接続のRAM要件 (MB)</td></tr><tr><td><code>KEEPER_GATEWAY_POSTGRESQL_RAM_MB</code></td><td><code>35</code></td><td>PostgreSQL接続のRAM要件 (MB)</td></tr><tr><td><code>KEEPER_GATEWAY_SQLSERVER_RAM_MB</code></td><td><code>35</code></td><td>SQL Server接続のRAM要件 (MB)</td></tr><tr><td><code>KEEPER_GATEWAY_KUBERNETES_RAM_MB</code></td><td><code>70</code></td><td>Kubernetes接続のRAM要件 (MB)</td></tr><tr><td><code>KEEPER_GATEWAY_TELNET_RAM_MB</code></td><td><code>50</code></td><td>Telnet接続のRAM要件 (MB)</td></tr><tr><td><code>KEEPER_GATEWAY_TUNNEL_RAM_MB</code></td><td><code>35</code></td><td>トンネル/ポートフォワーディングのRAM要件 (MB)</td></tr></tbody></table>

## RBI (リモートブラウザ分離) 変数 <a href="#rbi-remote-browser-isolation-variables" id="rbi-remote-browser-isolation-variables"></a>

<table><thead><tr><th width="311.48828125">環境変数</th><th width="136.32421875">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_RBI_PROFILE_STORAGE_PATH</code></td><td><code>/opt/keeper/gateway/rbi-profiles</code></td><td>ブラウザセッション永続化プロファイルのディレクトリ</td></tr></tbody></table>

## AI / 脅威検出変数 <a href="#ai-threat-detection-variables" id="ai-threat-detection-variables"></a>

<table><thead><tr><th width="310.5546875">環境変数</th><th width="143.58984375">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>KEEPER_GATEWAY_AI_LLM_PROVIDER</code></td><td><code>openai-generic</code></td><td>AI LLMプロバイダー (<code>aws-bedrock</code>, <code>anthropic</code>, <code>google-ai</code>, <code>vertex-ai</code>, <code>openai</code>, <code>azure-openai</code>, <code>openai-generic</code>)</td></tr><tr><td><code>KEEPER_GATEWAY_AI_MODEL</code></td><td>None (required)</td><td>AIモデル名/識別子</td></tr><tr><td><code>KEEPER_GATEWAY_AI_API_KEY</code></td><td>None (required)</td><td>AIプロバイダーのAPIキー</td></tr><tr><td><code>KEEPER_GATEWAY_AI_BASE_URL</code></td><td>None (optional)</td><td>AIプロバイダーAPIのベースURL</td></tr><tr><td><code>KEEPER_GATEWAY_AI_API_VERSION</code></td><td>None (required for Azure)</td><td>Azure OpenAIのAPIバージョン</td></tr><tr><td><code>KEEPER_GATEWAY_AI_RISK_LEVEL_SOURCE</code></td><td>None</td><td>リスクレベル分類のソース</td></tr><tr><td><code>RISK_CLASSIFIER_MODEL_DIR</code></td><td>None</td><td>リスク分類モデルを含むディレクトリ</td></tr><tr><td><code>KEEPER_GATEWAY_SENTRY_API_KEY</code></td><td>None</td><td>Sentry脅威検出のAPIキー</td></tr><tr><td><code>KEEPER_GATEWAY_SENTRY_BASE_URL</code></td><td>None</td><td>SentryサービスのベースURL</td></tr><tr><td><code>KEEPER_GATEWAY_SENTRY_MODEL</code></td><td>None</td><td>Sentryのモデル識別子</td></tr></tbody></table>

### AWS Bedrock変数 <a href="#aws-bedrock-variables" id="aws-bedrock-variables"></a>

<table><thead><tr><th width="311.88671875">環境変数</th><th width="146.359375">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>AWS_REGION</code></td><td>None (required)</td><td>BedrockのAWSリージョン</td></tr><tr><td><code>AWS_PROFILE</code></td><td>None (optional)</td><td>認証情報用のAWSプロファイル</td></tr><tr><td><code>AWS_ACCESS_KEY_ID</code></td><td>None (optional)</td><td>AWSアクセスキー</td></tr><tr><td><code>AWS_SECRET_ACCESS_KEY</code></td><td>None (optional)</td><td>AWSシークレットアクセスキー</td></tr><tr><td><code>AWS_SESSION_TOKEN</code></td><td>None (optional)</td><td>AWSセッショントークン</td></tr></tbody></table>

### 代替APIキー (プロバイダー固有) <a href="#alternative-api-keys-provider-specific" id="alternative-api-keys-provider-specific"></a>

<table><thead><tr><th width="317.13671875">環境変数</th><th width="145.9453125">プロバイダ</th><th>目的</th></tr></thead><tbody><tr><td><code>OPENAI_API_KEY</code></td><td>OpenAI</td><td><code>KEEPER_GATEWAY_AI_API_KEY</code> の代替</td></tr><tr><td><code>ANTHROPIC_API_KEY</code></td><td>Anthropic</td><td><code>KEEPER_GATEWAY_AI_API_KEY</code> の代替</td></tr><tr><td><code>AZURE_OPENAI_API_KEY</code></td><td>Azure OpenAI</td><td><code>KEEPER_GATEWAY_AI_API_KEY</code> の代替</td></tr><tr><td><code>GOOGLE_API_KEY</code></td><td>Google AI</td><td><code>KEEPER_GATEWAY_AI_API_KEY</code> の代替</td></tr></tbody></table>

## KDNRMモジュール変数 <a href="#kdnrm-module-variables" id="kdnrm-module-variables"></a>

### ログ構成 <a href="#logging-configuration" id="logging-configuration"></a>

<table><thead><tr><th width="319.9140625">環境変数</th><th width="143.74609375">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>LOG_ENGINE</code></td><td><code>"default"</code></td><td>使用するログエンジンを指定</td></tr><tr><td><code>LOG_SHOW_STACKTRACE</code></td><td><code>FALSE</code></td><td>TRUEのとき、ログにPythonスタックトレース全体を表示</td></tr><tr><td><code>LOG_SHOW_LINE_NO</code></td><td><code>FALSE</code></td><td>TRUEのとき、ログ出力に行番号を表示</td></tr><tr><td><code>LOG_TO_FILE</code></td><td>None</td><td>ログを書き込むファイルパス</td></tr><tr><td><code>LOG_USAGE_SEC</code></td><td><code>0</code></td><td>メモリ使用量ログの間隔 (秒) (0 = 無効)</td></tr></tbody></table>

### ローカルシークレットマネージャー構成 <a href="#local-secrets-manager-configuration" id="local-secrets-manager-configuration"></a>

<table><thead><tr><th width="320.06640625">環境変数</th><th width="141.19921875">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>USE_LOCAL_SM</code></td><td><code>FALSE</code></td><td>TRUEのとき、KSMサーバーの代わりにローカルSQLiteデータベースを使用</td></tr><tr><td><code>LOCAL_KSM_DEBUG</code></td><td><code>FALSE</code></td><td>ローカルシークレットマネージャーのデバッグログを有効化</td></tr><tr><td><code>LOCAL_SM_DB_FILE</code></td><td>None</td><td>ローカルシークレット用SQLiteデータベースファイルへのパス</td></tr><tr><td><code>LOCAL_SM_DIR</code></td><td>HOME or USERPROFILE</td><td>ローカルSQLiteデータベースを保存するディレクトリ</td></tr><tr><td><code>LOCAL_KSM_FALLBACK_SM</code></td><td><code>FALSE</code></td><td>TRUEのとき、ローカルDBが失敗した場合に実際のKSMサーバーにフォールバック</td></tr><tr><td><code>KSM_CONFIG</code></td><td>None</td><td>KSM構成ファイルへのパス</td></tr></tbody></table>

### 検出およびDAG構成 <a href="#discovery-and-dag-configuration" id="discovery-and-dag-configuration"></a>

<table><thead><tr><th width="323.703125">環境変数</th><th width="141.53125">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>USE_LOCAL_DAG</code></td><td><code>FALSE</code></td><td>TRUEのとき、リモートの代わりにローカルDAG/検出データベースを使用</td></tr><tr><td><code>LOCAL_DAG_DIR</code></td><td><code>HOME</code> or <code>USERPROFILE</code></td><td>ローカルDAGデータベースの保存ディレクトリ</td></tr><tr><td><code>LOCAL_DAG_DEBUG</code></td><td><code>FALSE</code></td><td>ローカルDAGのデバッグログを有効化</td></tr><tr><td><code>DAG_DEBUG_LEVEL</code></td><td><code>0</code></td><td>検出DAGのデバッグ詳細レベル (0-5)</td></tr><tr><td><code>DAG_RENDER</code></td><td>None</td><td>TRUEのとき、検出グラフの可視化をレンダリング</td></tr><tr><td><code>DUMP_DISCOVERY_JSON</code></td><td><code>FALSE</code></td><td>TRUEのとき、検出結果をJSONファイルにエクスポート</td></tr><tr><td><code>RULE_DEBUG</code></td><td><code>FALSE</code></td><td>ルールエンジン評価のデバッグログを有効化</td></tr></tbody></table>

### ゲートウェイ構成 <a href="#gateway-configuration" id="gateway-configuration"></a>

<table><thead><tr><th width="328.4140625">環境変数</th><th width="141.890625">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>GATEWAY_USER</code></td><td><code>Gateway.GATEWAY_USER</code> constant</td><td>ゲートウェイ接続のユーザー (USER/USERNAMEにフォールバック)</td></tr><tr><td><code>KEEPER_GATEWAY_SAAS_PLUGIN_DIR</code></td><td><code>provider.saas_plugins_dir</code></td><td>カスタムSaaSプラグインのディレクトリ</td></tr><tr><td><code>KEEPER_GATEWAY_SERVICE_LOG_FINER_LEVEL</code></td><td>0</td><td>ユーザーをサービスにマッピングする際に表示するデバッグ情報の量を増やします。数値を大きくするとより多くの情報が表示されます。現在の最大値は3です。</td></tr></tbody></table>

## Keeper DAGモジュール変数 <a href="#keeper-dag-module-variables" id="keeper-dag-module-variables"></a>

### デバッグと開発 <a href="#debug-and-development" id="debug-and-development"></a>

<table><thead><tr><th width="332.28515625">環境変数</th><th width="140.2890625">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>GS_DEBUG_LEVEL</code></td><td>0</td><td>デバッグレベルを上げます。数値が大きいほどより多くのデバッグ出力が生成されます</td></tr><tr><td><code>GS_IS_DEV</code></td><td>False</td><td>開発モードフラグ。Trueのとき、エッジ追加時に頂点名を表示</td></tr><tr><td><code>GS_CONN_DEBUG</code></td><td>False</td><td>GraphSync接続レベルのデバッグログを有効化</td></tr></tbody></table>

### ルーターとサーバー接続 <a href="#router-and-server-connection" id="router-and-server-connection"></a>

<table><thead><tr><th width="337.0390625">環境変数</th><th width="143.16796875">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>ROUTER_HOST</code></td><td>Configured hostname from config</td><td>krouterのFQDNを上書き</td></tr><tr><td><code>KROUTER_URL</code></td><td>Derived from <code>ROUTER_HOST</code></td><td>krouterへの完全なURL。設定時はROUTER_HOSTを上書き</td></tr><tr><td><code>USE_SSL</code></td><td><code>TRUE</code></td><td>krouterへの接続でSSL/TLSを使用するかどうかを決定</td></tr></tbody></table>

### ローカルデータベース接続 <a href="#local-database-connection" id="local-database-connection"></a>

<table><thead><tr><th width="298.17578125">環境変数</th><th width="162.6796875">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>LOCAL_DAG_DB_FILE</code></td><td><code>'local_dag.db'</code></td><td>ローカルDAG接続のデータベースファイル名</td></tr></tbody></table>

### トランザクションとログ <a href="#transaction-and-logging" id="transaction-and-logging"></a>

<table><thead><tr><th width="297.0546875">環境変数</th><th width="219.44140625">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>GS_LOG_TRANS</code></td><td>False</td><td>ウェブサービス呼び出しのトランザクションログを有効化</td></tr><tr><td><code>GS_LOG_TRANS_DIR</code></td><td>"." (current directory)</td><td>トランザクションログファイルが作成されるディレクトリパス</td></tr></tbody></table>

## Discovery Commonモジュール変数 <a href="#discovery-common-module-variables" id="discovery-common-module-variables"></a>

<table><thead><tr><th width="307.546875">環境変数</th><th width="183.09375">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>PROCESS_GS_DEBUG_LEVEL</code></td><td>None</td><td>プロセスグラフサービスのデバッグログレベルを制御</td></tr><tr><td><code>USE_KSM</code></td><td>FALSE</td><td>TRUEのとき、ローカル接続の代わりにKSM接続を使用</td></tr><tr><td><code>GRAPH_DIR</code></td><td>HOME, then PROFILENAME, then "."</td><td>グラフ可視化ファイルがレンダリングされるディレクトリ</td></tr></tbody></table>

## サービス固有の環境変数 <a href="#service-specific-environment-variables" id="service-specific-environment-variables"></a>

### Windowsサービス <a href="#windows-service" id="windows-service"></a>

<table><thead><tr><th width="310.94140625">変数</th><th>目的</th></tr></thead><tbody><tr><td><code>ProgramData</code></td><td>各種Windowsサービスパスの決定に使用</td></tr><tr><td><code>SystemRoot</code></td><td>Windowsシステムパスに使用</td></tr><tr><td><code>COMPUTERNAME</code></td><td>Windowsホスト名に使用</td></tr></tbody></table>

### レガシータイムアウト変数 (非推奨 — KEEPER\_GATEWAY\_ プレフィックスを使用) <a href="#legacy-timeout-variables-deprecated-use-keeper_gateway_-prefix-instead" id="legacy-timeout-variables-deprecated-use-keeper_gateway_-prefix-instead"></a>

<table><thead><tr><th width="270.98046875">環境変数</th><th width="132.2421875">デフォルト値</th><th>目的</th></tr></thead><tbody><tr><td><code>SET_LOCAL_DESCRIPTION</code></td><td>15s</td><td>(非推奨) KEEPER_GATEWAY_SET_LOCAL_DESCRIPTION_TIMEOUT を使用</td></tr><tr><td><code>OPEN_CONNECTION_TIMEOUT_SEC</code></td><td>30s</td><td>(非推奨) KEEPER_GATEWAY_OPEN_CONNECTION_TIMEOUT を使用</td></tr><tr><td><code>CREATE_ANSWER_TIMEOUT_SEC</code></td><td>30s</td><td>(非推奨) KEEPER_GATEWAY_CREATE_ANSWER_TIMEOUT を使用</td></tr><tr><td><code>READ_TIMEOUT_SEC</code></td><td>5s</td><td>(非推奨) KEEPER_GATEWAY_READ_TIMEOUT を使用</td></tr><tr><td><code>NON_PARED_READ_TIMEOUT_SEC</code></td><td>5s</td><td>(非推奨) KEEPER_GATEWAY_NON_PARED_READ_TIMEOUT を使用</td></tr><tr><td><code>CLOSE_CONNECTION_TIMEOUT_SEC</code></td><td>5s</td><td>(非推奨) KEEPER_GATEWAY_CLOSE_CONNECTION_TIMEOUT を使用</td></tr><tr><td><code>TEST_CONNECTION_TIMEOUT_SEC</code></td><td>5s</td><td>(非推奨) KEEPER_GATEWAY_TEST_CONNECTION_TIMEOUT を使用</td></tr><tr><td><code>ACCEPT_OFFER_TIMEOUT_SEC</code></td><td>calculated</td><td>(非推奨) KEEPER_GATEWAY_ACCEPT_OFFER_TIMEOUT を使用</td></tr><tr><td><code>RECORDINGS_PATH_TIMEOUT_SEC</code></td><td>20s</td><td>(非推奨) KEEPER_GATEWAY_RECORDINGS_PATH_TIMEOUT を使用</td></tr></tbody></table>

<br>


---

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

```
GET https://docs.keeper.io/keeperpam/jp/privileged-access-manager/getting-started/gateways/gateway-environment-variables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
