description.exs 110 KB
Newer Older
Alexander Strizhakov's avatar
Alexander Strizhakov committed
1
use Mix.Config
Alexander Strizhakov's avatar
Alexander Strizhakov committed
2
alias Pleroma.Docs.Generator
Alexander Strizhakov's avatar
Alexander Strizhakov committed
3
4
5
6
7
8
9
10
11
12
13
14

websocket_config = [
  path: "/websocket",
  serializer: [
    {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
    {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
  ],
  timeout: 60_000,
  transport_log: false,
  compress: false
]

lain's avatar
lain committed
15
installed_frontend_options = [
lain's avatar
lain committed
16
17
  %{
    key: "name",
18
    label: "Name",
lain's avatar
lain committed
19
    type: :string,
20
    description:
lain's avatar
lain committed
21
      "Name of the installed frontend. Valid config must include both `Name` and `Reference` values."
lain's avatar
lain committed
22
23
24
  },
  %{
    key: "ref",
25
    label: "Reference",
lain's avatar
lain committed
26
    type: :string,
27
    description:
lain's avatar
lain committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
      "Reference of the installed frontend to be used. Valid config must include both `Name` and `Reference` values."
  }
]

frontend_options = [
  %{
    key: "name",
    label: "Name",
    type: :string,
    description: "Name of the frontend."
  },
  %{
    key: "ref",
    label: "Reference",
    type: :string,
    description: "Reference of the frontend to be used."
lain's avatar
lain committed
44
45
46
  },
  %{
    key: "git",
Angelina Filippova's avatar
Angelina Filippova committed
47
    label: "Git Repository URL",
lain's avatar
lain committed
48
49
50
51
52
    type: :string,
    description: "URL of the git repository of the frontend"
  },
  %{
    key: "build_url",
53
    label: "Build URL",
lain's avatar
lain committed
54
55
56
57
58
59
60
    type: :string,
    description:
      "Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.",
    example: "https://some.url/builds/${ref}.zip"
  },
  %{
    key: "build_dir",
Angelina Filippova's avatar
Angelina Filippova committed
61
    label: "Build directory",
lain's avatar
lain committed
62
63
64
65
66
    type: :string,
    description: "The directory inside the zip file "
  }
]

Alexander Strizhakov's avatar
Alexander Strizhakov committed
67
68
69
70
71
72
73
74
75
76
77
config :pleroma, :config_description, [
  %{
    group: :pleroma,
    key: Pleroma.Upload,
    type: :group,
    description: "Upload general settings",
    children: [
      %{
        key: :uploader,
        type: :module,
        description: "Module which will be used for uploads",
78
        suggestions: {:list_behaviour_implementations, Pleroma.Uploaders.Uploader}
Alexander Strizhakov's avatar
Alexander Strizhakov committed
79
80
81
82
      },
      %{
        key: :filters,
        type: {:list, :module},
83
        description:
84
          "List of filter modules for uploads. Module names are shortened (removed leading `Pleroma.Upload.Filter.` part), but on adding custom module you need to use full name.",
85
        suggestions: {:list_behaviour_implementations, Pleroma.Upload.Filter}
Alexander Strizhakov's avatar
Alexander Strizhakov committed
86
87
88
89
      },
      %{
        key: :link_name,
        type: :boolean,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
90
        description:
91
          "If enabled, a name parameter will be added to the URL of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
Alexander Strizhakov's avatar
Alexander Strizhakov committed
92
93
94
      },
      %{
        key: :base_url,
95
        label: "Base URL",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
96
        type: :string,
97
        description: "Base URL for the uploads, needed if you use CDN",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
98
99
100
101
102
103
104
        suggestions: [
          "https://cdn-host.com"
        ]
      },
      %{
        key: :proxy_remote,
        type: :boolean,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
105
        description:
106
          "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
107
108
109
      },
      %{
        key: :proxy_opts,
110
        label: "Proxy Options",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
111
        type: :keyword,
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
        description: "Options for Pleroma.ReverseProxy",
        suggestions: [
          redirect_on_failure: false,
          max_body_length: 25 * 1_048_576,
          http: [
            follow_redirect: true,
            pool: :media
          ]
        ],
        children: [
          %{
            key: :redirect_on_failure,
            type: :boolean,
            description:
              "Redirects the client to the real remote URL if there's any HTTP errors. " <>
127
                "Any error during body processing will not be redirected as the response is chunked."
128
129
130
131
132
          },
          %{
            key: :max_body_length,
            type: :integer,
            description:
133
134
              "Limits the content length to be approximately the " <>
                "specified length. It is validated with the `content-length` header and also verified when proxying."
135
136
137
          },
          %{
            key: :http,
138
            label: "HTTP",
139
140
141
142
143
144
            type: :keyword,
            description: "HTTP options",
            children: [
              %{
                key: :adapter,
                type: :keyword,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
145
146
147
148
149
150
151
152
153
154
155
                description: "Adapter specific options",
                children: [
                  %{
                    key: :ssl_options,
                    type: :keyword,
                    label: "SSL Options",
                    description: "SSL options for HTTP adapter",
                    children: [
                      %{
                        key: :versions,
                        type: {:list, :atom},
feld's avatar
feld committed
156
                        description: "List of TLS versions to use",
157
                        suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
Alexander Strizhakov's avatar
Alexander Strizhakov committed
158
159
160
161
                      }
                    ]
                  }
                ]
162
163
164
165
166
167
168
169
170
171
172
              },
              %{
                key: :proxy_url,
                label: "Proxy URL",
                type: [:string, :tuple],
                description: "Proxy URL",
                suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
              }
            ]
          }
        ]
Roman Chvanikov's avatar
Roman Chvanikov committed
173
174
175
176
177
      },
      %{
        key: :filename_display_max_length,
        type: :integer,
        description: "Set max length of a filename to display. 0 = no limit. Default: 30"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
178
179
180
181
182
183
184
185
186
187
188
189
      }
    ]
  },
  %{
    group: :pleroma,
    key: Pleroma.Uploaders.Local,
    type: :group,
    description: "Local uploader-related settings",
    children: [
      %{
        key: :uploads,
        type: :string,
190
        description: "Path where user's uploads will be saved",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
191
192
193
194
195
196
197
198
199
200
201
202
203
204
        suggestions: [
          "uploads"
        ]
      }
    ]
  },
  %{
    group: :pleroma,
    key: Pleroma.Uploaders.S3,
    type: :group,
    description: "S3 uploader-related settings",
    children: [
      %{
        key: :bucket,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
205
        type: :string,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
        description: "S3 bucket",
        suggestions: [
          "bucket"
        ]
      },
      %{
        key: :bucket_namespace,
        type: :string,
        description: "S3 bucket namespace",
        suggestions: ["pleroma"]
      },
      %{
        key: :public_endpoint,
        type: :string,
        description: "S3 endpoint",
        suggestions: ["https://s3.amazonaws.com"]
      },
      %{
        key: :truncated_namespace,
        type: :string,
        description:
          "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
228
            " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint."
229
230
231
232
233
234
      },
      %{
        key: :streaming_enabled,
        type: :boolean,
        description:
          "Enable streaming uploads, when enabled the file will be sent to the server in chunks as it's being read. This may be unsupported by some providers, try disabling this if you have upload problems."
Alexander Strizhakov's avatar
Alexander Strizhakov committed
235
236
237
238
239
240
241
242
243
244
245
246
      }
    ]
  },
  %{
    group: :pleroma,
    key: Pleroma.Upload.Filter.Mogrify,
    type: :group,
    description: "Uploads mogrify filter settings",
    children: [
      %{
        key: :args,
        type: [:string, {:list, :string}, {:list, :tuple}],
247
248
        description:
          "List of actions for the mogrify command. It's possible to add self-written settings as string. " <>
249
            "For example `auto-orient, strip, {\"resize\", \"3840x1080>\"}` value will be parsed into valid list of the settings.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
250
251
        suggestions: [
          "strip",
252
253
          "auto-orient",
          {"implode", "1"}
Alexander Strizhakov's avatar
Alexander Strizhakov committed
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
        ]
      }
    ]
  },
  %{
    group: :pleroma,
    key: Pleroma.Upload.Filter.AnonymizeFilename,
    type: :group,
    description: "Filter replaces the filename of the upload",
    children: [
      %{
        key: :text,
        type: :string,
        description:
          "Text to replace filenames in links. If no setting, {random}.extension will be used. You can get the original" <>
269
            " filename extension by using {extension}, for example custom-file-name.{extension}.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
270
        suggestions: [
271
          "custom-file-name.{extension}"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
272
273
274
275
        ]
      }
    ]
  },
276
277
278
279
280
281
282
283
284
285
286
287
288
  %{
    group: :pleroma,
    key: :fed_sockets,
    type: :group,
    description: "Websocket based federation",
    children: [
      %{
        key: :enabled,
        type: :boolean,
        description: "Enable FedSockets"
      }
    ]
  },
Alexander Strizhakov's avatar
Alexander Strizhakov committed
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
  %{
    group: :pleroma,
    key: Pleroma.Emails.Mailer,
    type: :group,
    description: "Mailer-related settings",
    children: [
      %{
        key: :adapter,
        type: :module,
        description:
          "One of the mail adapters listed in [Swoosh readme](https://github.com/swoosh/swoosh#adapters)," <>
            " or Swoosh.Adapters.Local for in-memory mailbox",
        suggestions: [
          Swoosh.Adapters.SMTP,
          Swoosh.Adapters.Sendgrid,
          Swoosh.Adapters.Sendmail,
          Swoosh.Adapters.Mandrill,
          Swoosh.Adapters.Mailgun,
          Swoosh.Adapters.Mailjet,
          Swoosh.Adapters.Postmark,
          Swoosh.Adapters.SparkPost,
          Swoosh.Adapters.AmazonSES,
          Swoosh.Adapters.Dyn,
          Swoosh.Adapters.SocketLabs,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
313
314
          Swoosh.Adapters.Gmail,
          Swoosh.Adapters.Local
Alexander Strizhakov's avatar
Alexander Strizhakov committed
315
316
317
318
319
        ]
      },
      %{
        key: :enabled,
        type: :boolean,
320
        description: "Allow/disallow send emails"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SMTP},
        key: :relay,
        type: :string,
        description: "`Swoosh.Adapters.SMTP` adapter specific setting",
        suggestions: ["smtp.gmail.com"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SMTP},
        key: :username,
        type: :string,
        description: "`Swoosh.Adapters.SMTP` adapter specific setting",
        suggestions: ["pleroma"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SMTP},
        key: :password,
        type: :string,
        description: "`Swoosh.Adapters.SMTP` adapter specific setting",
        suggestions: ["password"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SMTP},
        key: :ssl,
346
        label: "SSL",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
347
        type: :boolean,
348
        description: "`Swoosh.Adapters.SMTP` adapter specific setting"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
349
350
351
352
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SMTP},
        key: :tls,
353
        label: "TLS",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
        type: :atom,
        description: "`Swoosh.Adapters.SMTP` adapter specific setting",
        suggestions: [:always, :never, :if_available]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SMTP},
        key: :auth,
        type: :atom,
        description: "`Swoosh.Adapters.SMTP` adapter specific setting",
        suggestions: [:always, :never, :if_available]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SMTP},
        key: :port,
        type: :integer,
        description: "`Swoosh.Adapters.SMTP` adapter specific setting",
        suggestions: [1025]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SMTP},
        key: :retries,
        type: :integer,
        description: "`Swoosh.Adapters.SMTP` adapter specific setting",
        suggestions: [5]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SMTP},
        key: :no_mx_lookups,
382
        label: "No MX lookups",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
383
        type: :boolean,
384
        description: "`Swoosh.Adapters.SMTP` adapter specific setting"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
385
386
387
388
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Sendgrid},
        key: :api_key,
389
        label: "API key",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
        type: :string,
        description: "`Swoosh.Adapters.Sendgrid` adapter specific setting",
        suggestions: ["my-api-key"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Sendmail},
        key: :cmd_path,
        type: :string,
        description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
        suggestions: ["/usr/bin/sendmail"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Sendmail},
        key: :cmd_args,
        type: :string,
        description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
        suggestions: ["-N delay,failure,success"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Sendmail},
        key: :qmail,
        type: :boolean,
412
        description: "`Swoosh.Adapters.Sendmail` adapter specific setting"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
413
414
415
416
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Mandrill},
        key: :api_key,
417
        label: "API key",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
418
419
420
421
422
423
424
        type: :string,
        description: "`Swoosh.Adapters.Mandrill` adapter specific setting",
        suggestions: ["my-api-key"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Mailgun},
        key: :api_key,
425
        label: "API key",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
426
427
428
429
430
431
432
433
434
435
436
437
438
439
        type: :string,
        description: "`Swoosh.Adapters.Mailgun` adapter specific setting",
        suggestions: ["my-api-key"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Mailgun},
        key: :domain,
        type: :string,
        description: "`Swoosh.Adapters.Mailgun` adapter specific setting",
        suggestions: ["pleroma.com"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Mailjet},
        key: :api_key,
440
        label: "API key",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
441
442
443
444
445
446
447
448
449
450
451
452
453
454
        type: :string,
        description: "`Swoosh.Adapters.Mailjet` adapter specific setting",
        suggestions: ["my-api-key"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Mailjet},
        key: :secret,
        type: :string,
        description: "`Swoosh.Adapters.Mailjet` adapter specific setting",
        suggestions: ["my-secret-key"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Postmark},
        key: :api_key,
455
        label: "API key",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
456
457
458
459
460
461
462
        type: :string,
        description: "`Swoosh.Adapters.Postmark` adapter specific setting",
        suggestions: ["my-api-key"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SparkPost},
        key: :api_key,
463
        label: "API key",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
464
465
466
467
468
469
470
471
472
473
474
475
476
477
        type: :string,
        description: "`Swoosh.Adapters.SparkPost` adapter specific setting",
        suggestions: ["my-api-key"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SparkPost},
        key: :endpoint,
        type: :string,
        description: "`Swoosh.Adapters.SparkPost` adapter specific setting",
        suggestions: ["https://api.sparkpost.com/api/v1"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.AmazonSES},
        key: :region,
478
        type: :string,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
        description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
        suggestions: ["us-east-1", "us-east-2"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.AmazonSES},
        key: :access_key,
        type: :string,
        description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
        suggestions: ["aws-access-key"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.AmazonSES},
        key: :secret,
        type: :string,
        description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
        suggestions: ["aws-secret-key"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Dyn},
        key: :api_key,
499
        label: "API key",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
500
501
502
503
504
505
506
507
        type: :string,
        description: "`Swoosh.Adapters.Dyn` adapter specific setting",
        suggestions: ["my-api-key"]
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SocketLabs},
        key: :server_id,
        type: :string,
508
        description: "`Swoosh.Adapters.SocketLabs` adapter specific setting"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
509
510
511
512
      },
      %{
        group: {:subgroup, Swoosh.Adapters.SocketLabs},
        key: :api_key,
513
        label: "API key",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
514
        type: :string,
515
        description: "`Swoosh.Adapters.SocketLabs` adapter specific setting"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
516
517
518
519
520
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Gmail},
        key: :access_token,
        type: :string,
521
        description: "`Swoosh.Adapters.Gmail` adapter specific setting"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
522
523
524
      }
    ]
  },
Alexander Strizhakov's avatar
Alexander Strizhakov committed
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
  %{
    group: :swoosh,
    type: :group,
    description: "`Swoosh.Adapters.Local` adapter specific settings",
    children: [
      %{
        group: {:subgroup, Swoosh.Adapters.Local},
        key: :serve_mailbox,
        type: :boolean,
        description: "Run the preview server together as part of your app"
      },
      %{
        group: {:subgroup, Swoosh.Adapters.Local},
        key: :preview_port,
        type: :integer,
        description: "The preview server port",
        suggestions: [4001]
      }
    ]
  },
Alexander Strizhakov's avatar
Alexander Strizhakov committed
545
546
547
  %{
    group: :pleroma,
    key: :uri_schemes,
548
    label: "URI Schemes",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
549
550
551
552
553
554
555
556
    type: :group,
    description: "URI schemes related settings",
    children: [
      %{
        key: :valid_schemes,
        type: {:list, :string},
        description: "List of the scheme part that is considered valid to be an URL",
        suggestions: [
557
558
559
560
561
          "https",
          "http",
          "dat",
          "dweb",
          "gopher",
DYM's avatar
DYM committed
562
          "hyper",
563
564
565
566
567
568
569
570
571
          "ipfs",
          "ipns",
          "irc",
          "ircs",
          "magnet",
          "mailto",
          "mumble",
          "ssb",
          "xmpp"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
        ]
      }
    ]
  },
  %{
    group: :pleroma,
    key: :instance,
    type: :group,
    description: "Instance-related settings",
    children: [
      %{
        key: :name,
        type: :string,
        description: "Name of the instance",
        suggestions: [
          "Pleroma"
        ]
      },
      %{
        key: :email,
592
        label: "Admin Email Address",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
593
594
595
596
597
598
599
600
        type: :string,
        description: "Email used to reach an Administrator/Moderator of the instance",
        suggestions: [
          "email@example.com"
        ]
      },
      %{
        key: :notify_email,
601
        label: "Sender Email Address",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
602
        type: :string,
603
        description: "Envelope FROM address for mail sent via Pleroma",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
604
605
606
607
608
609
610
        suggestions: [
          "notify@example.com"
        ]
      },
      %{
        key: :description,
        type: :string,
feld's avatar
feld committed
611
612
        description:
          "The instance's description. It can be seen in nodeinfo and `/api/v1/instance`",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
613
614
615
616
617
618
619
620
621
622
623
624
        suggestions: [
          "Very cool instance"
        ]
      },
      %{
        key: :limit,
        type: :integer,
        description: "Posts character limit (CW/Subject included in the counter)",
        suggestions: [
          5_000
        ]
      },
625
626
627
628
629
630
631
632
      %{
        key: :chat_limit,
        type: :integer,
        description: "Character limit of the instance chat messages",
        suggestions: [
          5_000
        ]
      },
Alexander Strizhakov's avatar
Alexander Strizhakov committed
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
      %{
        key: :remote_limit,
        type: :integer,
        description: "Hard character limit beyond which remote posts will be dropped",
        suggestions: [
          100_000
        ]
      },
      %{
        key: :upload_limit,
        type: :integer,
        description: "File size limit of uploads (except for avatar, background, banner)",
        suggestions: [
          16_000_000
        ]
      },
      %{
        key: :avatar_upload_limit,
        type: :integer,
        description: "File size limit of user's profile avatars",
        suggestions: [
          2_000_000
        ]
      },
      %{
        key: :background_upload_limit,
        type: :integer,
        description: "File size limit of user's profile backgrounds",
        suggestions: [
          4_000_000
        ]
      },
      %{
        key: :banner_upload_limit,
        type: :integer,
        description: "File size limit of user's profile banners",
        suggestions: [
          4_000_000
        ]
      },
      %{
        key: :poll_limits,
        type: :map,
        description: "A map with poll limits for local polls",
        suggestions: [
          %{
            max_options: 20,
            max_option_chars: 200,
            min_expiration: 0,
            max_expiration: 31_536_000
          }
        ],
        children: [
          %{
            key: :max_options,
            type: :integer,
            description: "Maximum number of options",
            suggestions: [20]
          },
          %{
            key: :max_option_chars,
            type: :integer,
            description: "Maximum number of characters per option",
            suggestions: [200]
          },
          %{
            key: :min_expiration,
            type: :integer,
            description: "Minimum expiration time (in seconds)",
            suggestions: [0]
          },
          %{
            key: :max_expiration,
            type: :integer,
            description: "Maximum expiration time (in seconds)",
            suggestions: [3600]
          }
        ]
      },
      %{
        key: :registrations_open,
        type: :boolean,
feld's avatar
feld committed
715
716
        description:
          "Enable registrations for anyone. Invitations require this setting to be disabled."
Alexander Strizhakov's avatar
Alexander Strizhakov committed
717
718
719
720
      },
      %{
        key: :invites_enabled,
        type: :boolean,
feld's avatar
feld committed
721
        description:
722
          "Enable user invitations for admins (depends on `registrations_open` being disabled)"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
723
724
725
726
      },
      %{
        key: :account_activation_required,
        type: :boolean,
727
        description: "Require users to confirm their emails before signing in"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
728
      },
729
730
731
732
733
      %{
        key: :account_approval_required,
        type: :boolean,
        description: "Require users to be manually approved by an admin before signing in"
      },
Alexander Strizhakov's avatar
Alexander Strizhakov committed
734
735
736
      %{
        key: :federating,
        type: :boolean,
737
        description: "Enable federation with other instances"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
738
739
740
      },
      %{
        key: :federation_incoming_replies_max_depth,
741
        label: "Fed. incoming replies max depth",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
742
743
        type: :integer,
        description:
744
          "Max. depth of reply-to and reply activities fetching on incoming federation, to prevent out-of-memory situations while" <>
745
            " fetching very long threads. If set to `nil`, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
746
747
748
749
750
751
        suggestions: [
          100
        ]
      },
      %{
        key: :federation_reachability_timeout_days,
752
        label: "Fed. reachability timeout days",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
753
754
        type: :integer,
        description:
755
          "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
756
757
758
759
760
761
762
        suggestions: [
          7
        ]
      },
      %{
        key: :allow_relay,
        type: :boolean,
763
        description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
764
765
766
767
768
      },
      %{
        key: :public,
        type: :boolean,
        description:
769
770
771
          "Makes the client API in authenticated mode-only except for user-profiles." <>
            " Useful for disabling the Local Timeline and The Whole Known Network. " <>
            " Note: when setting to `false`, please also check `:restrict_unauthenticated` setting."
Alexander Strizhakov's avatar
Alexander Strizhakov committed
772
773
774
775
776
      },
      %{
        key: :quarantined_instances,
        type: {:list, :string},
        description:
feld's avatar
feld committed
777
          "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
        suggestions: [
          "quarantined.com",
          "*.quarantined.com"
        ]
      },
      %{
        key: :static_dir,
        type: :string,
        description: "Instance static directory",
        suggestions: [
          "instance/static/"
        ]
      },
      %{
        key: :allowed_post_formats,
        type: {:list, :string},
        description: "MIME-type list of formats allowed to be posted (transformed into HTML)",
        suggestions: [
Alexander Strizhakov's avatar
Alexander Strizhakov committed
796
797
798
799
          "text/plain",
          "text/html",
          "text/markdown",
          "text/bbcode"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
800
801
802
803
804
805
        ]
      },
      %{
        key: :extended_nickname_format,
        type: :boolean,
        description:
feld's avatar
feld committed
806
          "Enable to use extended local nicknames format (allows underscores/dashes)." <>
807
            " This will break federation with older software for theses nicknames."
Alexander Strizhakov's avatar
Alexander Strizhakov committed
808
      },
809
810
811
812
      %{
        key: :cleanup_attachments,
        type: :boolean,
        description: """
feld's avatar
feld committed
813
        Enable to remove associated attachments when status is removed.
814
815
816
817
        This will not affect duplicates and attachments without status.
        Enabling this will increase load to database when deleting statuses on larger instances.
        """
      },
Alexander Strizhakov's avatar
Alexander Strizhakov committed
818
819
820
      %{
        key: :max_pinned_statuses,
        type: :integer,
821
        description: "The maximum number of pinned statuses. 0 will disable the feature.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
822
823
824
825
826
827
828
829
830
831
        suggestions: [
          0,
          1,
          3
        ]
      },
      %{
        key: :autofollowed_nicknames,
        type: {:list, :string},
        description:
832
          "Set to nicknames of (local) users that every new user should automatically follow"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
833
      },
834
835
836
837
      %{
        key: :autofollowing_nicknames,
        type: {:list, :string},
        description:
feld's avatar
feld committed
838
          "Set to nicknames of (local) users that automatically follows every newly registered user"
839
      },
Alexander Strizhakov's avatar
Alexander Strizhakov committed
840
      %{
841
        key: :attachment_links,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
842
        type: :boolean,
feld's avatar
feld committed
843
        description: "Enable to automatically add attachment link text to statuses"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
844
845
846
847
      },
      %{
        key: :max_report_comment_size,
        type: :integer,
848
        description: "The maximum size of the report comment. Default: 1000.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
849
850
851
852
853
854
        suggestions: [
          1_000
        ]
      },
      %{
        key: :safe_dm_mentions,
855
        label: "Safe DM mentions",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
856
857
        type: :boolean,
        description:
feld's avatar
feld committed
858
          "If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <>
859
            " This is to prevent accidental mentioning of people when talking about them (e.g. \"@admin please keep an eye on @bad_actor\")." <>
feld's avatar
feld committed
860
            " Default: disabled"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
861
862
863
864
      },
      %{
        key: :healthcheck,
        type: :boolean,
feld's avatar
feld committed
865
        description: "If enabled, system data will be shown on `/api/pleroma/healthcheck`"
Alexander Strizhakov's avatar
Alexander Strizhakov committed
866
867
868
869
870
871
872
873
874
875
876
877
878
      },
      %{
        key: :remote_post_retention_days,
        type: :integer,
        description:
          "The default amount of days to retain remote posts when pruning the database",
        suggestions: [
          90
        ]
      },
      %{
        key: :user_bio_length,
        type: :integer,
879
        description: "A user bio maximum length. Default: 5000.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
880
881
882
883
884
885
886
        suggestions: [
          5_000
        ]
      },
      %{
        key: :user_name_length,
        type: :integer,
887
        description: "A user name maximum length. Default: 100.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
888
889
890
891
892
893
894
        suggestions: [
          100
        ]
      },
      %{
        key: :skip_thread_containment,
        type: :boolean,
895
        description: "Skip filtering out broken threads. Default: enabled."
Alexander Strizhakov's avatar
Alexander Strizhakov committed
896
897
898
      },
      %{
        key: :limit_to_local_content,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
899
        type: {:dropdown, :atom},
Alexander Strizhakov's avatar
Alexander Strizhakov committed
900
        description:
901
          "Limit unauthenticated users to search for local statutes and users only. Default: `:unauthenticated`.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
902
903
904
905
906
907
908
909
910
        suggestions: [
          :unauthenticated,
          :all,
          false
        ]
      },
      %{
        key: :max_account_fields,
        type: :integer,
911
        description: "The maximum number of custom fields in the user profile. Default: 10.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
912
913
914
915
916
917
918
919
        suggestions: [
          10
        ]
      },
      %{
        key: :max_remote_account_fields,
        type: :integer,
        description:
920
          "The maximum number of custom fields in the remote user profile. Default: 20.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
921
922
923
924
925
926
927
        suggestions: [
          20
        ]
      },
      %{
        key: :account_field_name_length,
        type: :integer,
928
        description: "An account field name maximum length. Default: 512.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
929
930
931
932
933
934
935
        suggestions: [
          512
        ]
      },
      %{
        key: :account_field_value_length,
        type: :integer,
936
        description: "An account field value maximum length. Default: 2048.",
Alexander Strizhakov's avatar
Alexander Strizhakov committed
937
        suggestions: [
938
          2048
Alexander Strizhakov's avatar
Alexander Strizhakov committed
939
940
        ]
      },
941
942
943
944
945
946
947
948
      %{
        key: :registration_reason_length,
        type: :integer,
        description: "Maximum registration reason length. Default: 500.",
        suggestions: [
          500
        ]
      },
Alexander Strizhakov's avatar
Alexander Strizhakov committed
949
950
951
      %{
        key: :external_user_synchronization,
        type: :boolean,
952
        description: "Enabling following/followers counters synchronization for external users"
953
954
955
956
957
958
959
960
961
962
963
964
965
966
      },
      %{
        key: :multi_factor_authentication,
        type: :keyword,
        description: "Multi-factor authentication settings",
        suggestions: [
          [
            totp: [digits: 6, period: 30],
            backup_codes: [number: 5, length: 16]
          ]
        ],
        children: [
          %{
            key: :totp,
967
            label: "TOTP settings",
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
            type: :keyword,
            description: "TOTP settings",
            suggestions: [digits: 6, period: 30],
            children: [
              %{
                key: :digits,
                type: :integer,
                suggestions: [6],
                description:
                  "Determines the length of a one-time pass-code, in characters. Defaults to 6 characters."
              },
              %{
                key: :period,
                type: :integer,
                suggestions: [30],
                description:
984
                  "A period for which the TOTP code will be valid, in seconds. Defaults to 30 seconds."
985
986
987
988
989
990
991
992
993
994
995
996
997
              }
            ]
          },
          %{
            key: :backup_codes,
            type: :keyword,
            description: "MFA backup codes settings",
            suggestions: [number: 5, length: 16],
            children: [
              %{
                key: :number,
                type: :integer,
                suggestions: [5],
998
                description: "Number of backup codes to generate."
999
1000
              },
              %{
For faster browsing, not all history is shown. View entire blame