diff --git a/run-community-server.sh b/run-community-server.sh
index e832c9c..fa36c2e 100644
--- a/run-community-server.sh
+++ b/run-community-server.sh
@@ -497,6 +497,10 @@ if [ ${REDIS_SERVER_HOST} ]; then
sed 's///' -i ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config
sed -E 's///' -i ${APP_SERVICES_DIR}/TeamLabSvc/TeamLabSvc.exe.config
+ sed -e "s/\"Host\": \"[^\"]*\"/\"Host\": \"${REDIS_SERVER_HOST}\"/" -e "s/\"Port\": \"[^\"]*\"/\"Port\": \"${REDIS_SERVER_CACHEPORT}\"/" -e "s/\"Ssl\": [^,]*,/\"Ssl\": ${REDIS_SERVER_SSL},/" -e "s/\"Database\": [^,]*,/\"Database\": ${REDIS_SERVER_DATABASE},/" -e "s/\"ConnectTimeout\": [^,]*,/\"ConnectTimeout\": ${REDIS_SERVER_CONNECT_TIMEOUT},/" -e "s/\"SyncTimeout\": [^,]*,/\"SyncTimeout\": ${REDIS_SERVER_SYNC_TIMEOUT},/" -i ${APP_CONFIG_DIR}/mail.json
+
+ [ -n "$REDIS_SERVER_PASSWORD" ] && sed "/\"Port\": \"${REDIS_SERVER_CACHEPORT}\"/a \ \"Password\": \"${REDIS_SERVER_PASSWORD}\"," -i "${APP_CONFIG_DIR}/mail.json"
+
APP_SERVICES_SOCKET_IO_PATH=${APP_SERVICES_DIR}/ASC.Socket.IO/config/config.json;
jq '.redis |= . + {"host":"'${REDIS_SERVER_HOST}'","port":'${REDIS_SERVER_CACHEPORT}',"db":'${REDIS_SERVER_DATABASE}',"pass":"'${REDIS_SERVER_PASSWORD}'"}'\