Can BitTorrent Sync CLI be used to create shares?
You would need to use the config file for this.
You can use btsync --dump-sample-config
(or --get-sample-config
if you are using an older version) to get a sample, feed it the necessary paths under "shared folders" and secrets generated by --generate
a secret.
Then save the config file then tell btsync to use that config file by launching it with --config
.
You can find all this in page 10 of this version of the manual. Note that this will disable the web UI.
I leave it as an exercise for the user to script all this in whatever hacky way his heart desire.
Related videos on Youtube
Ilari Kajaste
Updated on September 18, 2022Comments
-
Ilari Kajaste almost 2 years
BitTorrent Sync can be executed from command line, but there are only a few options show by the
--help
parameter. Executingbtsync
makes a web ui available (at port 8888) which can be used to configure.BitTorrent Sync 1.2.73 Usage: btsync [--config <path>] [--nodaemon] [--generate-secret] [--dump-sample-config] [--help] [--get-ro-secret <secret>] Options: --config - location and name of configuration file --nodaemon - do not use daemon mode --generate-secret - generate shared secret --get-ro-secret - get read only secret for existing master secret --dump-sample-config - dump sample config file --help - print this message and exit
These options don't seem to include creating a new shared folder.
Can I create a new share with BitTorrent Sync using only command line?
I'm also interested in even very hacky solutions, like editing the config file and restarting the service, or posting specific HTTP requests to localhost:8888.
-
Ilari Kajaste over 10 yearsYes, this works. And it's even pretty easy to automatically edit the config file since it's in JSON. Thanks!
-
louis cypher almost 10 yearsIs it real JSON? I have the impression it isn't. JSON has no comments right?
-
insign about 8 yearsThe link of manual is off
-
Thalys about 8 yearsLucky the answer is self contained. Updated to a way back machine link that should have the same information