Installation and Updates #
Deploy from Pre-compiled Binary (Recommended) #
Download the binary file for your platform from the Release page.
Create a config.toml file in the extracted directory, refer to the Configuration Guide to edit the configuration file.
Run:
chmod +x saveany-bot
./saveany-bot
Daemon #
/etc/systemd/system/saveany-bot.service and write the following content:[Unit]
Description=SaveAnyBot
After=systemd-user-sessions.service
[Service]
Type=simple
WorkingDirectory=/yourpath/
ExecStart=/yourpath/saveany-bot
Restart=always
[Install]
WantedBy=multi-user.targetEnable startup on boot and start the service:systemctl enable --now saveany-botAdd Boot Autostart Service
Create a file/etc/init.d/saveanybot, refer to wrt_init and modify as needed:#!/bin/sh /etc/rc.common
#This is the OpenWRT init.d script for SaveAnyBot
START=99
STOP=10
description="SaveAnyBot"
WORKING_DIR="/mnt/mmc1-1/SaveAnyBot"
EXEC_PATH="$WORKING_DIR/saveany-bot"
start() {
echo "Starting SaveAnyBot..."
cd $WORKING_DIR
$EXEC_PATH &
}
stop() {
echo "Stopping SaveAnyBot..."
killall saveany-bot
}
reload() {
stop
start
}Set permissions:chmod +x /etc/init.d/saveanybotThen copy the file to /etc/rc.d and rename it to S99saveanybot, also set permissions:chmod +x /etc/rc.d/S99saveanybotAdd Shortcut Commands
Create a file/usr/bin/sabot, refer to wrt_bin and modify as needed. Note that the file encoding here only supports ANSI 936.
Then set permissions:chmod +x /usr/bin/sabotUsage: sudo sabot start|stop|restart|status|enable|disableDeploy Using Docker #
Docker Compose #
Download the docker-compose.yml file, create a new config.toml file in the same directory, refer to config.example.toml to edit the configuration file.
Start:
docker compose up -d
Docker #
docker run -d --name saveany-bot \
-v /path/to/config.toml:/app/config.toml \
-v /path/to/downloads:/app/downloads \
ghcr.io/krau/saveany-bot:latest
About Docker image variantsYou can pull different variants by specifying tags, for example:
- Default: Includes all features and dependencies, larger in size. Use this if you don't have special requirements.
- micro: Slimmed-down image with some optional dependencies removed, smaller in size.
- pico: Minimal image containing only core features, smallest in size.
ghcr.io/krau/saveany-bot:micro
For more details about the variants, see the Dockerfile in the project root.
Updates #
If you deployed from pre-compiled binaries, use the following CLI command to update:
./saveany-bot up
(upgrade is also available as an alias.)
The command replaces the binary in place; a running bot keeps the old version until it is restarted. You can also send /update to the bot: it downloads the new version, replaces its own binary and restarts itself in place (on Windows it exits instead, and the service manager starts the new version).
If you deployed with Docker, use the following commands to update:
docker:
docker pull ghcr.io/krau/saveany-bot:latest
docker restart saveany-bot
docker compose:
docker compose pull
docker compose restart