I’ve been running an app on Streamlit Community Cloud for several months without issues, and suddenly all of the secrets configured in the app settings seem to have disappeared. I did not intentionally remove them, so I’m trying to understand what could have caused this.
Has anyone experienced something similar before?
I’d especially like to know:
what are reasonable explanations for secrets suddenly disappearing,
whether this can happen because of a platform-side issue, app duplication, account/project changes, or user error,
and whether there is any way to recover or restore previously saved secrets.
At this point I’m mainly trying to understand the most likely cause, so I can prevent it from happening again in the future.
Hey there, thanks for reaching out to the Streamlit community! Sorry to hear about your secrets vanishing—let’s see what might be going on.
It seems likely that secrets disappearing from Streamlit Community Cloud could be due to a few reasons: accidental deletion or overwrite in the app settings, changes to the app’s GitHub coordinates (repo, branch, or entrypoint), deleting and redeploying the app, or possibly a platform-side issue (though this is rare). Duplicating an app or moving it to a new repo/workspace can also result in secrets not being carried over, since secrets are tied to the specific app instance, not the codebase. Unfortunately, there’s no built-in way to recover deleted secrets—they aren’t versioned or backed up by Streamlit once removed. To prevent this, always keep a secure local backup of your secrets.toml and avoid unnecessary app deletions or coordinate changes. For more, see the official docs on secrets management and app settings.
If you’d like to debug further, please share a minimum reproducible example or repo link, and let us know if you recently changed your repo, branch, or app settings. Community members—feel free to jump in if you’ve seen this before or have recovery tips!