diff --git a/scripts/add-smtp-credentials.sh b/scripts/add-smtp-credentials.sh
index e4d650eb9f7a3dcfa6d94e5b051e235ec61fc9c1..e76b5bf4152c3134279bf82a58bbeff8c5f2a9b7 100755
--- a/scripts/add-smtp-credentials.sh
+++ b/scripts/add-smtp-credentials.sh
@@ -33,7 +33,11 @@ username=$(grep -E "^OPENSEARCH_ADMIN_USERNAME=" .env | cut -d '=' -f 2- || echo
 password=$(grep -E "^OPENSEARCH_ADMIN_PASSWORD=" .env | cut -d '=' -f 2- || echo "admin")
 
 # reload settings for changes to take effect
-response=$(curl -s -u "${username}:${password}" -w "\n%{http_code}" -X POST https://localhost:9200/_nodes/reload_secure_settings --cacert ./ssl/root-ca-crt.pem)
+response=$(docker compose exec os-node-1 curl -s \
+    -u "${username}:${password}" \
+    -w "\n%{http_code}" \
+    -X POST https://localhost:9200/_nodes/reload_secure_settings \
+    --cacert /usr/share/opensearch/config/root-ca.pem)
 
 # separate response message and HTTP status code
 response_message=$(echo "$response" | sed '$d')