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

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
14
installed_frontend_options = [
lain's avatar
lain committed
15
16
  %{
    key: "name",
17
    label: "Name",
lain's avatar
lain committed
18
    type: :string,
19
    description:
lain's avatar
lain committed
20
      "Name of the installed frontend. Valid config must include both `Name` and `Reference` values."
lain's avatar
lain committed
21
22
23
  },
  %{
    key: "ref",
24
    label: "Reference",
lain's avatar
lain committed
25
    type: :string,
26
    description:
lain's avatar
lain committed
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
      "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
43
44
45
  },
  %{
    key: "git",
Angelina Filippova's avatar
Angelina Filippova committed
46
    label: "Git Repository URL",
lain's avatar
lain committed
47
48
49
50
51
    type: :string,
    description: "URL of the git repository of the frontend"
  },
  %{
    key: "build_url",
52
    label: "Build URL",
lain's avatar
lain committed
53
54
55
56
57
58
59
    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
60
    label: "Build directory",
lain's avatar
lain committed
61
62
    type: :string,
    description: "The directory inside the zip file "
63
64
65
66
67
68
  },
  %{
    key: "custom-http-headers",
    label: "Custom HTTP headers",
    type: {:list, :string},
    description: "The custom HTTP headers for the frontend"
lain's avatar
lain committed
69
70
71
  }
]

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