An application that forwards wall posts and playlists from VK community to Telegram channel.
| VK Content Type | Notes |
|---|---|
| Text | Split into multiple messages if too long. |
| Photo | Posted in the largest available size. |
| Video | Direct VK videos up to 720p; external videos (YouTube, etc.) are shared as links with preview. |
| Audio | Sent as a separate message. |
| File | Sent as a separate message. |
| Poll | Sent as a separate message. |
| Market | Shared as a link. |
| Playlist | Requires a dedicated Telegram channel. A link to the playlist will be posted in the main channel. |
| Link | Shared as is. |
| Article | Shared as a link. |
| Poster | Treated like a photo. |
| Graffiti | Treated like a photo. |
| Map | Sent as a separate message. |
| Live stream | Shared as a link at the top of the post. |
Note
Edited posts in VK won't be updated in Telegram. To reflect changes, delete the old Telegram messages and re-forward the updated post using the Telegram bot.
- Docker
- VK community token with access to community management
- VK account
- Telegram channel (and an additional one if you plan to use playlist forwarding)
- Telegram account
- Telegram bot token
- Telegram application
-
Set environment variables manually in
.envfile (see .env.example) or by running these commands:# Go to the root directory of this repository cd "$(git rev-parse --show-toplevel)" # Build env_helper docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t env_helper projects/env_helper # Run env_helper mkdir -p out && docker run --rm -it -v "$(pwd)/out":/tmp/out env_helper # Copy resulting '.env' file to the root directory cp out/.env .env
-
After that, you have two options:
-
Run the application without SSL certificate:
COMPOSE_PROFILES=http docker compose up -d --build --remove-orphans # Or, if you also want to handle playlists COMPOSE_PROFILES=http,with-pl docker compose up -d --build --remove-orphans -
Run the application with SSL certificate - read this guide.
-
docker compose down -v --rmi all --remove-orphans-
Backup your current
.envfile. -
Run
uninstall.shscript if vk-to-tgm was installed locally. -
Copy
.envfile from the backup and change environment variables:- Rename variables:
KATE_TOKENtoVK_TOKENVK_IGNORE_ADStoVTT_IGNORE_ADSNGINX_HOSTtoNGINX_SERVER_NAME
- Remove deprecated variables:
VK_LOGINVK_PASSWORDVK_OFFICIAL_TOKENVK_API_LANGUAGE
- Rename variables:
-
Create
out/directory and copy.envthere:mkdir -p out && cp .env out/.env
GNU General Public License v3.0 or later.
See LICENSE file.
