# Govd | A Telegram Bot For Downloading Media From Various Platforms ⭐

**URL:** <https://onehack.st/t/govd-a-telegram-bot-for-downloading-media-from-various-platforms/304231>\
**Category:** Tools & Scripts\
**Tags:** tools, freebies, video-editing, downloaders\
**Created:** [April 26, 2025, 7:53pm UTC](https://onehack.st/t/govd-a-telegram-bot-for-downloading-media-from-various-platforms/304231 "2025-04-26T19:53:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aina](https://onehack.st/user_avatar/onehack.st/aina/32/167469_2.png) [@Aina](https://onehack.st/u/Aina)\
**Post date:** [April 26, 2025, 7:53pm UTC](https://onehack.st/t/govd-a-telegram-bot-for-downloading-media-from-various-platforms/304231/1 "2025-04-26T19:53:41Z")

</div>

![image](https://onehack.st/uploads/default/original/3X/9/a/9a4576b694dd40b0236a945d9070fd7ffd1cb262.jpeg)

# Govd

a telegram bot for downloading media from various platforms.

this project draws significant inspiration from [yt-dlp](https://github.com/yt-dlp/yt-dlp).

- official instance: [@govd\_bot](https://t.me/govd_bot)
- support group: [govdsupport](https://t.me/govdsupport)

* * *

- [dependencies](https://github.com/govdbot/govd#dependencies)
- [installation](https://github.com/govdbot/govd#installation)
  - [build](https://github.com/govdbot/govd#build)
  - [docker](https://github.com/govdbot/govd#docker-recommended)

- [configuration](https://github.com/govdbot/govd#configuration)
- [authentication](https://github.com/govdbot/govd#authentication)
- [proxying](https://github.com/govdbot/govd#proxying)
- [todo](https://github.com/govdbot/govd#todo)

# dependencies

- ffmpeg \>= 7.x
  - with shared libraries

- libheif \>= 1.19.7
- pkg-config
- sql database
  - mysql or mariadb

# installation

## build

Note

there’s no official support for windows yet. if you want to run the bot on it, please follow [docker installation](https://github.com/govdbot/govd#docker-recommended).

1. clone the repository:

git clone [https://github.com/govdbot/govd.git](https://github.com/govdbot/govd.git) && cd govd

1. edit the `.env` file to set the database properties.  
for enhanced security, it is recommended to change the `DB_PASSWORD` property in the `.env` file.
2. make sure your database is up and running.
3. build and run the bot:

sh build.sh && ./govd

## docker (recommended)

1. build the image using the dockerfile:

docker build -t govd-bot .

1. update the `.env` file to ensure the database properties match the environment variables defined for the mariadb service in the `docker-compose.yml` file.  
for enhanced security, it is recommended to change the `MARIADB_PASSWORD` property in `docker-compose.yaml` and ensure `DB_PASSWORD` in `.env` matches it.the following line in the `.env` file **must** be set as:

```auto
DB_HOST=db

```

1. run the compose to start all services:

docker compose up -d

# configuration

you can configure the bot using the `.env` file. here are the available options:

| variable | description | default |
| --- | --- | --- |
| DB\_HOST | database host | localhost |
| DB\_PORT | database port | 3306 |
| DB\_NAME | database name | govd |
| DB\_USER | database user | govd |
| DB\_PASSWORD | database password | password |
| BOT\_API\_URL | telegram bot api url | [https://api.telegram.org](https://api.telegram.org/) |
| BOT\_TOKEN | telegram bot token | 12345678:ABC-DEF1234ghIkl-zyx57W2P0s |
| CONCURRENT\_UPDATES | max concurrent updates handled | 50 |
| LOG\_DISPATCHER\_ERRORS | log dispatcher errors | 0 |
| DOWNLOADS\_DIR | directory for downloaded files | downloads |
| HTTP\_PROXY [(?)](https://github.com/govdbot/govd#proxying) | http proxy (optional) | |
| HTTPS\_PROXY [(?)](https://github.com/govdbot/govd#proxying) | https proxy (optional) | |
| NO\_PROXY [(?)](https://github.com/govdbot/govd#proxying) | no proxy domains (optional) | |
| REPO\_URL | project repository url | [https://github.com/govdbot/govd](https://github.com/govdbot/govd) |
| PROFILER\_PORT | port for profiler http server (pprof) | 0 _(disabled)_ |

you can configure specific extractors options with `ext-cfg.yaml` file ([learn more](https://github.com/govdbot/govd/blob/main/CONFIGURATION.md)).

Important

to avoid limits on files, you should host your own telegram botapi and set `BOT_API_URL` variable according. public bot instance is currently running under a botapi fork, [tdlight-telegram-bot-api](https://github.com/tdlight-team/tdlight-telegram-bot-api), but you can use the official botapi client too.

# proxying

there are two types of proxying available:

- **http proxy** : this is a standard http proxy that can be used to route requests through a proxy server. you can set the `HTTP_PROXY` and `HTTPS_PROXY` environment variables to use this feature. (SOCKS5 is supported too)
- **edge proxy** : this is a custom proxy that is used to route requests through a specific url. currenrly, you can only set this proxy with `ext-cfg.yaml` file ([learn more](https://github.com/govdbot/govd/blob/main/EDGEPROXY.md)).

Tip

by settings `NO_PROXY` environment variable, you can specify domains that should not be proxied.

# authentication

some extractors require cookies to access the content. please refer to [this page](https://github.com/govdbot/govd/blob/main/AUTHENTICATION.md) for more information on how to set up authentication for each extractor.

# todo

- add tests
- add support for telegram webhooks
- switch to pgsql (maybe)
- better api
- better docs

## GitHub:

> **[GitHub - govdbot/govd: a telegram bot for downloading media from various...](https://github.com/govdbot/govd)**
>
> a telegram bot for downloading media from various platforms
