# configuration

Configuration is generated by default should be OK in the most of cases,
however you might want to tune it.

```toml

# settings peer connection
[bep]
advances_per_iteration = 10         # maximum amount of file metadata advances per iteration
blocks_max_requested = 16           # maximum concurrent block read requests per peer
blocks_simultaneous_write = 16      # maximum concurrent block write requests to disk
connect_timeout = 5000              # maximum time for connection, milliseconds
request_timeout = 60000             # maximum time for request, milliseconds
rx_buff_size = 16777216             # preallocated receive buffer size
rx_timeout = 300000                 # maximum time for request, milliseconds
tx_buff_limit = 8388608             # preallocated transmit buffer size
tx_timeout = 90000                  # tx max time, milliseconds

# database settings
[db]
upper_limit = 0             # maximum amount of database, in bytes, 0 - for auto allocate
uncommited_threshold = 150  # how often flush db to disk, i.e. how much operations
                            # might be not committed. Affects disk performance
max_blocks_per_diff = 8192  # maximum number of blocks per single diff (to display progress in UI)
max_files_per_diff = 1024   # maximum number of files per single diff (to display progress in UI)

# dialer settings
[dialer]
enabled = true
redial_timeout = 300000     # how often try to redial to connect offline peers, milliseconds
skip_discovers = 10         # when peer addresses are known, how many times skip rediscovering them

# filesystem settings
[fs]
temporally_timeout = 86400000           # remove incomplete file after this amount of seconds
mru_size = 128                          # maximum amount of cached/opened files
bytes_scan_iteration_limit = 1024*1024  # max number of bytes before emitting scan events
files_scan_iteration_limit = 128        # max number processed files before emitting scan events

[global_discovery]
enabled = true
debug = false
announce_url = 'https://discovery.syncthing.net/'   # url of syncthing/private global announce server
device_id = 'LYXKCHX-VI3NYZR-ALCJBHF-WMZYSPK-QG6QJA3-MPFYMSO-U56GTUK-NA2MIAW' # the device_id of global discovery server
cert_file = '/home/b/.config/syncthing/cert.pem'    # this device certificate location
key_file = '/home/b/.config/syncthing/key.pem'      # this device key location
rx_buff_size = 32768                                # preallocated receive buffer size, bytes
timeout = 4000                                      # max request/response time, milliseconds

[local_discovery]
enabled = true
frequency = 30000       # how often send announcements in LAN, in milliseconds
port = 21027            # upd port used for announcement (should be the same as in syncthing)

# default log settings
[[log]]
name = 'default'                            # possible values: trace, debug, info, warn, error, critical
level = 'trace'
sinks = ['stdout', 'file:/tmp/log.txt']     # where do output logs

[main]
default_location = '$HOME/.config/syncspirit/shared_data'    # where folders are created by default
device_name = 'this-device-name'                             # this device name
timeout = 5000                                               # main actors timeout, milliseconds
hasher_threads = 3                                           # the amount cpu cores used for hashing

[relay]
enabled = true
debug = false
discovery_url = 'https://relays.syncthing.net/endpoint'     # where pick the list of relay servers pool
rx_buff_size = 1048576                                      # preallocated receive buffer size, bytes

[upnp]
enabled = true
debug = false
external_port = 22001   # external (router) port for communication, opened on router
max_wait = 1            # router response max wait time, seconds
rx_buff_size = 65536    # preallocated receive buffer size, bytes

```
