{"id":42029455,"url":"https://github.com/eriol/telegram-group2mastodon","last_synced_at":"2026-01-26T04:31:03.938Z","repository":{"id":140928311,"uuid":"597910060","full_name":"eriol/telegram-group2mastodon","owner":"eriol","description":"Telegram bot to post messages from a Telegram group to Mastodon.","archived":false,"fork":false,"pushed_at":"2023-05-08T11:00:05.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-26T05:47:55.587Z","etag":null,"topics":["bot","mastodon","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eriol.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-06T01:02:45.000Z","updated_at":"2024-03-23T08:49:00.000Z","dependencies_parsed_at":"2023-09-29T10:52:37.034Z","dependency_job_id":null,"html_url":"https://github.com/eriol/telegram-group2mastodon","commit_stats":{"total_commits":71,"total_committers":1,"mean_commits":71.0,"dds":0.0,"last_synced_commit":"c119454488724f73d40d90f44909679243c1c132"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/eriol/telegram-group2mastodon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriol%2Ftelegram-group2mastodon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriol%2Ftelegram-group2mastodon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriol%2Ftelegram-group2mastodon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriol%2Ftelegram-group2mastodon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eriol","download_url":"https://codeload.github.com/eriol/telegram-group2mastodon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eriol%2Ftelegram-group2mastodon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28001442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bot","mastodon","telegram","telegram-bot"],"created_at":"2026-01-26T04:31:03.246Z","updated_at":"2026-01-26T04:31:03.933Z","avatar_url":"https://github.com/eriol.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# telegram-group2mastodon\n\ntelegram-group2mastodon is a Telegram bot to post messages from a Telegram\ngroup to Mastodon. It's written in Go and it is relased under the AGPL3+.\nSince the bot must be able to read all the messages you should use it only on\npublic groups.\n\n## Installation\n\n1. Build the bot (for example if version is v0.1.0 and you are on a unix system):\n   ```\n   cd /tmp; GOPATH=/tmp/go go install noa.mornie.org/eriol/telegram-group2mastodon@v0.1.0\n   ```\n   You will find the binary at `/tmp/go/bin/telegram-group2mastodon`. You don't\n   need to set `GOPATH` if you already have it set and you are fine having the\n   bot installed there.\n\n2. Create your bot using Telegram @BotFather.\n\n3. The bot uses environment variables as configuration, you have to export\n   the following (except variables with a default) before starting it:\n   | Variable                       | Meaning                      | Default  |\n   |--------------------------------|------------------------------|----------|\n   | `MASTODON_ACCESS_TOKEN`        | Mastodon access token        | *N/A*    |\n   | `MASTODON_SERVER_ADDRESS`      | Mastodon server address      | *N/A*    |\n   | `MASTODON_TOOT_FOOTER   `      | Footer of each toot          | \"\"       |\n   | `MASTODON_TOOT_MAX_CHARACTERS` | Toot max lenght              | 500      |\n   | `MASTODON_TOOT_VISIBILITY`     | Default toot visibility      | unlisted |\n   | `TELEGRAM_BOT_TOKEN`           | Telegram bot token           | *N/A*    |\n   | `TELEGRAM_CHAT_ID`             | Telegram alolowed chat id    | *N/A*    |\n   | `TELEGRAM_DEBUG`               | Debug messages from Telegram | False    |\n\n   `MASTODON_TOOT_VISIBILITY` allowed values are: `direct`, `private`, `public`\n   and `unlisted`.\n   `MASTODON_TOOT_FOOTER` default is an empty string that disable the footer\n   feature, no character are automatically added so you may want to add a space\n   before your footer (or a new line).\n   To get `MASTODON_ACCESS_TOKEN` see next point.\n4. To get `MASTODON_ACCESS_TOKEN` use the subcommand `authenticate`:\n   ```\n   telegram-group2mastodon authenticate \u003chttps://your.instance\u003e\n   ```\n   and follow the istructions.\n\n5. Ensure that the telegram bot can access all the messages disabling privacy\n   mode: https://core.telegram.org/bots/features#privacy-mode\n\n6. Launch the bot:\n   ```\n   telegram-group2mastodon run\n   ```\n\n## Deploy using Docker/Podman\n\nImages are automatically built after each push on quay.io, here the list of\navailable tags: https://quay.io/repository/eriol/telegram-group2mastodon?tab=tags\n\n### docker\n\n*Suppose you want to use the latest tag.*\n\n```\ndocker run \\\n    --env MASTODON_ACCESS_TOKEN=$MASTODON_ACCESS_TOKEN \\\n    --env MASTODON_SERVER_ADDRESS=$MASTODON_SERVER_ADDRESS \\\n    --env TELEGRAM_BOT_TOKEN=$TELEGRAM_BOT_TOKEN \\\n    --env TELEGRAM_CHAT_ID=$TELEGRAM_CHAT_ID \\\n    quay.io/eriol/telegram-group2mastodon:latest\n```\n\n### podman\n\n*Suppose you want to use the latest tag.*\n\n```\npodman run \\\n    --env MASTODON_ACCESS_TOKEN=$MASTODON_ACCESS_TOKEN \\\n    --env MASTODON_SERVER_ADDRESS=$MASTODON_SERVER_ADDRESS \\\n    --env TELEGRAM_BOT_TOKEN=$TELEGRAM_BOT_TOKEN \\\n    --env TELEGRAM_CHAT_ID=$TELEGRAM_CHAT_ID \\\n    quay.io/eriol/telegram-group2mastodon:latest\n```\n\n### docker-compose\n\n```\n---\nversion: \"3.9\"\n\nservices:\n  bot:\n    image: quay.io/eriol/telegram-group2mastodon:latest\n    environment:\n      - MASTODON_ACCESS_TOKEN=${MASTODON_ACCESS_TOKEN}\n      - MASTODON_SERVER_ADDRESS=${MASTODON_SERVER_ADDRESS}\n      - TELEGRAM_BOT_TOKEN=${TELEGRAM_BOT_TOKEN}\n      - TELEGRAM_CHAT_ID=${TELEGRAM_CHAT_ID}\n```\n\n## Deploy on metal\n\nYou have to build the bot and use a init system of your choice to handle it.\n\n### systemd\n\nSuppose you put the bot in `/srv/tg2m/telegram-group2mastodon` an example unit\nfile using an user `tg2mbot` could be:\n```\n[Unit]\nDescription=a Telegram bot to post messages from a Telegram group to Mastodon\nAfter=network-online.target\nWants=network-online.target\n\n[Service]\nExecStart=/srv/tg2m/telegram-group2mastodon run\nUser=tg2mbot\nGroup=tg2mbot\nRestart=on-failure\nEnvironment=MASTODON_ACCESS_TOKEN=\u003cMASTODON_ACCESS_TOKEN\u003e\nEnvironment=MASTODON_SERVER_ADDRESS=\u003cMASTODON_SERVER_ADDRESS\u003e\nEnvironment=TELEGRAM_BOT_TOKEN=\u003cTELEGRAM_BOT_TOKEN\u003e\nEnvironment=TELEGRAM_CHAT_ID=\u003cTELEGRAM_CHAT_ID\u003e\n\n[Install]\nWantedBy=multi-user.target\n```\n\nwhere you have to put the real values for `\u003cMASTODON_ACCESS_TOKEN\u003e`,\n`\u003cMASTODON_SERVER_ADDRESS\u003e`, `\u003cTELEGRAM_BOT_TOKEN\u003e` and `\u003cTELEGRAM_CHAT_ID\u003e`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feriol%2Ftelegram-group2mastodon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feriol%2Ftelegram-group2mastodon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feriol%2Ftelegram-group2mastodon/lists"}