{"id":46274871,"url":"https://github.com/glogiotatidis/tg-relay","last_synced_at":"2026-03-04T04:07:11.751Z","repository":{"id":48492851,"uuid":"151981565","full_name":"glogiotatidis/tg-relay","owner":"glogiotatidis","description":"Telegram Message Relay","archived":false,"fork":false,"pushed_at":"2018-10-21T16:14:25.000Z","size":6,"stargazers_count":16,"open_issues_count":3,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-16T04:06:49.223Z","etag":null,"topics":["python","telegram"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glogiotatidis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-07T20:16:18.000Z","updated_at":"2024-01-24T14:19:58.000Z","dependencies_parsed_at":"2022-08-31T17:20:05.941Z","dependency_job_id":null,"html_url":"https://github.com/glogiotatidis/tg-relay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/glogiotatidis/tg-relay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glogiotatidis%2Ftg-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glogiotatidis%2Ftg-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glogiotatidis%2Ftg-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glogiotatidis%2Ftg-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glogiotatidis","download_url":"https://codeload.github.com/glogiotatidis/tg-relay/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glogiotatidis%2Ftg-relay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30071672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T03:25:38.285Z","status":"ssl_error","status_checked_at":"2026-03-04T03:25:05.086Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","telegram"],"created_at":"2026-03-04T04:07:07.356Z","updated_at":"2026-03-04T04:07:11.742Z","avatar_url":"https://github.com/glogiotatidis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Telegram Message Relay\n======================\n\nForwards messages from one chat (User, Group or Channel) to other chats.\n\nConfiguration\n-------------\n\n1.  Register a Telegram App at\n    [my.telegram.org](https://my.telegram.org/).\n2.  Set `API_ID` and `API_HASH` to `.env` file\n    or your environment.\n3.  And the most important part: Setup RELAY_MAP with the list\n    of source and destination channels.\n4.  Optionally you can setup the file for the Session storage. Full\n    paths are also accepted.\n\nWhy do I have to register an App?\n---------------------------------\n\nThis relay is **not** a Telegram bot. It acts like a normal Telegram\nuser who forwards messages. To make this work, the relay needs to be\nregistered as an Telegram client, like for example the Telegram Desktop\nApp.\n\nRegistering an App is very easy and instantaneous. Go through [Telegram\nDocs](https://core.telegram.org/api/obtaining_api_id) to get your API ID\nand Hash.\n\nSetting up RELAY_MAP\n------------------------------\n\nRELAY_MAP follows a CSV like encoding to defining multiple relays to multiple\nchannels. The format starts with the source channel which is followed a colon\nand then a comma separated list of destination channels. Multiple pairs of\nsource and destination channels can be separated with semicolons. Both source\nand destination channels must be defined using their numeric IDs. The [List\nChannels](#listchannels) command can help you build the map.\n\nExample:\n`RELAY_MAP=SOURCE_CHANNEL1:DST_CHANNEL1,DST_CHANNEL2;SOURCE_CHANNEL2:DST_CHANNEL3`\n\nList Channels \u003ca name=\"listchannels\"\u003e\u003c/a\u003e\n-------------\n\nYou can list your channels and groups by running the `listchannels.py`\napp. You can use the output to setup RELAY_MAP.\n\n`$ ./listchannels.py`\n\nDon't forward, re-send\n----------------------\n\nIf you don't want to use Telegram's forwarding functionality, e.g. so\nyou don't expose the original poster or channel to appear, set\n`FORWARD` environment variable to `False`.\n\nThis app is Docker ready\n------------------------\n\n```sh\n$ docker build -t tg-relay .\n$ docker run -e API_ID=XXXX -e API_HASH=XXXX -e SESSION_NAME=\"/data/session\" -v `pwd`/\u003cdata:/data\u003e tg-relay\n```\n\nThis app is [Dokku](http://dokku.viewdocs.io/dokku/) ready\n----------------------------------------------------------\n\n1.  Setup storages for persistent storing of sessions.\n2.  Configure environment variables\n3.  Git push to Dokku\n4.  Make sure to scale web to 0 and cmd to 1 to avoid nginx troubles.\n    `dokku ps:scale tg-relay web=0 cmd=1`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglogiotatidis%2Ftg-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglogiotatidis%2Ftg-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglogiotatidis%2Ftg-relay/lists"}