Repository navigation
How do I rotate a leaked bot token, webhook secret or cron secret? #568
Answered
by
lumenpearson
lumenpearson
asked this question in
Q&A
|
One of my deployment's secrets ended up somewhere public. What do I change, and in what order? What stops working while I do it? |
Answered by
lumenpearson
Oct 17, 2026
Replies: 1 comment
|
For each secret: generate a value, set it in the server's settings, then update other copies. Where settings live:
By secret:
Run More: docs/deploy.md, Secrets. |
0 replies
Answer selected by
lumenpearson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
server/app/config.pylists the secrets;SENTRY_DSN,GITHUB_READ_TOKENcame with #359,host.envis for the host target (beta).For each secret: generate a value, set it in the server's settings, then update other copies.
Where settings live:
.envbesidedocker-compose.yml, then rundocker compose up -d.host.env, then restart it.By secret:
BOT_TOKEN: in @Botfather,/revokeissues a new token, stopping the old; set it; webhooks re-register (setWebhook, see Registering the webhook), then checkgetWebhookInfo.WEBHOOK_SECRET: generate one withpython3 -c "import secrets; print(secrets.tok…