SQLite
So why?
- I don't like the online service.
- I need self-host & local & privacy.
- Target: https://github.com/leaperone/MultiPost-Extension
- Global
- Telegram
- Mastodon
- BlueSky
- Thread
- Chinese
- Douban
- Okjike
- Douyin
- Bilibili
- Xiaohongshu
- Coolapk
- Zhihu
- V2Ex
# 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
nohup ./tg sync -c ./config/config.yaml > bot.log 2>&1 &
# kill background
pkill -f tg
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