storage-daemon downloads and shares TON Storage bags. storage-daemon-cli is the console client used to control it.
Prerequisites
- Linux, macOS, or Windows host with at least a dual-core 1 GHz CPU, 2 GB RAM, 2 GB SSD (plus space for bags), and stable 10 Mb/s bandwidth with a public/static IP
- Global network config file, for example
global.config.jsonfrom the TON configs
Install storage-daemon
- Download prebuilt
storage-daemonandstorage-daemon-clibinaries from TON auto builds (built from thetestnetbranch). - Or build from source in the
ton-blockchain/tonrepository (target:storage-daemonandstorage-daemon-cli).
Start the daemon
Run the daemon with explicit ports and a data directory:-v— log verbosity (3= INFO)-C— path to the global network config-I— ADNL listen IP and port (<IP>is the public or reachable address of the host)-p— TCP port for the console interface-D— path to the daemon database; CLI keys are generated inside thecli-keys/subdirectory on first start
Open the console port in the firewall only when needed. Keep the daemon bound to
localhost when storage-daemon-cli runs on the same host.Connect with storage-daemon-cli
Point the CLI at the console port and keypair generated by the daemon:-I— daemon host and console port-k— client private key path-p— server public key path (CLI option, not a port)
storage-daemon-cli can also run non-interactively:
Add bags for download
Download by bag ID hash or by meta file:<BAG_ID>— 64-character hex bag ID<DOWNLOAD_DIR>— target directory for downloaded files<META_FILE>— path to the bag meta file- If
-dis omitted, files are saved to the daemon’s default storage directory.
list shows added bags; list --hashes prints full IDs. Use either the numeric ordinal from list (valid only for the current session) or the full ID in other commands.
Inspect and control transfers
get <BAG_ID>— show description, size, speed, and file listget-peers <BAG_ID>— list connected peersdownload-pause <BAG_ID>/download-resume <BAG_ID>— control downloadsupload-pause <BAG_ID>/upload-resume <BAG_ID>— control uploadsremove <BAG_ID>— remove the bagremove --remove-files <BAG_ID>— remove the bag and files (files are always removed if stored in the daemon’s internal directory)
remove --remove-files deletes local files. Run it only when the files are backed up or no longer needed.Partial downloads and priorities
Download only selected files by setting priorities:0–255; 0 disables download. --partial sets listed files to 1 and all others to 0.
Update priorities after adding the bag:
priority-all <BAG_ID> <priority>— set the same priority for every filepriority-idx <BAG_ID> <index> <priority>— set by file index fromgetpriority-name <BAG_ID> <name> <priority>— set by file name
<priority>— integer priority from0(do not download) to255(highest)<index>— file index from thegetoutput<name>— file name from thegetoutput
Create and share a bag
Create a bag from a file or directory and start seeding:<PATH>— file or directory to include in the bag
--no-upload— create the bag without uploading; enable later withupload-resume--copy— copy files into the daemon’s internal directory before seeding
.torrent-like descriptor:
<META_FILE>— path to save the generated meta file