github.com/status-im/status-go@v1.1.0/config/README.md (about) 1 # Introduction 2 3 This document describes the available options in the JSON config for `status-go`. 4 5 The structure of the JSON config is defined in the [`params/config.go`](/params/config.go) file, which also contains detailed comments on meaning of each option. The `NodeConfig` struct defines the general configuration keys at the __root__ of the JSON file. 6 7 If the descriptions of any options are too vague feel free to [open an issue](https://github.com/status-im/status-go/issues/new). 8 9 Example config files can be viewed in the [`config/cli`](/config/cli) folder. 10 11 # Important Sections 12 13 The JSON config is separated into several sections. The most important ones are listed below. 14 15 ## `NodeConfig` 16 17 The root of the JSON configuration. 18 19 An example of most important settings would include: 20 ```json 21 { 22 "NetworkID": 1, 23 "DataDir": "/tmp/status-go-data", 24 "NodeKey": "123qwe123qwe123qwe123", 25 "Rendezvous": false, 26 "NoDiscovery": false, 27 "ListenAddr": "0.0.0.0:30303", 28 "RegisterTopics": ["whispermail"] 29 } 30 ``` 31 32 If you'd want to enable JSON RPC port you'd need: 33 ```json 34 { 35 "HTTPEnabled": true, 36 "HTTPHost": "0.0.0.0", 37 "HTTPPort": 8545, 38 "APIModules": "eth,net,web3,admin" 39 } 40 ``` 41 42 In order to adjust logging settings you'd need: 43 ```json 44 { 45 "LogFile": "/var/log/status-go.log", 46 "LogLevel": "INFO", 47 "LogMaxSize": 200, 48 "LogMaxBackups": 5, 49 "LogCompressRotated": true 50 } 51 ``` 52 Valid `LogLevel` settings are: `ERROR`, `WARN`, `INFO`, `DEBUG`, `TRACE` 53 54 ## `WakuConfig` 55 56 If you want your node to relay Waku(modified Whisper) protocol messages you'll want to include this: 57 ```json 58 { 59 "WakuConfig": { 60 "Enabled": true, 61 "EnableMailServer": true, 62 "DataDir": "/tmp/status-go-data/waku", 63 "MailServerPassword": "status-offline-inbox", 64 "MailServerDataRetention": 30 65 } 66 } 67 ``` 68 The `MailServerPassword` is used for symmetric encryption of history requests. 69 The `MailServerDataRetention` defines number of days for which to keep messages. 70 71 By default it will use `leveldb` embedded database. To use postgres instead you need to 72 add this to your config: 73 74 ```json 75 { 76 "DatabaseConfig": { 77 "PGConfig": { 78 "Enabled": true, 79 "URI": "postgres://user:password@host:port?options" 80 } 81 } 82 } 83 ``` 84 85 __NOTE:__ The default password used by Status App and [our mailservers](https://fleets.status.im/) is `status-offline-inbox`. 86 87 ## `ClusterConfig` 88 89 This config manages what peers and bootstrap nodes your `status-go` instance connects when it starts. 90 ```json 91 { 92 "ClusterConfig": { 93 "Enabled": true, 94 "Fleet": "eth.prod", 95 "BootNodes": [ 96 "enode://345ert345ert@23.45.67.89:30404" 97 ], 98 "TrustedMailServers": [ 99 "enode://qwe123qwe123@98.76.54.32:30504" 100 ], 101 "StaticNodes": [ 102 "enode://123qwe123qwe@12.34.56.78:30305" 103 ] 104 } 105 } 106 ``` 107 `BootNodes` help the `status-go` instance find peers. They are more important to have than `StaticNodes` or `TrustedMailServers`, which are just statically added peers on start.