{"id":17868047,"url":"https://github.com/sayyid5416/telegram-bot-api","last_synced_at":"2025-03-21T11:31:23.923Z","repository":{"id":166302824,"uuid":"582520829","full_name":"sayyid5416/telegram-bot-api","owner":"sayyid5416","description":"Pre-Built Docker Image for telegram-bot-api ","archived":false,"fork":false,"pushed_at":"2025-02-13T06:41:24.000Z","size":40,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T00:43:45.552Z","etag":null,"topics":["docker-hub","docker-image","telegram-bot-api"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/sayyid5416/telegram-bot-api","language":"Dockerfile","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/sayyid5416.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-27T05:03:42.000Z","updated_at":"2025-02-13T06:41:28.000Z","dependencies_parsed_at":"2023-09-24T08:41:12.215Z","dependency_job_id":"91d4d16f-e4cb-459e-b112-0a26214c2967","html_url":"https://github.com/sayyid5416/telegram-bot-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayyid5416%2Ftelegram-bot-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayyid5416%2Ftelegram-bot-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayyid5416%2Ftelegram-bot-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sayyid5416%2Ftelegram-bot-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sayyid5416","download_url":"https://codeload.github.com/sayyid5416/telegram-bot-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244790706,"owners_count":20510792,"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","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":["docker-hub","docker-image","telegram-bot-api"],"created_at":"2024-10-28T09:56:44.989Z","updated_at":"2025-03-21T11:31:23.569Z","avatar_url":"https://github.com/sayyid5416.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hub.docker.com/r/sayyid5416/telegram-bot-api\"\u003e\u003cimg src=\"https://img.shields.io/docker/v/sayyid5416/telegram-bot-api?colorA=333a44\u0026colorB=lightblue\u0026label=Version\u0026logo=docker\u0026logoColor=white\u0026sort=semver\u0026plastic\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/sayyid5416/telegram-bot-api\"\u003e\u003cimg src=\"https://img.shields.io/docker/image-size/sayyid5416/telegram-bot-api?colorA=333a44\u0026colorB=lightblue\u0026label=Size\u0026logo=docker\u0026logoColor=white\u0026sort=semver\u0026plastic\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/r/sayyid5416/telegram-bot-api\"\u003e\u003cimg src=\"https://img.shields.io/docker/pulls/sayyid5416/telegram-bot-api?colorA=333a44\u0026colorB=lightblue\u0026label=Pulls\u0026logo=docker\u0026logoColor=white\u0026sort=semver\u0026plastic\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"../../actions/workflows/deploy.yml\"\u003e\u003cimg src=\"../../actions/workflows/deploy.yml/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"../../actions/workflows/submodule-update.yml\"\u003e\u003cimg src=\"../../actions/workflows/submodule-update.yml/badge.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"../../issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/sayyid5416/telegram-bot-api?colorA=333a44\u0026colorB=red\u0026logo=github\u0026plastic\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# 🔰 [Docker-Hub Image](https://hub.docker.com/r/sayyid5416/telegram-bot-api)\n- It's a pre-built docker image of [tdlib/telegram-bot-api](https://github.com/tdlib/telegram-bot-api).\n- Different tags are also available, based on the version of [tdlib/telegram-bot-api](https://github.com/tdlib/telegram-bot-api).\n- **Auto-Update:** \n  - It updates automatically, when [tdlib/telegram-bot-api](https://github.com/tdlib/telegram-bot-api) is updated.\n  - Updates are checked everyday 12:00 PM IST (6:30 AM UTC).\n  - Add [PAT](https://github.com/settings/tokens/new) _(with repo, user and workflow permissions)_ to `WORKFLOW_PAT` [action secret](../../settings/secrets/actions), if you want to auto-deploy to [docker-hub](https://hub.docker.com) when update is fetched. _(applicable only when you fork this repository)_\n\n\u003cbr\u003e\n\n\n# 🔰 Pre-Requisites\n\n### 💠 Obtain API-ID and API-Hash\nObtain `api-id` \u0026 `api-hash` as described [here](https://core.telegram.org/api/obtaining_api_id) and specify them using `TELEGRAM_API_ID` \u0026 `TELEGRAM_API_HASH` [environment variables](#-environment-variables).\n\n\n\u003cbr\u003e\n\n\n# 🔰 Environment Variables\n  ### 💠 Required\n  - `TELEGRAM_API_ID`\n  - `TELEGRAM_API_HASH`\n\n  ### 💠 Optional\n  - `EXTRA_ARGS`: Extra [arguments](#-available-arguments) for `telegram-bot-api`. Ex: `\u003cARG1\u003e \u003cARG2\u003e \u003cARG3\u003e`.\n\n  ### 💠 Available build args\n  - `TG_VERSION`: You can set the `TG_VERSION` env using this ARG, on build time.\n\n  ### 💠 ENVs available for your container, if uses this image as your base image\n  - All above envs _(if passed)_\n  - `DEFAULT_ARGS`: Default args for running telegram-bot-api.\n  - `TELEGRAM_WORK_DIR`: _[read here](#-available-arguments)_\n  - `TELEGRAM_TEMP_DIR`: _[read here](#-available-arguments)_\n  - `MACHINE_USERNAME`: _[read here](#-available-arguments)_\n  - `MACHINE_GROUPNAME`: _[read here](#-available-arguments)_\n  - `PORT1`: _[read here](#-available-arguments)_\n  - `PORT2`: _[read here](#-available-arguments)_\n  - `TG_VERSION`: Version of telegram-bot-api and docker-image.\n\n\n\u003cbr\u003e\n\n\n# 🔰 Available Ports\n  - `8081/tcp` _(default for telegram-bot-api)_\n  - `8082/tcp`\n\n\n\u003cbr\u003e\n\n\n# 🔰 Running Telegram-Bot-API\n  ### 💠 Overview\n  - There are many ways to run it. Some are:\n    - Running using `docker run`.\n    - **Deploying** to some hosting service directly.\n    - Using it as the **base image** in your docker container.\n      - Ex: `FROM sayyid5416/telegram-bot-api:latest`\n    - Check [docker-entrypoint.sh](/docker-entrypoint.sh) to get an idea of how to run it.\n      - Ex: `telegram-bot-api \u003cDefault-Arguments\u003e \u003cExtra-Arguments\u003e`\n\n  ### 💠 Available Arguments\n  - **Default-Arguments:** Already configured in [Dockerfile](/Dockerfile) as `DEFAULT_ARGS`.\n    ```\n              Argument                 Default value                      Description\n        --api-id=\u003cvalue\u003e       Set it via ENV \"TELEGRAM_API_ID\"      For Telegram API access\n        --api-hash=\u003cvalue\u003e     Set it via ENV \"TELEGRAM_API_HASH\"    For Telegram API access\n    -p, --http-port=\u003cvalue\u003e    PORT1 (8081)                          HTTP listening port\n    -d, --dir=\u003cvalue\u003e          TELEGRAM_WORK_DIR (/file)             Server working directory\n    -t, --temp-dir=\u003cvalue\u003e     TELEGRAM_TEMP_DIR (/tmp)              Directory for storing HTTP server temporary files\n    -u, --username=\u003cvalue\u003e     MACHINE_USERNAME (telegram-bot-api)           user name to switch to\n    -g, --groupname=\u003cvalue\u003e    MACHINE_GROUPNAME (telegram-bot-api)          Effective group name to switch to\n    ```\n\n  - **Extra-Arguments:** Pass these via `EXTRA_ARGS` [environment variable](#-environment-variables).\n    ```\n              Argument                        Default value                 Description\n        --local                                   NA               Allow the Bot API server to serve local requests\n    -s, --http-stat-port=\u003cvalue\u003e                  NA               HTTP statistics port\n        --filter=\u003cvalue\u003e                          NA               \"\u003cremainder\u003e/\u003cmodulo\u003e\". Allow only bots with 'bot_user_id % modulo == remainder'\n        --max-webhook-connections=\u003cvalue\u003e         NA               Default value of the maximum webhook connections per bot\n        --http-ip-address=\u003cvalue\u003e            All IPv4 addresses    local IP address, HTTP connections to which will be accepted\n        --http-stat-ip-address=\u003cvalue\u003e       All IPv4 addresses    local IP address, HTTP statistics connections to which will be accepted\n    -l, --log=\u003cvalue\u003e                             NA               Path to the file where the log will be written\n    -v, --verbosity=\u003cvalue\u003e                       NA               Log verbosity level\n        --memory-verbosity=\u003cvalue\u003e                3                Memory log verbosity level\n        --log-max-file-size=\u003cvalue\u003e           2000000000           Maximum size of the log file in bytes before it will be auto-rotated\n    -c, --max-connections=\u003cvalue\u003e                 NA               Maximum number of open file descriptors\n        --proxy=\u003cvalue\u003e                           NA               HTTP proxy server for outgoing webhook requests in the format http://host:port\n    ```\n\n\n\u003cbr\u003e\n\n\n# 🔰 Some Useful Docs\n- [Moving a bot to a local server](https://github.com/tdlib/telegram-bot-api#moving-a-bot-to-a-local-server) or [Moving a bot from one local server to another](https://github.com/tdlib/telegram-bot-api#moving-a-bot-from-one-local-server-to-another):\n  - You must call [logOut](https://core.telegram.org/bots/api#logout) on your bot, to deregister your bot from previous server, before using this server.\n\n- [Using a Local Bot API Server](https://core.telegram.org/bots/api#using-a-local-bot-api-server) _(`--local`)_:\n  - More features will be unlocked \u0026 Limits would be removed.\n  - For [getFile](https://core.telegram.org/bots/api#getfile), files will be downloaded and path would be returned.\n  - You will need to use tools like [NGINX](https://nginx.org/en/) to download those files.\n\n- **More Info:**\n  - Your own API endpoint, Ex: `\u003chostUrl\u003e/bot\u003ctoken\u003e/getMe`.\n  - Telegram Bot API server accepts only HTTP requests, so a TLS termination proxy needs to be used to handle remote HTTPS requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayyid5416%2Ftelegram-bot-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsayyid5416%2Ftelegram-bot-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsayyid5416%2Ftelegram-bot-api/lists"}