github.com/qri-io/qri@v0.10.1-0.20220104210721-c771715036cb/config/readme.md (about) 1 # config 2 3 The config encapsulates qri configuration options & details. configuration is generally stored as a .yaml file, or provided at CLI runtime via command a line argument. 4 5 ``` shell 6 # to get, for example, your profile information 7 $ qri config get profile 8 9 # to set, for example, your api port to 4444 10 $ qri config set api.address /ip4/tcp/4444 11 12 # to disable rpc connections 13 $ qri config set rpc.enabled false 14 ``` 15 16 Objects and arrays can be indexed into using dot notation, eg as shown above to get or set the api port use `api.port` 17 To get the first element (which is at index 0) in the p2p.qribootstrapaddrs array: 18 `qri config get p2p.qribootstrapaddrs.0` 19 20 Here is a quick reference of all configurable fields: 21 * [profile](#profile) *object* 22 * [id](#id) *string* 23 * [privkey](#privkey) *string* 24 * [peername](#peername) *string* 25 * [created](#created) *string* 26 * [updated](#updated) *string* 27 * [type](#type) *string* 28 * [email](#email) *string* 29 * [name](#name) *string* 30 * [description](#description) *string* 31 * [homeurl](#homeurl) *string* 32 * [color](#color) *string* 33 * [thumb](#color) *string* 34 * [profile](#profile-photo) *ipfs hash* 35 * [poster](#poster-photo) *ipfs hash* 36 * [twitter](#twitter) *string* 37 * [repo](#repo) 38 * [middleware](#middleware) *array* 39 * [type](#repo-type) *string* 40 * [store](#store) *object* 41 * [type](#store-type) *string* 42 * [p2p](#p2p) *object* 43 * [enabled](#p2p-enabled) *bool* 44 * [peerid](#peerid) *base58 hash* 45 * [pubkey](#pubkey) *string* 46 * [privkey](#p2p-privkey) *string* 47 * [port](#p2p-port) *string* 48 * [addrs](#addrs) *array* 49 * [qribootstrapaddrs](#qribootstrapaddrs) *array* 50 * [profilereplication](#profilereplication) *bool* 51 * [boostrapaddrs](#bootstrapaddrs) *array* 52 * [cli](#cli) *object* 53 * [colorizeoutput](#colorizeoutput) *bool* 54 * [api](#api) *object* 55 * [enabled](#api-enabled) *bool* 56 * [address](#api-address) *string* 57 * [websocketaddress](#api-websocketaddress) *string* 58 * [readonly](#readonly) *bool* 59 * [urlroot](#urlroot) *string* 60 * [tls](#tls) *string* 61 * [proxyforcehttps](#proxyforcehttps) *string* 62 * [allowedorigins](#allowedorigins) *array* 63 * [webapp](#webapp) *object* 64 * [enabled](#webapp-enabled) *bool* 65 * [port](#webapp-port) *string* 66 * [analyticstoken](#analyticstoken) *string* 67 * [scripts](#scripts) *array* 68 * [rpc](#rpc) *object* 69 * [enabled](#rpc-enabled) *bool* 70 * [address](#rpc-address) *string* 71 * [logging](#logging) *object* 72 * [levels](#levels) *object* 73 * [qriapi](#qriapi) *string* 74 75 ----- 76 # Profile 77 78 Your profile contains some hairy stuff you shouldn't change once it is set initially. 79 80 **We strongly recommend you don't change your privkey, ID, and peername.** 81 82 Created and updated are the timestamps that your profile was created and updated. These will be set automatically, we suggest you don't change these either. 83 84 Type, email, name, description, homeurl, color, twitter, and profile and poster photo we strongly encourage you to update! 85 86 ----- 87 ## ID 88 *Profile ID* 89 Your id is your identity on Qri and it is set when you first run `qri setup` or `qri connect --setup`. Your datasets, your qri nodes, your profile, your identity to your peers are all tied to this profile id. Changing this is bad news bears and will break everything. 90 91 **DO NOT CHANGE** 92 93 ----- 94 ## privkey 95 *private key* 96 Your private key is generated when you first run `qri setup` or `qri connect --setup`. 97 98 **DO NOT PUBLISH THIS ANYWHERE**. 99 100 Your private key is a form of security. If anyone else has your private key, they can pretend to be you. Also bad news bears to change this. 101 102 ----- 103 ## peername 104 Your moniker on qri. The name that is associated with your profile and datasets. 105 106 Let's say your peername is lunalovegood7 (for some reason), and a dataset of yours called best_harry_potter_quotes_ranked. 107 ``` 108 # a peer would get your profile info by: 109 $ qri peers lunalovegood74 110 111 # and get info on your super important dataset using 112 $ qri info lunalovegood7/best_harry_potter_quotes_ranked 113 ``` 114 115 Your peername is set when you first run `qri setup` (or `qri setup --peername lunalovegood7`). 116 117 The peername will be mutable in the future, but for now changing your peername is as bad as changing your profile id. 118 119 **Do not change your peername after setup** 120 121 ----- 122 ## created 123 Date and time timestamp when the qri profile was created on setup. We recommend you do not change this field. 124 125 ----- 126 ## updated 127 Date and time timestamp when the qri profile was last updated. We recommend you do not change this field as it should auto update on any profile change. (this auto update feature might not be set yet) 128 129 ----- 130 ## type 131 *peer or organization* 132 Qri profiles can be associated with a single person or an organization. 133 134 **Input options** (*string*): `peer`, `organization` 135 136 **Commands:** 137 ``` 138 $ qri config get profile.type 139 140 $ qri config set profile.type peer 141 ``` 142 143 ----- 144 ## email 145 An email address to reach you. If other qri folks can reach you, it will greatly strengthen their trust in yoru datasets. 146 147 **Input options** (*string*): valid email address 148 149 **Commands:** 150 ``` 151 $ qri config get profile.email 152 153 $ qri config set profile.email example@example.com 154 ``` 155 156 ----- 157 ## name 158 Your name or organizations name. 159 160 **Input options** (*string*): max 255 character length 161 162 **Commands:** 163 ``` 164 $ qri config get profile.name 165 166 $ qri config set profile.name Jane Doe 167 ``` 168 169 ----- 170 ## description 171 A little bio about you or your organization. Can help other users understand the types of data you are interested in. 172 173 **Input options** (*string*): max 255 character length 174 175 **Commands:** 176 ``` 177 $ qri config get profile.description 178 179 $ qri config set profile.description "Hi my name is Jane Doe and I am a researcher in the field of loving Harry Potter. I am interested data surrounding the behavior of those who love Harry Potter as much as I do" 180 ``` 181 182 ----- 183 ## homeurl 184 You or your organization's website. 185 186 **Input options** (*string*): valid url 187 188 **Commands:** 189 ``` 190 $ qri config get profile.homeurl 191 192 $ qri config set profile.homeurl https://harrypotterlover.com 193 ``` 194 195 ----- 196 ## color 197 The theme color your prefer when viewing Qri using the webapp. This will expand, but for now the only option is 'default' 198 199 **Input options** (*string*): `default` 200 201 **Commands:** 202 ``` 203 $ qri config get profile.color 204 205 $ qri config set profile.color default 206 ``` 207 208 ----- 209 ## thumb 210 *thumbnail photo* 211 Your thumbnail photo is auto generated using the profile photo uploaded. We recommend not setting this yourself. 212 213 ----- 214 ## profile photo 215 Upload a profile photo using a filepath, url, or ipfs hash. This photo is used on the Qri webapp. 216 217 **Input options** (*string*): valid url, valid filepath, or valid ipfs hash 218 219 **Commands:** 220 ``` 221 $ qri config get profile.profile 222 223 $ qri config set profile.profile ~/Documents/pictures/headshot.jpeg 224 ``` 225 226 ----- 227 ## poster photo 228 Upload a poster photo (the backdrop to your profile). This photo is used on the Qri webapp. 229 230 **Input options** (*string*): valid url, valid filepath, or valid ipfs hash 231 232 **Commands:** 233 ``` 234 $ qri config get profile.poster 235 236 $ qri config set profile.poster http://www.imgur.com/pic_of_sunset_i_took_one_time.jpeg 237 ``` 238 239 ----- 240 ## twitter 241 *twitter handle* 242 You or your organization's twitter handle. No need to include the `@` symbol. 243 244 **Input options** (*string*): valid twitter handle (max length 15) 245 246 **Commands:** 247 ``` 248 $ qri config get profile.twitter 249 250 $ qri config set profile.twitter lunalovegood7 251 ``` 252 253 ----- 254 255 . 256 257 ----- 258 # repo 259 260 The repo config controls how references to your datasets are stored and (in the future) what additional middleware you want to use when you store it. We don't recommend messing with these, as improper changes can break Qri. 261 262 263 ----- 264 ## middleware 265 Middleware is a list of packages that can be used to supliment the process of saving data to Qri. Currently not implemented, but in the future could potentially add encryption middleware, or back up middleware. 266 267 **Input options** (*array of strings*): not currently implemented 268 269 ----- 270 ## repo type 271 The type of filestore used to store the references to your data and profile. 272 273 **Input options** (*string*): `fs` (currently, any string other string will not work) 274 275 **Commands:** 276 ``` 277 $ qri config get repo.type 278 279 $ qri config set repo.type fs 280 ``` 281 282 ----- 283 284 . 285 286 ----- 287 # Store 288 289 Where and how the datasets are stored. 290 291 292 ----- 293 ## store type 294 Where your datasets are stored. 295 296 **Input options** (*string*): `ipfs` (currently, any string other string will not work) 297 298 **Commands:** 299 ``` 300 $ qri config get store.type 301 302 $ qri config set store.type ipfs 303 ``` 304 305 ----- 306 307 . 308 309 ----- 310 # p2p 311 312 The p2p config should go unchanged. This config section gives you options to change the way your qri node communicates with other qri nodes. 313 314 **We strongly recommend you don't change any of these fields but especially not your privkey, pubkey, and peerid.** 315 316 317 ----- 318 ## p2p enabled 319 Is p2p communication enabled? Probs keep this on if you want any of the benefits of being on the distributed web. 320 321 **Input options** (*boolean*): `true` or `false` 322 323 **Commands:** 324 ``` 325 $ qri config get p2p.enabled 326 327 $ qri config set p2p.enabled true 328 ``` 329 330 ----- 331 ## p2p peerid 332 The id of this specific node on the network. This will eventually be different from your profile.ID, which is meant to be the identity of all the nodes associated with your profile on the network (eg, if you have qri on two different computers, or on your phone, or tablet) 333 334 This is set when you run `qri setup` 335 336 It is associated with your private key and public key, so changes any of them will mess up your p2p communication. 337 338 **DO NOT CHANGE** 339 340 ----- 341 ## p2p privkey 342 *private key* 343 Your private key is generated when you first run `qri setup` or `qri connect --setup`. 344 345 **DO NOT PUBLISH THIS ANYWHERE**. 346 347 Your private key is a form of security. If anyone else has your private key, they can pretend to be you. 348 349 It is associated with your public key and peerid, so changes any of them will mess up your p2p communication. 350 351 **DO NOT CHANGE** 352 353 ----- 354 ## pubkey 355 *public key* 356 Your public key is what you exchange with peers in order to encrypt your messages and prove your identity. 357 358 It is associated with your private key and peerid, so changes any of them will mess up your p2p communication. 359 360 **DO NOT CHANGE** 361 362 ----- 363 ## p2p port 364 The port to bind a tcp listener. Ignored if Addrs is supplied 365 366 **Input options** (*integer*): integer 367 368 **Commands:** 369 ``` 370 $ qri config get p2p.port 371 372 $ qri config set p2p.port 0 373 ``` 374 375 ----- 376 ## addrs 377 List of multiaddresses to listen on 378 379 **Input options** (*list of addresses*): list of multiadders 380 381 **Commands:** 382 ``` 383 $ qri config get p2p.addrs 384 385 $ qri config set p2p.addrs /ip4/130.211.198.23/tcp/4001/ipfs/QmNX9nSos8sRFvqGTwdEme6LQ8R1eJ8EuFgW32F9jjp2Pb 386 ``` 387 388 ----- 389 ## qribootstrapaddrs 390 QriBootstrapAddrs lists the addresses to bootstrap you Qri node from. If you change this list, it will take your node a longer time to connect to the Qri network. 391 392 **Input options** (*list of addresses*): list of multiaddrs 393 394 **Commands:** 395 ``` 396 $ qri config get p2p.qribootstrapaddrs 397 398 $ qri config set p2p.qribootstrapaddrs /ip4/130.211.198.23/tcp/4001/ipfs/QmNX9nSos8sRFvqGTwdEme6LQ8R1eJ8EuFgW32F9jjp2Pb 399 ``` 400 401 ----- 402 ## profilereplication 403 Profilereplication determines waht to do when this peer sees messages broadcast by it's own profile (from another peer instance). Setting profilereplication to `full` will cause this peer to automatically pin any data that is verifyably posted the same peer 404 405 **Input options** (*string*): `full` 406 407 **Commands:** 408 ``` 409 $ qri config get p2p.profilereplication 410 411 $ qri config set p2p.profilereplication full 412 ``` 413 414 ----- 415 ## bootstrapaddrs 416 List of addresses to bootstrap qri peers on. 417 418 **Input options** (*list of addresses*): list of multiaddrs 419 420 **Commands:** 421 ``` 422 $ qri config get p2p.bootstrapaddrs 423 424 $ qri config set p2p.bootstrapaddrs /ip4/130.211.198.23/tcp/4001/ipfs/QmNX9nSos8sRFvqGTwdEme6LQ8R1eJ8EuFgW32F9jjp2Pb 425 ``` 426 427 ----- 428 429 . 430 431 ----- 432 # cli 433 434 cli is the config for the command line interface 435 436 437 ----- 438 ## colorizeoutput 439 When true, the output to your terminal will be colorized. 440 441 **Input options** (*boolean*): `true` or `false` 442 443 **Commands:** 444 ``` 445 $ qri config get cli.colorizeoutput 446 447 $ qri config set p2p.colorizeoutput true 448 ``` 449 450 ----- 451 452 . 453 454 ----- 455 # api 456 457 Config for the API server. 458 459 460 ----- 461 ## api enabled 462 When true, the api server is enabled when you run `qri connect` 463 464 The api must be enabled and set to port 2503 in order to work locally with the frontend webapp 465 466 **Input options** (*boolean*): `true` or `false` 467 468 **Commands:** 469 ``` 470 $ qri config get api.enabled 471 472 $ qri config set api.enabled true 473 ``` 474 475 ----- 476 ## api address 477 The api will listen for calls at this address. 478 479 The api must be enabled and set to the address /ip4/tcp/2503 in order to work locally with the frontend webapp. 480 481 **Input options** (*string*): 482 483 **Commands:** 484 ``` 485 $ qri config get api.address 486 487 $ qri config set api.address /ip4/tcp/2503 488 ``` 489 490 ----- 491 ## api websocketaddress 492 The api will listen for websocket calls at this address. 493 494 The api must be enabled and set to the address /ip4/tcp/2506 in order to work locally with the frontend webapp. 495 496 **Input options** (*string*): 497 498 **Commands:** 499 ``` 500 $ qri config get api.websocketaddress 501 502 $ qri config set api.websocketaddress /ip4/tcp/2506 503 ``` 504 505 ----- 506 ## readonly 507 When true, the api will only respond to certain GET requests. Doesn't allow any calls that will amend, save, add, or delete datasets or profile information. 508 509 **Input options** (*boolean*): `true` and `false` 510 511 **Commands:** 512 ``` 513 $ qri config get api.readonly 514 515 $ qri config set api.readonly false 516 ``` 517 518 ----- 519 520 . 521 522 ----- 523 # webapp 524 525 Config for the API server. 526 527 528 ----- 529 ## webapp enabled 530 When true, if your node is connected (`qri connect`) you can go to `localhost:2505` in your browser to view the webapp. 531 532 The api must be enabled and set to port 2503 in order to work locally with the frontend webapp 533 534 **Input options** (*boolean*): `true` or `false` 535 536 **Commands:** 537 ``` 538 $ qri config get api.enabled 539 540 $ qri config set api.enabled true 541 ``` 542 543 ----- 544 ## webapp port 545 The api will listen for calls at this port. 546 547 The api must be enabled and set to port 2503 in order to work locally with the frontend webapp. 548 549 **Input options** (*integer*): 550 551 **Commands:** 552 ``` 553 $ qri config get api.port 554 555 $ qri config set api.port 2503 556 ``` 557 558 ----- 559 560 . 561 562 ----- 563 # rpc 564 565 Config for the RPC listener. 566 567 568 ----- 569 ## rpc enabled 570 When true, rpc connections are enabled. 571 572 **Input options** (*boolean*): `true` or `false` 573 574 **Commands:** 575 ``` 576 $ qri config get rpc.enabled 577 578 $ qri config set rpc.enabled true 579 ``` 580 581 ----- 582 ## rpc address 583 The rpc will listen for calls at this address. Qri standard is 2504. 584 585 **Input options** (*string*): 586 587 **Commands:** 588 ``` 589 $ qri config get rpc.address 590 591 $ qri config set rpc.address /ip4/tcp/2504 592 ``` 593 594 ----- 595 596 . 597 598 ----- 599 # logging 600 601 Config for the logger. 602 603 604 ----- 605 ## levels 606 607 The different log levels can be set in this object 608 609 ### - qriapi 610 611 Log levels for the api 612 613 **Input options** (*string*): `info`, `error`, `debug`, `warn` 614 615 **Commands:** 616 ``` 617 $ qri config get logging.levels.qriapi.info 618 619 $ qri config set logging.levels {"qriapi":"info"} 620 ``` 621 622 -----