From d5eb57a23b8d4f157f68848e56dcd76e21249883 Mon Sep 17 00:00:00 2001 From: Wyatt Walter Date: Wed, 18 Mar 2026 16:04:40 -0500 Subject: [PATCH] chore: set password on embedded Redis instance Generate a random password for the embedded Redis when running locally, following the same pattern used for MongoDB, Postgres, and Supervisor credentials. Existing installs are backfilled on next startup. The Redis server config is written to a file rather than passed via CLI args to keep the password out of the process list. Co-Authored-By: Claude Opus 4.6 (1M context) --- deploy/docker/fs/opt/appsmith/entrypoint.sh | 33 ++++++++++++++++++- .../fs/opt/appsmith/templates/docker.env.sh | 4 ++- .../appsmith/templates/supervisord/redis.conf | 2 +- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/deploy/docker/fs/opt/appsmith/entrypoint.sh b/deploy/docker/fs/opt/appsmith/entrypoint.sh index ed569fd28212..00f1920f5e2a 100644 --- a/deploy/docker/fs/opt/appsmith/entrypoint.sh +++ b/deploy/docker/fs/opt/appsmith/entrypoint.sh @@ -102,8 +102,29 @@ init_env_file() { tr -dc A-Za-z0-9 "$ENV_PATH" + bash "$TEMPLATES_PATH/docker.env.sh" "$default_appsmith_mongodb_user" "$generated_appsmith_mongodb_password" "$generated_appsmith_encryption_password" "$generated_appsmith_encription_salt" "$generated_appsmith_supervisor_password" "$generated_appsmith_redis_password" > "$ENV_PATH" + else + tlog "Configuration file already exists" + # Backfill APPSMITH_REDIS_PASSWORD for existing installs that don't have it yet. + # Only inject auth into the Redis URL when it points to the embedded (localhost) Redis. + if ! grep -q "APPSMITH_REDIS_PASSWORD" "$ENV_PATH"; then + local generated_appsmith_redis_password=$( + tr -dc A-Za-z0-9