ts2tg notifies you on Telegram when users join/leave your TeamSpeak server
  • Go 57.1%
  • HTML 27.5%
  • Shell 10%
  • Dockerfile 5.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-26 06:13:17 +00:00
html feat: Release v1.0.0 2026-05-05 01:32:15 +02:00
teamspeak feat: Ignore users by TeamSpeak UUID 2026-10-26 05:59:38 +00:00
telegram feat: Release v1.0.0 2026-05-05 01:32:15 +02:00
.env.example feat: Ignore users by TeamSpeak UUID 2026-10-26 05:59:38 +00:00
.gitignore feat: Release v1.0.0 2026-05-05 01:32:15 +02:00
bot.go feat: Release v1.0.0 2026-05-05 01:32:15 +02:00
build.sh chore: update build script 2026-05-05 05:52:56 +02:00
config.go feat: Ignore users by TeamSpeak UUID 2026-10-26 05:59:38 +00:00
Dockerfile chore: Bump go to 1.26.10 2026-10-26 05:55:53 +00:00
go.mod chore: Bump go-envconfig to v1.4.3 and zerolog to v1.35.1 2026-10-26 05:58:33 +00:00
go.sum chore: go mod tidy 2026-10-26 06:13:17 +00:00
LICENSE feat: Release v1.0.0 2026-05-05 01:32:15 +02:00
main.go feat: Ignore users by TeamSpeak UUID 2026-10-26 05:59:38 +00:00
monitor.go feat: Ignore users by TeamSpeak UUID 2026-10-26 05:59:38 +00:00
README.md feat: Ignore users by TeamSpeak UUID 2026-10-26 05:59:38 +00:00
renovate.json Update renovate.json 2026-10-26 06:41:39 +01:00

ts2tg

ts2tg notifies you on telegram when users join/leave your teamspeak server

Important

The version of this repository you are seeing is likely a mirror.

If you want to contribute any changes please head over to git.watn3y.de and register an account.

Running with Docker Compose

The Docker image is available on these registries.

Example compose file:

services:
  ts2tg:
    image: watn3y/ts2tg:latest
    container_name: ts2tg
    restart: unless-stopped
    volumes:
      - /etc/localtime:/etc/localtime:ro
    environment:
      #TS2TG_LOGLEVEL:
      #TS2TG_SLEEPINTERVAL:
      TS2TG_TELEGRAM_APITOKEN:
      TS2TG_TELEGRAM_CHATID:
      TS2TG_TEAMSPEAK_BASEURL:
      TS2TG_TEAMSPEAK_APIKEY:
      #TS2TG_TEAMSPEAK_JOINURL:
      #TS2TG_IGNOREDUSERS:

Available tags: latest, v1.0.0,v1.1.0,etc

Running on Linux

Grab a release from the releases page. Make sure to set your environment variables accordingly.

HTML redirection

A example HTML file to redirect your Users directly to their TeamSpeak application is provided here

Environment Variables

Note

For development purposes, ts2tg supports loading environment variables from a .env file placed in the projects root directory.

Variable Description Default Required Example
TS2TG_LOGLEVEL LogLevel as described in the zerolog documentation 1 (Info) ❌ 1
TS2TG_SLEEPINTERVAL Amount of seconds to wait between requests to TeamSpeak 60 ❌ 60
TS2TG_TELEGRAM_APITOKEN Telegram BotToken, get it from @BotFather on Telegram None ✅ 1234567890:AAHdqTcvCH1vGWJxfSeofSAs0K5PALDsaw
TS2TG_TELEGRAM_CHATID Chat to notify about users joining/leaving TeamSpeak None ✅ -1001234567890
TS2TG_TEAMSPEAK_BASEURL Base URL of your TeamSpeak Server. Including the Virtual Server. For most people this will be /1 None ✅ http://example.com/1
TS2TG_TEAMSPEAK_APIKEY TeamSpeak WebQuery API Key which can be generated like this None ✅ A7B3C9D2E5F1A4B8C6D9E2F5A8B1C4D7E0F3A6B9
TS2TG_TEAMSPEAK_JOINURL HTTP(S) URL of your redirect.html None ❌ https://example.com/redirect.html
TS2TG_IGNOREDUSERS Comma-separated list of TeamSpeak unique identifiers (UUIDs) to ignore. Joins/leaves from these users won't trigger notifications None ❌ abc123def456=,xyz789uvw012=

Nice to know

Semantic Versioning

This project does it's best to follow Semantic Versioning, however I can't guarantee anything.

AI Disclosure

AI was used in the process of creating this project. Mainly for the HTML redirection file because I am shockingly bad at anything that isn't backend.