← Back to overview

Librevault Configuration

May 31, 2016

Librevault configuration is written using JSON format. It is separated in two files: client.conf, containing Librevault properties and folders.conf, containing properties of folders, served by Librevault application.

Config location:

Windows:

%APPDATA%\Librevault

OS X:

~/Library/Application Support/Librevault

Linux:
We follow XDG Base Directory Specification and search configuration file in these folders:
  • $XDG_CONFIG_HOME/Librevault
  • $HOME/.config/Librevault
  • /etc/xdg/Librevault

client.conf:

Name Type Value semantics
client_name string The name of the device to be sent to the other nodes, so the other nodes could identify this node easily. Default: hostname of client device
control_listen string Host and port, on which the Librevault application will handle WebSocket API connections. Default: [::]:42346
p2p_listen string Host and port, on which the Librevault application will listen for incoming connections. 0 as port stands for random port. Default: [::]:42345
p2p_download_slots integer Number of download slots per folder. Default: 10
p2p_request_timeout integer Lifetime (in seconds) for a download request. May drop VERY slow connections. So, if your connection is VERY slow (< 5462 B/s), then increase this value. Default: 10
p2p_block_size integer Size of minimal transmission unit (in bytes). May reduce RTT if increased, but default value is okay enough. BitTorrent uses 16KB, by the way. Default: 32768
natpmp_enabled bool Enables NAT-PMP NAT traversal mechanism. Default: true
natpmp_lifetime integer Lifetime (in seconds) of port mapping. Default: 3600
predef_repeat_interval integer  
multicast4_enabled bool Enables IPv4 multicast discovery. Default: true
multicast4_group string IPv4 multicast group to connect to and receive multicast requests from. Default: 239.192.152.144:28914
multicast4_repeat_interval integer Interval in seconds between sending IPv4 multicast requests. Default: 30
multicast6_enabled bool Enables IPv6 multicast discovery. Default: true
multicast6_group string IPv6 multicast group to connect to and receive multicast requests from. Default: [ff08::BD02]:28914
multicast6_repeat_interval integer Interval in seconds between sending IPv4 multicast requests. Default: 30
bttracker_enabled bool Enables using BitTorent trackers for discovering new peers. Default: true
bttracker_num_want integer Default: 30
bttracker_min_interval integer Default: 15
bttracker_azureus_id string This option can be used to mask Librevault client as any other torrent-client, that uses Azuerus-style encoding for peer_id. May break Librevault tracker. Default: -LV0001-
bttracker_reconnect_interval integer Interval (in seconds) between sending new connection request to UDP tracker. Default: 30
bttracker_packet_timeout integer Default: 10
bttracker_trackers array of strings URLs of trackers to announce to. Supports only UDP trackers using udp:// scheme. Default: some hardcoded open trackers

folders.conf:

Name Type Value semantics
secret string Secret of directory, served by client.
path string Directory path, where files are supposed to be. This directory will be watched for changes.
system_path string Directory path for the folder's configuration and index. Tbe best results are achieved if located on the same device as the synchronized folder. Default: folders.*.path/.librevault
index_event_timeout integer Timeout (in milliseconds) between receiving directory change and committing it. Default: 1000
preserve_unix_attrib bool

Enables preserving Unix attributes stat() attributes (mode, uid, gid). May require root priveleges to run, because default uid/gid for clients without this option equals 0 (root).

WARNING: This is a special option for special cases; do not enable it unless you really know what you are doing.

NOTE: This option must be enabled on both "indexing node" and "receiving node" to operate correctly. Default: false

preserve_windows_attrib bool

Enables preserving Windows attributes (Read-Only/Hidden/System/Archive).

WARNING: This is a special option for special cases; do not enable it unless you really know what you are doing.

NOTE: This option must be enabled on both "indexing node" and "receiving node" to operate correctly. Default: false

preserve_symlinks bool Enables preserving symbolic links. Used only for indexing. Default: false
chunk_strong_hash_type integer Default: 0
full_rescan_interval integer Interval (in seconds) between full directory rescans. Useful to mitigate file watcher inaccuracy. Default: 60
ignore_paths array of strings List of ignored files. The files must be specified in ECMAScript RegExp notation (RegExp supported). Please, don't forget to add your system_path to ignore_paths to avoid indexing recursion deadlock. Default and cannot be overridden: ^\.system_path(?:\/(?:.*))?, where system_path is escaped and substituted from config parameter.
nodes array of strings Hard-coded list of nodes to exchange files with.
archive_type string Type of versioning for this directory. Can be "none", "trash", "timestamp" or "block". Default: "trash"
archive_trash_ttl integer Timeout (in days) between placing a file in trash folder and being wiped out. Used only in "trash" archive_type. Default: 30
archive_timestamp_count integer Number of versions of file, being saved in archive. Used only in "timestamp" archive_type. Default: 5

Comments