Can BitTorrent Sync CLI be used to create shares?

8,024

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.

Share:
8,024

Related videos on Youtube

Ilari Kajaste
Author by

Ilari Kajaste

Updated on September 18, 2022

Comments

  • Ilari Kajaste
    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. Executing btsync 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
    Ilari Kajaste over 10 years
    Yes, this works. And it's even pretty easy to automatically edit the config file since it's in JSON. Thanks!
  • louis cypher
    louis cypher almost 10 years
    Is it real JSON? I have the impression it isn't. JSON has no comments right?
  • insign
    insign about 8 years
    The link of manual is off
  • Thalys
    Thalys about 8 years
    Lucky the answer is self contained. Updated to a way back machine link that should have the same information