- Edit systemd service to
/etc/systemd/system/wol.service
. - Create config in
config/config.json
. - Enable and start it.
- Create a directory and a
compose.yml
file in it. - Edit config in path
config/config.json
. - Start it with
docker compose up -d
.
{
"bot_token": "telegram bot token here",
"ip": "192.168.0.X",
"mac": "A1:B2:C3:D4:E5:F6",
"admin_id": 123456789
}
services:
bot:
image: ghcr.io/linuxfight/wol_bot:master
volumes:
- ./config:/app/config
restart: unless-stopped
network_mode: host
You can get bot token from https://t.me/BotFather.
User id from https://t.me/userinfobot.
Get your ip and mac address from pc, that you want to turn on.
[Unit]
Description=Run the Wake-On-Lan (WOL) bot
After=network.target
[Service]
Type=simple
ExecStart=PATH_TO_WTP_BIN
WorkingDirectory=PATH_TO_WORKDIR
Restart=always
RestartSec=5
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=wol
[Install]
WantedBy=multi-user.target