You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+67Lines changed: 67 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -297,6 +297,73 @@ Notes for this compose stack:
297
297
- Telegram indexer: `TELEGRAM_API_ID`, `TELEGRAM_API_HASH`, `TELEGRAM_CHANNELS`, and either `TELEGRAM_SESSION_DATA` or persistent storage for `TELEGRAM_SESSION_FILE`
298
298
- NEAR indexer: optional `FASTNEAR_API_KEY`, or set `APP_NEAR__PROVIDER=lake` if you do not want FastNEAR
299
299
300
+
### Telegram session bootstrap and rotation
301
+
302
+
`telegram-indexer` only performs phone/code/password login when
303
+
`TELEGRAM_ALLOW_INTERACTIVE_LOGIN=true` and stdin is a real TTY. Otherwise it
304
+
expects an already authorized session from `TELEGRAM_SESSION_FILE` or
305
+
`TELEGRAM_SESSION_DATA`. `TELEGRAM_SESSION_DATA` can be either a base64-encoded
306
+
SQLite session file or a legacy Grammers session payload; the service imports
307
+
legacy payloads into the SQLite format on startup.
308
+
309
+
1. For a deployment with durable storage, run the indexer once interactively
310
+
against the same database and the same session path you will use in
Set the resulting single-line value as `TELEGRAM_SESSION_DATA` in the platform
354
+
secret store, keep `TELEGRAM_SESSION_FILE` pointed at a writable path inside the
355
+
container, and redeploy. On startup the service will materialize the SQLite
356
+
session file from the secret before connecting.
357
+
358
+
3. To refresh or replace a session, stop the worker, repeat the same
359
+
interactive bootstrap flow against the existing session path, then restart
360
+
the worker. For secret-based deployments, re-encode the updated
361
+
`telegram_session.bin`, replace `TELEGRAM_SESSION_DATA`, and redeploy.
362
+
363
+
If the worker starts without a valid authorized session, it retries
364
+
authentication every 60 seconds for up to 60 attempts and logs that it is
365
+
waiting so a session file or `TELEGRAM_SESSION_DATA` can be uploaded.
366
+
300
367
### Operational notes
301
368
302
369
- The API `/health` endpoint is useful for liveness, but it still returns HTTP 200 with a `degraded` payload when the database is unavailable. Treat it as a basic health signal, not your only database readiness gate.
0 commit comments