Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(env): describe the lockout and recovery for API_KEY_PEPPER

Yudhi Armyndharisc94366ea8c2a
diff --git a/.env.example b/.env.example
index 7865dd43f..3814c969b 100644
--- a/.env.example
+++ b/.env.example
@@ -902,8 +902,10 @@ PLUGINS_DIR=./data/plugins # Plugin directory (default: ./data/plugins)
# BOOTSTRAP_KEY_FILE=./data/.api-key
# Optional server-side pepper for API-key hashing (HMAC-SHA256 instead of plain SHA-256).
-# Recommended in production. Note: setting or changing it invalidates all existing key hashes,
-# so re-issue keys after enabling. Leave unset to keep the current (unpeppered) behaviour.
+# Recommended in production; set it before the first boot. Setting or changing it on an install
+# with keys locks out every key, admin included: recover by restoring the previous pepper, or by
+# clearing api_keys in the main database and restarting so a new admin key is seeded.
+# Leave unset to keep the current (unpeppered) behaviour.
# API_KEY_PEPPER=
# Browsers auto-upgrade http:// to https:// for the dashboard (CSP upgrade-insecure-requests).