lbry.tech/documents/resources/daemon-settings.md

74 lines
9.7 KiB
Markdown
Raw Normal View History

2019-02-15 17:50:56 +01:00
---
title: SDK Settings
description: The daemon provided by the LBRY SDK has many settings. This resource lists them all and what they mean. Ready, set, settings!
2019-03-19 23:56:32 +01:00
---
2018-08-24 20:50:13 +02:00
This document outlines how to configure SDK daemon settings and what options are available. They can be found on the lbry GitHub repository in [conf.py](https://github.com/lbryio/lbry-sdk/blob/master/lbry/conf.py).
2018-08-24 20:50:13 +02:00
2019-03-19 23:56:32 +01:00
## Daemon settings configuration
2018-08-24 20:50:13 +02:00
2019-03-19 23:56:32 +01:00
The easiest way to configure the settings is by editing the `daemon_settings.yml` file (may need to be created) that resides in the default [lbrynet directory](https://lbry.com/faq/lbry-directories). These settings can also be configured via the [settings_set](https://lbry.tech/api/sdk#settings_set) API call. The [settings_get](https://lbry.tech/api/sdk#settings_get) API call can be used to retrieve current values. Some values will require an SDK restart after being set via the API call.
2018-08-24 20:50:13 +02:00
Sample daemon_settings.yml file:
```
2019-03-08 07:22:12 +01:00
tcp_port: 3335
lbryum_servers: ['spv11.lbry.com:50001','spv19.lbry.com:50001']
2018-08-24 20:50:13 +02:00
download_directory: 'c:\lbry\Downloads'
use_upnp: false
```
2019-03-08 07:22:12 +01:00
To run the SDK with a specific configuration file, launch it by passing the config path: ```lbrynet start --config=c:\path\to\conf\daemon_settings.yml```. To run in debug mode, start with ```lbrynet start --verbose=lbrynet```.
2018-08-24 20:50:13 +02:00
## Configuration options
2018-08-24 21:06:57 +02:00
Configuration options are organized by their respective areas: Files, Wallet, Network, Security and Other.
2018-08-24 20:50:13 +02:00
### Files
| Setting | Format | Default value | Sample Values | Description |
|------------------------|---------|------------------------------------------------------|--------------------|--------------------------------------------------------------------------------------|
2019-03-19 23:56:32 +01:00
| data_dir | string | [varies by OS](https://lbry.com/faq/lbry-directories) | 'c:\lbry\lbrynet\' | Where to store the lbrynet folder, which includes blob files, logs and config data |
| delete_blobs_on_remove | boolean | true | false | Delete blobs on a file_delete call? |
2019-03-08 07:22:12 +01:00
| download_dir | string | local downloads folder | 'c:\lbry\lbrynet\' | Location of downloaded output files |
2018-08-24 20:50:13 +02:00
### Wallet
| Setting | Format | Default value | Sample Values | Description |
|-------------------------------|---------|------------------------------------------------------|------------------------------------|---------------------------------------------------------------------------------------------------|
2018-08-24 21:06:57 +02:00
| blockchain_name | string | 'lbrycrd_main' | 'lbrycrd_regtest' | Blockchain network to connect to |
| lbryum_servers | list | ['spv11.lbry.com:50001','spv19.lbry.com:50001'] | ["mylbryum.lbry.com:50001] | SPV wallet server address(Default servers are spv11-spv19) |
2019-03-19 23:56:32 +01:00
| wallet_dir | string | [varies by OS](https://lbry.com/faq/lbry-directories) | 'c:\lbry\lbryum\' | Wallet data location |
2018-08-24 20:50:13 +02:00
| max_key_fee | json | {'currency': 'USD', 'amount': 50.0} | {'currency': 'LBC', 'amount': 5.0} | Max payment allowed for content |
| wallet | string | 'lbryum' | 'lbrycrd' | Choice of wallet software, SPV (lbryum) vs full node (lbrycrd). Currently only lbryum supported |
2019-03-08 07:22:12 +01:00
| use_keyring | boolean | false | true | Store wallet password in keyring (not currently available) |
2018-08-24 20:50:13 +02:00
### Network
| Setting | Format | Default value | Sample Values | Description |
|----------------------------|---------|---------------------------|----------------------------|------------------------------------------------------------------------------------|
| api | string | localhost:5279 | 0:0:0:0:5280 | IP address and port the SDK API will listen on |
| streaming_server | string | localhost:5280 | 0:0:0:0:5280 | IP address and port the media/streaming server will listen on |
2018-08-24 20:50:13 +02:00
| cache_time | integer | 150 | 90 | How long to keep resolve data in cache |
2018-08-24 21:06:57 +02:00
| data_rate | float | 0.0001 | 0.05 | What LBC rate, per MB, to offer DHT data at (currently disabled in the protocol) |
2019-03-08 07:22:12 +01:00
| udp_port | integer | 4444 | 4445 | UDP port used to announce blobs |
2019-05-20 20:34:40 +02:00
| download_timeout | integer | 30 | 60 | Time, in seconds, to allow get call to resolve and get initial blobs |
| blob_download_timeout | integer | 30 | 60 | Time, in seconds, to allow download to get next blob |
| announce_head_blobs_only | boolean | true | false | Only announce first data blob |
2019-03-08 07:22:12 +01:00
| concurrent_blob_announcers | integer | 10 | 0 | Threads used in order to announce blobs. 0 means disabled |
2019-05-20 20:34:40 +02:00
| known_dht_nodes | list | ['lbrynet1.lbry.com:4444'] | ['myDHT.lbry.com:4444'] | Bootstrap nodes for network connectivity |
| max_connections_per_download | integer | 5 | 10 | Threads used to download blobs |
| seek_head_blob_first | boolean | true | false | Search for first data blob after downloading sd blob |
2019-03-08 07:22:12 +01:00
| tcp_port | integer | 3333 | 3334 | Port the SDK will listen on |
2019-05-20 20:34:40 +02:00
| concurrent_reflector_uploads| integer | 5 | 10 | Connections to use while uploading data to reflector |
2019-03-08 07:22:12 +01:00
| reflect_streams | boolean | true | false | Send published data to reflector servers |
2019-05-20 20:34:40 +02:00
| reflector_servers | list | ['reflector.lbry.com'] | ['myreflector.lbry.com'] | Server data will be reflected to |
2019-03-08 07:22:12 +01:00
| fixed-peer-delay | integer | 2 | 5 | Time, in mintues, to allow download from P2P before trying fixed peer |
| peer_connect_timeout | integer | 30 | 15 | Time, in seconds, to allow download to find peers |
| node_rpc_timeout | integer | 5 | 10 | Time, in seconds, to allow connection over DHT |
| network_interface | string | 0:0:0:0 | 127.0.0.1 | Interface to use for the DHT and blob exchange |
| use_upnp | boolean | true | false | Attempt external port mapping via UPnP |
2019-08-06 16:57:26 +02:00
| streaming_get | boolean | false | true | Allow calling localhost:5280/get/claimname requests |
| save_files | boolean | true | false | Save files with each download |
| save_blobs | boolean | true | false | Save blobs with each download |
2018-08-24 20:50:13 +02:00
### Other
| Setting | Format | Default value | Sample Values | Description |
|--------------------|---------|---------------|--------------------------------|---------------------------------------------------------------------------------------------------------------|
2019-06-21 05:43:42 +02:00
| components_to_skip | list | [] | ['reflector','hash_announcer'] | Disable components, [see entire list here](https://github.com/lbryio/lbry-sdk/wiki/Component-Dependencies-Table) |
| share_usage_data | boolean | true | false | Share analytics data |