Skip to content

bGZo/telegram-message-sync-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram message sync bot

Roadmap

Message Archive

Rich text from Telegram #gtd/done

Media Download from Telegram #gtd/done

Notification #gtd/done

Database Support #gtd/doing

SQLite

Sync Social Media #gtd/doing

So why?

  1. I don't like the online service.
  2. I need self-host & local & privacy.

Quick start

# install dependencies
go mod tidy

# build the result
go build -o tg main.go

# give the right to run. 
chmod +x ./tg

# run bot
./tg sync -c ./config/config.yaml

Optional: run in background using nohup

nohup ./tg sync -c ./config/config.yaml > bot.log 2>&1 &

# kill background
pkill -f tg

Optional: run in background using nohup

sudo vim /lib/systemd/system/tg@.service

Add following config:

[Unit]
Description=tg message sync bot for %i.
After=network.target

[Service]
Type=simple
User=%i
Restart=on-abort
Environment=http_proxy=192.168.31.20:10800
Environment=https_proxy=192.168.31.20:10800
ExecStart=/home/bgzo/workspaces/telegram-message-sync/tg sync -c /home/bgzo/workspaces/telegram-message-sync/config/config.yaml

[Install]
# WantedBy=multi-user.target
WantedBy=graphical-session.target

Then restart systemd and enable tg@username

systemctl daemon-reload
systenctl start tg@bgzo
systenctl enable tg@bgzo

About

project: a telegram bot for archiving messages

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages