Icebox is a minimal Telegram bot written in Rust. It listens for messages and appends them to a local file with a timestamp. It's ideal for logging, journaling, or archiving messages from Telegram in a structured and lightweight way.
- Receives messages via the Telegram Bot API.
- Appends messages to a file with timestamps.
- Markdown formatting for better readability.
- Configuration via environment variables using a
.envfile.
- Rust
- A Telegram bot token (get one via @BotFather)
git clone https://github.com/w1lli4n/icebox.git
cd iceboxCreate a .env file in the root directory with the following content:
TELOXIDE_TOKEN=your_telegram_bot_token
INBOX_PATH=./messages.mdcargo run --releaseIcebox will now start listening for messages sent to your Telegram bot and log them in the specified file.
If you want, add it as a service in your system to boot startup and to keep it running. A systemd service will look like this:
[Unit]
Description=Icebox Telegram Bot
After=network.target
[Service]
Type=simple
ExecStart=<HOME_DIRECTORY>/.cargo/bin/icebox
WorkingDirectory=<HOME_DIRECTORY>/.local/opt/icebox
Environment=DOTENV_FILE=<HOME_DIRECTORY>/.local/opt/icebox/.env
Restart=on-failure
RestartSec=5s
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=default.targetSee CHANGELOG.md for version history.
MIT — see the LICENSE file for details.