Configuration #
Settings are stored in the SQLite database under the data directory (default data/saveany.db) and managed from the web console. The first start uses defaults and prints a direct web URL with an access token; set SAVEANY_ADMIN_PASSWORD to choose the fallback password.
Configuration pages #
| Page | Contents |
|---|---|
| Guide | First-run checklist and everyday usage |
| Telegram | Bot token, API ID/hash, proxy, Userbot login |
| Storages | Local disk, WebDAV, Alist, S3, Rclone, Telegram, and more |
| Users | Telegram user IDs, default storage, directories, rules, and storage access |
| Automation | Per-user directories, rules, watched chats, and peer sync |
| Settings | Task concurrency, language, proxy, media type filter, Aria2, yt-dlp, parsers, cache, logging, web, and API |
| Parsers | Install JavaScript parser plugins |
| System | Runtime information, restart, version checks, and updates |
Some settings require a process restart, including task concurrency, global proxy, database session path, cache settings, plugins, hooks, and the web listen address. The page marks fields that need a restart.
Automation #
The Automation page manages a selected user’s directories, rules, watched chats, and Userbot peer sync. Directories can be marked as the default destination; rules can be enabled, disabled, added, deleted, or imported from presets.
Parsers #
The Parsers page installs JavaScript parser plugins when parser plugins are enabled in Settings. Upload a .js plugin file or paste its code; it becomes available without a restart.
Telegram #
Create a bot with @BotFather. API ID and API Hash have defaults and usually need no changes; use your own Telegram API credentials when enabling the Userbot.
Saving bot settings starts the connection automatically. Userbot login happens on the Telegram page, with no terminal interaction inside the container.
Helper bots #
Helper bots are optional. Add them in the Helper bots section of the Telegram page with a BotFather token, then add each bot to the destination Telegram chat with permission to send files. Telegram storage uploads are distributed across running helpers that can access the destination; helpers without access are skipped and uploads fall back to the primary bot. Helper bots do not handle commands.
To split large file downloads across helpers, set a private Relay channel ID on the Telegram page, make sure the primary bot can post there, and add at least two helper bots to that channel. The primary bot forwards incoming files to the relay channel, and each helper obtains its own file reference before downloading assigned chunks. This requires non-stream mode and files at or above the configurable Relay minimum file size (8 MB by default), and falls back to the single-client downloader when the relay or helper pool is unavailable. Forwarded relay messages are kept by default; disable Keep forwarded channel messages to delete them after download.
Transfer concurrency can be tuned under Settings → Core:
| Setting | Default | Meaning |
|---|---|---|
Download threads per file | 4 | Base threads used by automatic scheduling |
Download thread override | 0 | 0 uses automatic sizing; a positive value is the exact total thread count |
Automatic thread cap | 16 | Maximum threads when automatic sizing is used |
Global transfer budget | 0 | 0 uses workers × threads; downloads and uploads share this cap |
Relay minimum file size (MB) | 8 | Smaller files skip helper relays |
Chunk retry count | 20 | Retries for timeouts or connection failures on one chunk |
Media filter #
Use Settings → Media filter to restrict the bot to selected Telegram media types. Enter one value per line under Allowed media types; leave the field empty to allow everything:
| Value | Matches |
|---|---|
image | Telegram photos, image documents, stickers, and animated images |
video | Telegram video documents, including video messages |
audio | Telegram audio and voice messages |
document | Other document files |
Filtering happens before download tasks are created. Non-matching media is not downloaded and does not appear in the task list. Media groups keep only matching items; a group with no matching items is skipped silently. This is an instance-wide setting and takes effect immediately.
The filter currently covers Telegram media entry points: direct and forwarded media, media groups, batch /save, message links, watched chats, and Telegraph images. Parser results, direct HTTP links, and yt-dlp output are not filtered. Storage rules only change the destination path; they do not skip files.
Message metadata #
Enable Settings → Message metadata to store normalized Telegram message data for new Telegram file tasks. The local database keeps source chat, message ID, date, sender, text or caption, reply/forward references, album grouping, and media attributes. The task details API and Web console can export the stored JSON.
Store message text controls whether the message body and extracted tags are kept. Access hashes, tokens, raw Telegram objects, and old task data are not stored. Metadata applies only to files saved after the setting is enabled.
Write sidecar JSON writes <actual-file-path>.meta.json next to each saved file. It is off by default. Telegram storage does not upload the sidecar; it can instead consume the metadata to restore captions or media groups using the Telegram storage options.
Storages #
Add and enable storages on the Storages page. Local disk needs only a base path:
- In Docker, usually
/app/downloads. - For a binary deployment, use
./downloadsor an absolute path.
See Storage configuration for backend fields.
Users #
Only enabled Telegram user IDs on the Users page can use the bot. A new user needs at least the numeric user ID; the default storage can be set later.
Environment variables #
| Variable | Purpose |
|---|---|
SAVEANY_DATA_DIR | Data directory, default ./data |
SAVEANY_DB_PATH | SQLite file path, default <data-dir>/saveany.db |
SAVEANY_LISTEN | Web listen address, default 127.0.0.1:28080; use 0.0.0.0:28080 to expose it |
SAVEANY_ADMIN_PASSWORD | Set the fallback admin password on first start; otherwise one is generated and logged |
Security #
- The web console binds to
127.0.0.1:28080by default. Expose it publicly only through a reverse proxy with HTTPS. - The
Access tokensetting enables direct Web UI access through/?token=...and Bearer authentication for/api/v1. When empty, a token is generated on every start and printed in the log. - Change the generated fallback admin password immediately after the first password login.
- Never expose
data/, bot tokens, Userbot sessions, or access tokens.