c509109115b79564f6f1a057776d261d00014f1e
[akkoma] / config / description.exs
1 use Mix.Config
2 alias Pleroma.Docs.Generator
3
4 websocket_config = [
5 path: "/websocket",
6 serializer: [
7 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
8 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
9 ],
10 timeout: 60_000,
11 transport_log: false,
12 compress: false
13 ]
14
15 frontend_options = [
16 %{
17 key: "name",
18 label: "Name",
19 type: :string,
20 description:
21 "Name of the frontend. Valid config must include both `Name` and `Reference` values."
22 },
23 %{
24 key: "ref",
25 label: "Reference",
26 type: :string,
27 description:
28 "Reference of the frontend to be used. Valid config must include both `Name` and `Reference` values."
29 },
30 %{
31 key: "git",
32 type: :string,
33 description: "URL of the git repository of the frontend"
34 },
35 %{
36 key: "build_url",
37 type: :string,
38 description:
39 "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`.",
40 example: "https://some.url/builds/${ref}.zip"
41 },
42 %{
43 key: "build_dir",
44 type: :string,
45 description: "The directory inside the zip file "
46 }
47 ]
48
49 config :pleroma, :config_description, [
50 %{
51 group: :pleroma,
52 key: Pleroma.Upload,
53 type: :group,
54 description: "Upload general settings",
55 children: [
56 %{
57 key: :uploader,
58 type: :module,
59 description: "Module which will be used for uploads",
60 suggestions: {:list_behaviour_implementations, Pleroma.Uploaders.Uploader}
61 },
62 %{
63 key: :filters,
64 type: {:list, :module},
65 description:
66 "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.",
67 suggestions: {:list_behaviour_implementations, Pleroma.Upload.Filter}
68 },
69 %{
70 key: :link_name,
71 type: :boolean,
72 description:
73 "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`."
74 },
75 %{
76 key: :base_url,
77 label: "Base URL",
78 type: :string,
79 description: "Base URL for the uploads, needed if you use CDN",
80 suggestions: [
81 "https://cdn-host.com"
82 ]
83 },
84 %{
85 key: :proxy_remote,
86 type: :boolean,
87 description:
88 "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected"
89 },
90 %{
91 key: :proxy_opts,
92 label: "Proxy Options",
93 type: :keyword,
94 description: "Options for Pleroma.ReverseProxy",
95 suggestions: [
96 redirect_on_failure: false,
97 max_body_length: 25 * 1_048_576,
98 http: [
99 follow_redirect: true,
100 pool: :media
101 ]
102 ],
103 children: [
104 %{
105 key: :redirect_on_failure,
106 type: :boolean,
107 description:
108 "Redirects the client to the real remote URL if there's any HTTP errors. " <>
109 "Any error during body processing will not be redirected as the response is chunked."
110 },
111 %{
112 key: :max_body_length,
113 type: :integer,
114 description:
115 "Limits the content length to be approximately the " <>
116 "specified length. It is validated with the `content-length` header and also verified when proxying."
117 },
118 %{
119 key: :http,
120 label: "HTTP",
121 type: :keyword,
122 description: "HTTP options",
123 children: [
124 %{
125 key: :adapter,
126 type: :keyword,
127 description: "Adapter specific options",
128 children: [
129 %{
130 key: :ssl_options,
131 type: :keyword,
132 label: "SSL Options",
133 description: "SSL options for HTTP adapter",
134 children: [
135 %{
136 key: :versions,
137 type: {:list, :atom},
138 description: "List of TLS versions to use",
139 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
140 }
141 ]
142 }
143 ]
144 },
145 %{
146 key: :proxy_url,
147 label: "Proxy URL",
148 type: [:string, :tuple],
149 description: "Proxy URL",
150 suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
151 }
152 ]
153 }
154 ]
155 },
156 %{
157 key: :filename_display_max_length,
158 type: :integer,
159 description: "Set max length of a filename to display. 0 = no limit. Default: 30"
160 }
161 ]
162 },
163 %{
164 group: :pleroma,
165 key: Pleroma.Uploaders.Local,
166 type: :group,
167 description: "Local uploader-related settings",
168 children: [
169 %{
170 key: :uploads,
171 type: :string,
172 description: "Path where user's uploads will be saved",
173 suggestions: [
174 "uploads"
175 ]
176 }
177 ]
178 },
179 %{
180 group: :pleroma,
181 key: Pleroma.Uploaders.S3,
182 type: :group,
183 description: "S3 uploader-related settings",
184 children: [
185 %{
186 key: :bucket,
187 type: :string,
188 description: "S3 bucket",
189 suggestions: [
190 "bucket"
191 ]
192 },
193 %{
194 key: :bucket_namespace,
195 type: :string,
196 description: "S3 bucket namespace",
197 suggestions: ["pleroma"]
198 },
199 %{
200 key: :public_endpoint,
201 type: :string,
202 description: "S3 endpoint",
203 suggestions: ["https://s3.amazonaws.com"]
204 },
205 %{
206 key: :truncated_namespace,
207 type: :string,
208 description:
209 "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
210 " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint."
211 },
212 %{
213 key: :streaming_enabled,
214 type: :boolean,
215 description:
216 "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."
217 }
218 ]
219 },
220 %{
221 group: :pleroma,
222 key: Pleroma.Upload.Filter.Mogrify,
223 type: :group,
224 description: "Uploads mogrify filter settings",
225 children: [
226 %{
227 key: :args,
228 type: [:string, {:list, :string}, {:list, :tuple}],
229 description:
230 "List of actions for the mogrify command. It's possible to add self-written settings as string. " <>
231 "For example `auto-orient, strip, {\"resize\", \"3840x1080>\"}` value will be parsed into valid list of the settings.",
232 suggestions: [
233 "strip",
234 "auto-orient",
235 {"implode", "1"}
236 ]
237 }
238 ]
239 },
240 %{
241 group: :pleroma,
242 key: Pleroma.Upload.Filter.AnonymizeFilename,
243 type: :group,
244 description: "Filter replaces the filename of the upload",
245 children: [
246 %{
247 key: :text,
248 type: :string,
249 description:
250 "Text to replace filenames in links. If no setting, {random}.extension will be used. You can get the original" <>
251 " filename extension by using {extension}, for example custom-file-name.{extension}.",
252 suggestions: [
253 "custom-file-name.{extension}"
254 ]
255 }
256 ]
257 },
258 %{
259 group: :pleroma,
260 key: Pleroma.Emails.Mailer,
261 type: :group,
262 description: "Mailer-related settings",
263 children: [
264 %{
265 key: :adapter,
266 type: :module,
267 description:
268 "One of the mail adapters listed in [Swoosh readme](https://github.com/swoosh/swoosh#adapters)," <>
269 " or Swoosh.Adapters.Local for in-memory mailbox",
270 suggestions: [
271 Swoosh.Adapters.SMTP,
272 Swoosh.Adapters.Sendgrid,
273 Swoosh.Adapters.Sendmail,
274 Swoosh.Adapters.Mandrill,
275 Swoosh.Adapters.Mailgun,
276 Swoosh.Adapters.Mailjet,
277 Swoosh.Adapters.Postmark,
278 Swoosh.Adapters.SparkPost,
279 Swoosh.Adapters.AmazonSES,
280 Swoosh.Adapters.Dyn,
281 Swoosh.Adapters.SocketLabs,
282 Swoosh.Adapters.Gmail,
283 Swoosh.Adapters.Local
284 ]
285 },
286 %{
287 key: :enabled,
288 type: :boolean,
289 description: "Allow/disallow send emails"
290 },
291 %{
292 group: {:subgroup, Swoosh.Adapters.SMTP},
293 key: :relay,
294 type: :string,
295 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
296 suggestions: ["smtp.gmail.com"]
297 },
298 %{
299 group: {:subgroup, Swoosh.Adapters.SMTP},
300 key: :username,
301 type: :string,
302 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
303 suggestions: ["pleroma"]
304 },
305 %{
306 group: {:subgroup, Swoosh.Adapters.SMTP},
307 key: :password,
308 type: :string,
309 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
310 suggestions: ["password"]
311 },
312 %{
313 group: {:subgroup, Swoosh.Adapters.SMTP},
314 key: :ssl,
315 label: "SSL",
316 type: :boolean,
317 description: "`Swoosh.Adapters.SMTP` adapter specific setting"
318 },
319 %{
320 group: {:subgroup, Swoosh.Adapters.SMTP},
321 key: :tls,
322 label: "TLS",
323 type: :atom,
324 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
325 suggestions: [:always, :never, :if_available]
326 },
327 %{
328 group: {:subgroup, Swoosh.Adapters.SMTP},
329 key: :auth,
330 type: :atom,
331 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
332 suggestions: [:always, :never, :if_available]
333 },
334 %{
335 group: {:subgroup, Swoosh.Adapters.SMTP},
336 key: :port,
337 type: :integer,
338 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
339 suggestions: [1025]
340 },
341 %{
342 group: {:subgroup, Swoosh.Adapters.SMTP},
343 key: :retries,
344 type: :integer,
345 description: "`Swoosh.Adapters.SMTP` adapter specific setting",
346 suggestions: [5]
347 },
348 %{
349 group: {:subgroup, Swoosh.Adapters.SMTP},
350 key: :no_mx_lookups,
351 label: "No MX lookups",
352 type: :boolean,
353 description: "`Swoosh.Adapters.SMTP` adapter specific setting"
354 },
355 %{
356 group: {:subgroup, Swoosh.Adapters.Sendgrid},
357 key: :api_key,
358 label: "API key",
359 type: :string,
360 description: "`Swoosh.Adapters.Sendgrid` adapter specific setting",
361 suggestions: ["my-api-key"]
362 },
363 %{
364 group: {:subgroup, Swoosh.Adapters.Sendmail},
365 key: :cmd_path,
366 type: :string,
367 description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
368 suggestions: ["/usr/bin/sendmail"]
369 },
370 %{
371 group: {:subgroup, Swoosh.Adapters.Sendmail},
372 key: :cmd_args,
373 type: :string,
374 description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
375 suggestions: ["-N delay,failure,success"]
376 },
377 %{
378 group: {:subgroup, Swoosh.Adapters.Sendmail},
379 key: :qmail,
380 type: :boolean,
381 description: "`Swoosh.Adapters.Sendmail` adapter specific setting"
382 },
383 %{
384 group: {:subgroup, Swoosh.Adapters.Mandrill},
385 key: :api_key,
386 label: "API key",
387 type: :string,
388 description: "`Swoosh.Adapters.Mandrill` adapter specific setting",
389 suggestions: ["my-api-key"]
390 },
391 %{
392 group: {:subgroup, Swoosh.Adapters.Mailgun},
393 key: :api_key,
394 label: "API key",
395 type: :string,
396 description: "`Swoosh.Adapters.Mailgun` adapter specific setting",
397 suggestions: ["my-api-key"]
398 },
399 %{
400 group: {:subgroup, Swoosh.Adapters.Mailgun},
401 key: :domain,
402 type: :string,
403 description: "`Swoosh.Adapters.Mailgun` adapter specific setting",
404 suggestions: ["pleroma.com"]
405 },
406 %{
407 group: {:subgroup, Swoosh.Adapters.Mailjet},
408 key: :api_key,
409 label: "API key",
410 type: :string,
411 description: "`Swoosh.Adapters.Mailjet` adapter specific setting",
412 suggestions: ["my-api-key"]
413 },
414 %{
415 group: {:subgroup, Swoosh.Adapters.Mailjet},
416 key: :secret,
417 type: :string,
418 description: "`Swoosh.Adapters.Mailjet` adapter specific setting",
419 suggestions: ["my-secret-key"]
420 },
421 %{
422 group: {:subgroup, Swoosh.Adapters.Postmark},
423 key: :api_key,
424 label: "API key",
425 type: :string,
426 description: "`Swoosh.Adapters.Postmark` adapter specific setting",
427 suggestions: ["my-api-key"]
428 },
429 %{
430 group: {:subgroup, Swoosh.Adapters.SparkPost},
431 key: :api_key,
432 label: "API key",
433 type: :string,
434 description: "`Swoosh.Adapters.SparkPost` adapter specific setting",
435 suggestions: ["my-api-key"]
436 },
437 %{
438 group: {:subgroup, Swoosh.Adapters.SparkPost},
439 key: :endpoint,
440 type: :string,
441 description: "`Swoosh.Adapters.SparkPost` adapter specific setting",
442 suggestions: ["https://api.sparkpost.com/api/v1"]
443 },
444 %{
445 group: {:subgroup, Swoosh.Adapters.AmazonSES},
446 key: :region,
447 type: :string,
448 description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
449 suggestions: ["us-east-1", "us-east-2"]
450 },
451 %{
452 group: {:subgroup, Swoosh.Adapters.AmazonSES},
453 key: :access_key,
454 type: :string,
455 description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
456 suggestions: ["aws-access-key"]
457 },
458 %{
459 group: {:subgroup, Swoosh.Adapters.AmazonSES},
460 key: :secret,
461 type: :string,
462 description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
463 suggestions: ["aws-secret-key"]
464 },
465 %{
466 group: {:subgroup, Swoosh.Adapters.Dyn},
467 key: :api_key,
468 label: "API key",
469 type: :string,
470 description: "`Swoosh.Adapters.Dyn` adapter specific setting",
471 suggestions: ["my-api-key"]
472 },
473 %{
474 group: {:subgroup, Swoosh.Adapters.SocketLabs},
475 key: :server_id,
476 type: :string,
477 description: "`Swoosh.Adapters.SocketLabs` adapter specific setting"
478 },
479 %{
480 group: {:subgroup, Swoosh.Adapters.SocketLabs},
481 key: :api_key,
482 label: "API key",
483 type: :string,
484 description: "`Swoosh.Adapters.SocketLabs` adapter specific setting"
485 },
486 %{
487 group: {:subgroup, Swoosh.Adapters.Gmail},
488 key: :access_token,
489 type: :string,
490 description: "`Swoosh.Adapters.Gmail` adapter specific setting"
491 }
492 ]
493 },
494 %{
495 group: :swoosh,
496 type: :group,
497 description: "`Swoosh.Adapters.Local` adapter specific settings",
498 children: [
499 %{
500 group: {:subgroup, Swoosh.Adapters.Local},
501 key: :serve_mailbox,
502 type: :boolean,
503 description: "Run the preview server together as part of your app"
504 },
505 %{
506 group: {:subgroup, Swoosh.Adapters.Local},
507 key: :preview_port,
508 type: :integer,
509 description: "The preview server port",
510 suggestions: [4001]
511 }
512 ]
513 },
514 %{
515 group: :pleroma,
516 key: :uri_schemes,
517 label: "URI Schemes",
518 type: :group,
519 description: "URI schemes related settings",
520 children: [
521 %{
522 key: :valid_schemes,
523 type: {:list, :string},
524 description: "List of the scheme part that is considered valid to be an URL",
525 suggestions: [
526 "https",
527 "http",
528 "dat",
529 "dweb",
530 "gopher",
531 "hyper",
532 "ipfs",
533 "ipns",
534 "irc",
535 "ircs",
536 "magnet",
537 "mailto",
538 "mumble",
539 "ssb",
540 "xmpp"
541 ]
542 }
543 ]
544 },
545 %{
546 group: :pleroma,
547 key: :instance,
548 type: :group,
549 description: "Instance-related settings",
550 children: [
551 %{
552 key: :name,
553 type: :string,
554 description: "Name of the instance",
555 suggestions: [
556 "Pleroma"
557 ]
558 },
559 %{
560 key: :email,
561 label: "Admin Email Address",
562 type: :string,
563 description: "Email used to reach an Administrator/Moderator of the instance",
564 suggestions: [
565 "email@example.com"
566 ]
567 },
568 %{
569 key: :notify_email,
570 label: "Sender Email Address",
571 type: :string,
572 description: "Envelope FROM address for mail sent via Pleroma",
573 suggestions: [
574 "notify@example.com"
575 ]
576 },
577 %{
578 key: :description,
579 type: :string,
580 description:
581 "The instance's description. It can be seen in nodeinfo and `/api/v1/instance`",
582 suggestions: [
583 "Very cool instance"
584 ]
585 },
586 %{
587 key: :limit,
588 type: :integer,
589 description: "Posts character limit (CW/Subject included in the counter)",
590 suggestions: [
591 5_000
592 ]
593 },
594 %{
595 key: :chat_limit,
596 type: :integer,
597 description: "Character limit of the instance chat messages",
598 suggestions: [
599 5_000
600 ]
601 },
602 %{
603 key: :remote_limit,
604 type: :integer,
605 description: "Hard character limit beyond which remote posts will be dropped",
606 suggestions: [
607 100_000
608 ]
609 },
610 %{
611 key: :upload_limit,
612 type: :integer,
613 description: "File size limit of uploads (except for avatar, background, banner)",
614 suggestions: [
615 16_000_000
616 ]
617 },
618 %{
619 key: :avatar_upload_limit,
620 type: :integer,
621 description: "File size limit of user's profile avatars",
622 suggestions: [
623 2_000_000
624 ]
625 },
626 %{
627 key: :background_upload_limit,
628 type: :integer,
629 description: "File size limit of user's profile backgrounds",
630 suggestions: [
631 4_000_000
632 ]
633 },
634 %{
635 key: :banner_upload_limit,
636 type: :integer,
637 description: "File size limit of user's profile banners",
638 suggestions: [
639 4_000_000
640 ]
641 },
642 %{
643 key: :poll_limits,
644 type: :map,
645 description: "A map with poll limits for local polls",
646 suggestions: [
647 %{
648 max_options: 20,
649 max_option_chars: 200,
650 min_expiration: 0,
651 max_expiration: 31_536_000
652 }
653 ],
654 children: [
655 %{
656 key: :max_options,
657 type: :integer,
658 description: "Maximum number of options",
659 suggestions: [20]
660 },
661 %{
662 key: :max_option_chars,
663 type: :integer,
664 description: "Maximum number of characters per option",
665 suggestions: [200]
666 },
667 %{
668 key: :min_expiration,
669 type: :integer,
670 description: "Minimum expiration time (in seconds)",
671 suggestions: [0]
672 },
673 %{
674 key: :max_expiration,
675 type: :integer,
676 description: "Maximum expiration time (in seconds)",
677 suggestions: [3600]
678 }
679 ]
680 },
681 %{
682 key: :registrations_open,
683 type: :boolean,
684 description:
685 "Enable registrations for anyone. Invitations require this setting to be disabled."
686 },
687 %{
688 key: :invites_enabled,
689 type: :boolean,
690 description:
691 "Enable user invitations for admins (depends on `registrations_open` being disabled)"
692 },
693 %{
694 key: :account_activation_required,
695 type: :boolean,
696 description: "Require users to confirm their emails before signing in"
697 },
698 %{
699 key: :account_approval_required,
700 type: :boolean,
701 description: "Require users to be manually approved by an admin before signing in"
702 },
703 %{
704 key: :federating,
705 type: :boolean,
706 description: "Enable federation with other instances"
707 },
708 %{
709 key: :federation_incoming_replies_max_depth,
710 label: "Fed. incoming replies max depth",
711 type: :integer,
712 description:
713 "Max. depth of reply-to and reply activities fetching on incoming federation, to prevent out-of-memory situations while" <>
714 " 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.",
715 suggestions: [
716 100
717 ]
718 },
719 %{
720 key: :federation_reachability_timeout_days,
721 label: "Fed. reachability timeout days",
722 type: :integer,
723 description:
724 "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it",
725 suggestions: [
726 7
727 ]
728 },
729 %{
730 key: :allow_relay,
731 type: :boolean,
732 description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance"
733 },
734 %{
735 key: :public,
736 type: :boolean,
737 description:
738 "Makes the client API in authenticated mode-only except for user-profiles." <>
739 " Useful for disabling the Local Timeline and The Whole Known Network. " <>
740 " Note: when setting to `false`, please also check `:restrict_unauthenticated` setting."
741 },
742 %{
743 key: :quarantined_instances,
744 type: {:list, :string},
745 description:
746 "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent",
747 suggestions: [
748 "quarantined.com",
749 "*.quarantined.com"
750 ]
751 },
752 %{
753 key: :managed_config,
754 type: :boolean,
755 description:
756 "Whenether the config for pleroma-fe is configured in this config or in static/config.json"
757 },
758 %{
759 key: :static_dir,
760 type: :string,
761 description: "Instance static directory",
762 suggestions: [
763 "instance/static/"
764 ]
765 },
766 %{
767 key: :allowed_post_formats,
768 type: {:list, :string},
769 description: "MIME-type list of formats allowed to be posted (transformed into HTML)",
770 suggestions: [
771 "text/plain",
772 "text/html",
773 "text/markdown",
774 "text/bbcode"
775 ]
776 },
777 %{
778 key: :extended_nickname_format,
779 type: :boolean,
780 description:
781 "Enable to use extended local nicknames format (allows underscores/dashes)." <>
782 " This will break federation with older software for theses nicknames."
783 },
784 %{
785 key: :cleanup_attachments,
786 type: :boolean,
787 description: """
788 Enable to remove associated attachments when status is removed.
789 This will not affect duplicates and attachments without status.
790 Enabling this will increase load to database when deleting statuses on larger instances.
791 """
792 },
793 %{
794 key: :max_pinned_statuses,
795 type: :integer,
796 description: "The maximum number of pinned statuses. 0 will disable the feature.",
797 suggestions: [
798 0,
799 1,
800 3
801 ]
802 },
803 %{
804 key: :autofollowed_nicknames,
805 type: {:list, :string},
806 description:
807 "Set to nicknames of (local) users that every new user should automatically follow",
808 suggestions: [
809 "lain",
810 "kaniini",
811 "lanodan",
812 "rinpatch"
813 ]
814 },
815 %{
816 key: :attachment_links,
817 type: :boolean,
818 description: "Enable to automatically add attachment link text to statuses"
819 },
820 %{
821 key: :max_report_comment_size,
822 type: :integer,
823 description: "The maximum size of the report comment. Default: 1000.",
824 suggestions: [
825 1_000
826 ]
827 },
828 %{
829 key: :safe_dm_mentions,
830 label: "Safe DM mentions",
831 type: :boolean,
832 description:
833 "If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <>
834 " This is to prevent accidental mentioning of people when talking about them (e.g. \"@admin please keep an eye on @bad_actor\")." <>
835 " Default: disabled"
836 },
837 %{
838 key: :healthcheck,
839 type: :boolean,
840 description: "If enabled, system data will be shown on `/api/pleroma/healthcheck`"
841 },
842 %{
843 key: :remote_post_retention_days,
844 type: :integer,
845 description:
846 "The default amount of days to retain remote posts when pruning the database",
847 suggestions: [
848 90
849 ]
850 },
851 %{
852 key: :user_bio_length,
853 type: :integer,
854 description: "A user bio maximum length. Default: 5000.",
855 suggestions: [
856 5_000
857 ]
858 },
859 %{
860 key: :user_name_length,
861 type: :integer,
862 description: "A user name maximum length. Default: 100.",
863 suggestions: [
864 100
865 ]
866 },
867 %{
868 key: :skip_thread_containment,
869 type: :boolean,
870 description: "Skip filtering out broken threads. Default: enabled."
871 },
872 %{
873 key: :limit_to_local_content,
874 type: {:dropdown, :atom},
875 description:
876 "Limit unauthenticated users to search for local statutes and users only. Default: `:unauthenticated`.",
877 suggestions: [
878 :unauthenticated,
879 :all,
880 false
881 ]
882 },
883 %{
884 key: :max_account_fields,
885 type: :integer,
886 description: "The maximum number of custom fields in the user profile. Default: 10.",
887 suggestions: [
888 10
889 ]
890 },
891 %{
892 key: :max_remote_account_fields,
893 type: :integer,
894 description:
895 "The maximum number of custom fields in the remote user profile. Default: 20.",
896 suggestions: [
897 20
898 ]
899 },
900 %{
901 key: :account_field_name_length,
902 type: :integer,
903 description: "An account field name maximum length. Default: 512.",
904 suggestions: [
905 512
906 ]
907 },
908 %{
909 key: :account_field_value_length,
910 type: :integer,
911 description: "An account field value maximum length. Default: 2048.",
912 suggestions: [
913 2048
914 ]
915 },
916 %{
917 key: :registration_reason_length,
918 type: :integer,
919 description: "Maximum registration reason length. Default: 500.",
920 suggestions: [
921 500
922 ]
923 },
924 %{
925 key: :external_user_synchronization,
926 type: :boolean,
927 description: "Enabling following/followers counters synchronization for external users"
928 },
929 %{
930 key: :multi_factor_authentication,
931 type: :keyword,
932 description: "Multi-factor authentication settings",
933 suggestions: [
934 [
935 totp: [digits: 6, period: 30],
936 backup_codes: [number: 5, length: 16]
937 ]
938 ],
939 children: [
940 %{
941 key: :totp,
942 label: "TOTP settings",
943 type: :keyword,
944 description: "TOTP settings",
945 suggestions: [digits: 6, period: 30],
946 children: [
947 %{
948 key: :digits,
949 type: :integer,
950 suggestions: [6],
951 description:
952 "Determines the length of a one-time pass-code, in characters. Defaults to 6 characters."
953 },
954 %{
955 key: :period,
956 type: :integer,
957 suggestions: [30],
958 description:
959 "A period for which the TOTP code will be valid, in seconds. Defaults to 30 seconds."
960 }
961 ]
962 },
963 %{
964 key: :backup_codes,
965 type: :keyword,
966 description: "MFA backup codes settings",
967 suggestions: [number: 5, length: 16],
968 children: [
969 %{
970 key: :number,
971 type: :integer,
972 suggestions: [5],
973 description: "Number of backup codes to generate."
974 },
975 %{
976 key: :length,
977 type: :integer,
978 suggestions: [16],
979 description:
980 "Determines the length of backup one-time pass-codes, in characters. Defaults to 16 characters."
981 }
982 ]
983 }
984 ]
985 },
986 %{
987 key: :instance_thumbnail,
988 type: {:string, :image},
989 description:
990 "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.",
991 suggestions: ["/instance/thumbnail.jpeg"]
992 },
993 %{
994 key: :show_reactions,
995 type: :boolean,
996 description: "Let favourites and emoji reactions be viewed through the API."
997 }
998 ]
999 },
1000 %{
1001 group: :pleroma,
1002 key: :welcome,
1003 type: :group,
1004 description: "Welcome messages settings",
1005 children: [
1006 %{
1007 key: :direct_message,
1008 type: :keyword,
1009 descpiption: "Direct message settings",
1010 children: [
1011 %{
1012 key: :enabled,
1013 type: :boolean,
1014 description: "Enables sending a direct message to newly registered users"
1015 },
1016 %{
1017 key: :message,
1018 type: :string,
1019 description: "A message that will be sent to newly registered users",
1020 suggestions: [
1021 "Hi, @username! Welcome on board!"
1022 ]
1023 },
1024 %{
1025 key: :sender_nickname,
1026 type: :string,
1027 description: "The nickname of the local user that sends a welcome message",
1028 suggestions: [
1029 "lain"
1030 ]
1031 }
1032 ]
1033 },
1034 %{
1035 key: :chat_message,
1036 type: :keyword,
1037 descpiption: "Chat message settings",
1038 children: [
1039 %{
1040 key: :enabled,
1041 type: :boolean,
1042 description: "Enables sending a chat message to newly registered users"
1043 },
1044 %{
1045 key: :message,
1046 type: :string,
1047 description:
1048 "A message that will be sent to newly registered users as a chat message",
1049 suggestions: [
1050 "Hello, welcome on board!"
1051 ]
1052 },
1053 %{
1054 key: :sender_nickname,
1055 type: :string,
1056 description: "The nickname of the local user that sends a welcome chat message",
1057 suggestions: [
1058 "lain"
1059 ]
1060 }
1061 ]
1062 },
1063 %{
1064 key: :email,
1065 type: :keyword,
1066 descpiption: "Email message settings",
1067 children: [
1068 %{
1069 key: :enabled,
1070 type: :boolean,
1071 description: "Enables sending an email to newly registered users"
1072 },
1073 %{
1074 key: :sender,
1075 type: [:string, :tuple],
1076 description:
1077 "Email address and/or nickname that will be used to send the welcome email.",
1078 suggestions: [
1079 {"Pleroma App", "welcome@pleroma.app"}
1080 ]
1081 },
1082 %{
1083 key: :subject,
1084 type: :string,
1085 description:
1086 "Subject of the welcome email. EEX template with user and instance_name variables can be used.",
1087 suggestions: ["Welcome to <%= instance_name%>"]
1088 },
1089 %{
1090 key: :html,
1091 type: :string,
1092 description:
1093 "HTML content of the welcome email. EEX template with user and instance_name variables can be used.",
1094 suggestions: ["<h1>Hello <%= user.name%>. Welcome to <%= instance_name%></h1>"]
1095 },
1096 %{
1097 key: :text,
1098 type: :string,
1099 description:
1100 "Text content of the welcome email. EEX template with user and instance_name variables can be used.",
1101 suggestions: ["Hello <%= user.name%>. \n Welcome to <%= instance_name%>\n"]
1102 }
1103 ]
1104 }
1105 ]
1106 },
1107 %{
1108 group: :logger,
1109 type: :group,
1110 description: "Logger-related settings",
1111 children: [
1112 %{
1113 key: :backends,
1114 type: [:atom, :tuple, :module],
1115 description:
1116 "Where logs will be sent, :console - send logs to stdout, { ExSyslogger, :ex_syslogger } - to syslog, Quack.Logger - to Slack.",
1117 suggestions: [:console, {ExSyslogger, :ex_syslogger}, Quack.Logger]
1118 }
1119 ]
1120 },
1121 %{
1122 group: :logger,
1123 type: :group,
1124 key: :ex_syslogger,
1125 label: "ExSyslogger",
1126 description: "ExSyslogger-related settings",
1127 children: [
1128 %{
1129 key: :level,
1130 type: {:dropdown, :atom},
1131 description: "Log level",
1132 suggestions: [:debug, :info, :warn, :error]
1133 },
1134 %{
1135 key: :ident,
1136 type: :string,
1137 description:
1138 "A string that's prepended to every message, and is typically set to the app name",
1139 suggestions: ["pleroma"]
1140 },
1141 %{
1142 key: :format,
1143 type: :string,
1144 description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
1145 suggestions: ["$metadata[$level] $message"]
1146 },
1147 %{
1148 key: :metadata,
1149 type: {:list, :atom},
1150 suggestions: [:request_id]
1151 }
1152 ]
1153 },
1154 %{
1155 group: :logger,
1156 type: :group,
1157 key: :console,
1158 label: "Console Logger",
1159 description: "Console logger settings",
1160 children: [
1161 %{
1162 key: :level,
1163 type: {:dropdown, :atom},
1164 description: "Log level",
1165 suggestions: [:debug, :info, :warn, :error]
1166 },
1167 %{
1168 key: :format,
1169 type: :string,
1170 description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
1171 suggestions: ["$metadata[$level] $message"]
1172 },
1173 %{
1174 key: :metadata,
1175 type: {:list, :atom},
1176 suggestions: [:request_id]
1177 }
1178 ]
1179 },
1180 %{
1181 group: :quack,
1182 type: :group,
1183 label: "Quack Logger",
1184 description: "Quack-related settings",
1185 children: [
1186 %{
1187 key: :level,
1188 type: {:dropdown, :atom},
1189 description: "Log level",
1190 suggestions: [:debug, :info, :warn, :error]
1191 },
1192 %{
1193 key: :meta,
1194 type: {:list, :atom},
1195 description: "Configure which metadata you want to report on",
1196 suggestions: [
1197 :application,
1198 :module,
1199 :file,
1200 :function,
1201 :line,
1202 :pid,
1203 :crash_reason,
1204 :initial_call,
1205 :registered_name,
1206 :all,
1207 :none
1208 ]
1209 },
1210 %{
1211 key: :webhook_url,
1212 label: "Webhook URL",
1213 type: :string,
1214 description: "Configure the Slack incoming webhook",
1215 suggestions: ["https://hooks.slack.com/services/YOUR-KEY-HERE"]
1216 }
1217 ]
1218 },
1219 %{
1220 group: :pleroma,
1221 key: :frontend_configurations,
1222 type: :group,
1223 description:
1224 "This form can be used to configure a keyword list that keeps the configuration data for any " <>
1225 "kind of frontend. By default, settings for pleroma_fe and masto_fe are configured. If you want to " <>
1226 "add your own configuration your settings all fields must be complete.",
1227 children: [
1228 %{
1229 key: :pleroma_fe,
1230 label: "Pleroma FE",
1231 type: :map,
1232 description: "Settings for Pleroma FE",
1233 suggestions: [
1234 %{
1235 alwaysShowSubjectInput: true,
1236 background: "/static/aurora_borealis.jpg",
1237 collapseMessageWithSubject: false,
1238 disableChat: false,
1239 greentext: false,
1240 hideFilteredStatuses: false,
1241 hideMutedPosts: false,
1242 hidePostStats: false,
1243 hideSitename: false,
1244 hideUserStats: false,
1245 loginMethod: "password",
1246 logo: "/static/logo.png",
1247 logoMargin: ".1em",
1248 logoMask: true,
1249 minimalScopesMode: false,
1250 noAttachmentLinks: false,
1251 nsfwCensorImage: "/static/img/nsfw.74818f9.png",
1252 postContentType: "text/plain",
1253 redirectRootLogin: "/main/friends",
1254 redirectRootNoLogin: "/main/all",
1255 scopeCopy: true,
1256 sidebarRight: false,
1257 showFeaturesPanel: true,
1258 showInstanceSpecificPanel: false,
1259 subjectLineBehavior: "email",
1260 theme: "pleroma-dark",
1261 webPushNotifications: false
1262 }
1263 ],
1264 children: [
1265 %{
1266 key: :alwaysShowSubjectInput,
1267 label: "Always show subject input",
1268 type: :boolean,
1269 description: "When disabled, auto-hide the subject field if it's empty"
1270 },
1271 %{
1272 key: :background,
1273 type: {:string, :image},
1274 description:
1275 "URL of the background, unless viewing a user profile with a background that is set",
1276 suggestions: ["/images/city.jpg"]
1277 },
1278 %{
1279 key: :collapseMessageWithSubject,
1280 label: "Collapse message with subject",
1281 type: :boolean,
1282 description:
1283 "When a message has a subject (aka Content Warning), collapse it by default"
1284 },
1285 %{
1286 key: :disableChat,
1287 label: "PleromaFE Chat",
1288 type: :boolean,
1289 description: "Disables PleromaFE Chat component"
1290 },
1291 %{
1292 key: :greentext,
1293 label: "Greentext",
1294 type: :boolean,
1295 description: "Enables green text on lines prefixed with the > character"
1296 },
1297 %{
1298 key: :hideFilteredStatuses,
1299 label: "Hide Filtered Statuses",
1300 type: :boolean,
1301 description: "Hides filtered statuses from timelines"
1302 },
1303 %{
1304 key: :hideMutedPosts,
1305 label: "Hide Muted Posts",
1306 type: :boolean,
1307 description: "Hides muted statuses from timelines"
1308 },
1309 %{
1310 key: :hidePostStats,
1311 label: "Hide post stats",
1312 type: :boolean,
1313 description: "Hide notices statistics (repeats, favorites, ...)"
1314 },
1315 %{
1316 key: :hideSitename,
1317 label: "Hide Sitename",
1318 type: :boolean,
1319 description: "Hides instance name from PleromaFE banner"
1320 },
1321 %{
1322 key: :hideUserStats,
1323 label: "Hide user stats",
1324 type: :boolean,
1325 description:
1326 "Hide profile statistics (posts, posts per day, followers, followings, ...)"
1327 },
1328 %{
1329 key: :logo,
1330 type: {:string, :image},
1331 description: "URL of the logo, defaults to Pleroma's logo",
1332 suggestions: ["/static/logo.png"]
1333 },
1334 %{
1335 key: :logoMargin,
1336 label: "Logo margin",
1337 type: :string,
1338 description:
1339 "Allows you to adjust vertical margins between logo boundary and navbar borders. " <>
1340 "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.",
1341 suggestions: [".1em"]
1342 },
1343 %{
1344 key: :logoMask,
1345 label: "Logo mask",
1346 type: :boolean,
1347 description:
1348 "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <>
1349 "If you want a colorful logo you must disable logoMask."
1350 },
1351 %{
1352 key: :minimalScopesMode,
1353 label: "Minimal scopes mode",
1354 type: :boolean,
1355 description:
1356 "Limit scope selection to Direct, User default, and Scope of post replying to. " <>
1357 "Also prevents replying to a DM with a public post from PleromaFE."
1358 },
1359 %{
1360 key: :nsfwCensorImage,
1361 label: "NSFW Censor Image",
1362 type: {:string, :image},
1363 description:
1364 "URL of the image to use for hiding NSFW media attachments in the timeline",
1365 suggestions: ["/static/img/nsfw.74818f9.png"]
1366 },
1367 %{
1368 key: :postContentType,
1369 label: "Post Content Type",
1370 type: {:dropdown, :atom},
1371 description: "Default post formatting option",
1372 suggestions: ["text/plain", "text/html", "text/markdown", "text/bbcode"]
1373 },
1374 %{
1375 key: :redirectRootNoLogin,
1376 label: "Redirect root no login",
1377 type: :string,
1378 description:
1379 "Relative URL which indicates where to redirect when a user isn't logged in",
1380 suggestions: ["/main/all"]
1381 },
1382 %{
1383 key: :redirectRootLogin,
1384 label: "Redirect root login",
1385 type: :string,
1386 description:
1387 "Relative URL which indicates where to redirect when a user is logged in",
1388 suggestions: ["/main/friends"]
1389 },
1390 %{
1391 key: :scopeCopy,
1392 label: "Scope copy",
1393 type: :boolean,
1394 description: "Copy the scope (private/unlisted/public) in replies to posts by default"
1395 },
1396 %{
1397 key: :sidebarRight,
1398 label: "Sidebar on Right",
1399 type: :boolean,
1400 description: "Change alignment of sidebar and panels to the right"
1401 },
1402 %{
1403 key: :showFeaturesPanel,
1404 label: "Show instance features panel",
1405 type: :boolean,
1406 description:
1407 "Enables panel displaying functionality of the instance on the About page"
1408 },
1409 %{
1410 key: :showInstanceSpecificPanel,
1411 label: "Show instance specific panel",
1412 type: :boolean,
1413 description: "Whether to show the instance's custom panel"
1414 },
1415 %{
1416 key: :subjectLineBehavior,
1417 label: "Subject line behavior",
1418 type: :string,
1419 description: "Allows changing the default behaviour of subject lines in replies.
1420 `email`: copy and preprend re:, as in email,
1421 `masto`: copy verbatim, as in Mastodon,
1422 `noop`: don't copy the subject.",
1423 suggestions: ["email", "masto", "noop"]
1424 },
1425 %{
1426 key: :theme,
1427 type: :string,
1428 description: "Which theme to use. Available themes are defined in styles.json",
1429 suggestions: ["pleroma-dark"]
1430 }
1431 ]
1432 },
1433 %{
1434 key: :masto_fe,
1435 label: "Masto FE",
1436 type: :map,
1437 description: "Settings for Masto FE",
1438 suggestions: [
1439 %{
1440 showInstanceSpecificPanel: true
1441 }
1442 ],
1443 children: [
1444 %{
1445 key: :showInstanceSpecificPanel,
1446 label: "Show instance specific panel",
1447 type: :boolean,
1448 description: "Whenether to show the instance's specific panel"
1449 }
1450 ]
1451 }
1452 ]
1453 },
1454 %{
1455 group: :pleroma,
1456 key: :assets,
1457 type: :group,
1458 description:
1459 "This section configures assets to be used with various frontends. Currently the only option relates to mascots on the mastodon frontend",
1460 children: [
1461 %{
1462 key: :mascots,
1463 type: {:keyword, :map},
1464 description:
1465 "Keyword of mascots, each element must contain both an URL and a mime_type key",
1466 suggestions: [
1467 pleroma_fox_tan: %{
1468 url: "/images/pleroma-fox-tan-smol.png",
1469 mime_type: "image/png"
1470 },
1471 pleroma_fox_tan_shy: %{
1472 url: "/images/pleroma-fox-tan-shy.png",
1473 mime_type: "image/png"
1474 }
1475 ]
1476 },
1477 %{
1478 key: :default_mascot,
1479 type: :atom,
1480 description:
1481 "This will be used as the default mascot on MastoFE. Default: `:pleroma_fox_tan`",
1482 suggestions: [
1483 :pleroma_fox_tan
1484 ]
1485 },
1486 %{
1487 key: :default_user_avatar,
1488 type: {:string, :image},
1489 description: "URL of the default user avatar",
1490 suggestions: ["/images/avi.png"]
1491 }
1492 ]
1493 },
1494 %{
1495 group: :pleroma,
1496 key: :manifest,
1497 type: :group,
1498 description:
1499 "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE.",
1500 children: [
1501 %{
1502 key: :icons,
1503 type: {:list, :map},
1504 description: "Describe the icons of the app",
1505 suggestion: [
1506 %{
1507 src: "/static/logo.png"
1508 },
1509 %{
1510 src: "/static/icon.png",
1511 type: "image/png"
1512 },
1513 %{
1514 src: "/static/icon.ico",
1515 sizes: "72x72 96x96 128x128 256x256"
1516 }
1517 ]
1518 },
1519 %{
1520 key: :theme_color,
1521 type: :string,
1522 description: "Describe the theme color of the app",
1523 suggestions: ["#282c37", "mediumpurple"]
1524 },
1525 %{
1526 key: :background_color,
1527 type: :string,
1528 description: "Describe the background color of the app",
1529 suggestions: ["#191b22", "aliceblue"]
1530 }
1531 ]
1532 },
1533 %{
1534 group: :pleroma,
1535 key: :mrf,
1536 tab: :mrf,
1537 label: "MRF",
1538 type: :group,
1539 description: "General MRF settings",
1540 children: [
1541 %{
1542 key: :policies,
1543 type: [:module, {:list, :module}],
1544 description:
1545 "A list of MRF policies enabled. Module names are shortened (removed leading `Pleroma.Web.ActivityPub.MRF.` part), but on adding custom module you need to use full name.",
1546 suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF}
1547 },
1548 %{
1549 key: :transparency,
1550 label: "MRF transparency",
1551 type: :boolean,
1552 description:
1553 "Make the content of your Message Rewrite Facility settings public (via nodeinfo)"
1554 },
1555 %{
1556 key: :transparency_exclusions,
1557 label: "MRF transparency exclusions",
1558 type: {:list, :string},
1559 description:
1560 "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.",
1561 suggestions: [
1562 "exclusion.com"
1563 ]
1564 }
1565 ]
1566 },
1567 %{
1568 group: :pleroma,
1569 key: :mrf_simple,
1570 tab: :mrf,
1571 related_policy: "Pleroma.Web.ActivityPub.MRF.SimplePolicy",
1572 label: "MRF Simple",
1573 type: :group,
1574 description: "Simple ingress policies",
1575 children: [
1576 %{
1577 key: :media_removal,
1578 type: {:list, :string},
1579 description: "List of instances to strip media attachments from",
1580 suggestions: ["example.com", "*.example.com"]
1581 },
1582 %{
1583 key: :media_nsfw,
1584 label: "Media NSFW",
1585 type: {:list, :string},
1586 description: "List of instances to tag all media as NSFW (sensitive) from",
1587 suggestions: ["example.com", "*.example.com"]
1588 },
1589 %{
1590 key: :federated_timeline_removal,
1591 type: {:list, :string},
1592 description:
1593 "List of instances to remove from the Federated (aka The Whole Known Network) Timeline",
1594 suggestions: ["example.com", "*.example.com"]
1595 },
1596 %{
1597 key: :reject,
1598 type: {:list, :string},
1599 description: "List of instances to reject activities from (except deletes)",
1600 suggestions: ["example.com", "*.example.com"]
1601 },
1602 %{
1603 key: :accept,
1604 type: {:list, :string},
1605 description: "List of instances to only accept activities from (except deletes)",
1606 suggestions: ["example.com", "*.example.com"]
1607 },
1608 %{
1609 key: :followers_only,
1610 type: {:list, :string},
1611 description: "Force posts from the given instances to be visible by followers only",
1612 suggestions: ["example.com", "*.example.com"]
1613 },
1614 %{
1615 key: :report_removal,
1616 type: {:list, :string},
1617 description: "List of instances to reject reports from",
1618 suggestions: ["example.com", "*.example.com"]
1619 },
1620 %{
1621 key: :avatar_removal,
1622 type: {:list, :string},
1623 description: "List of instances to strip avatars from",
1624 suggestions: ["example.com", "*.example.com"]
1625 },
1626 %{
1627 key: :banner_removal,
1628 type: {:list, :string},
1629 description: "List of instances to strip banners from",
1630 suggestions: ["example.com", "*.example.com"]
1631 },
1632 %{
1633 key: :reject_deletes,
1634 type: {:list, :string},
1635 description: "List of instances to reject deletions from",
1636 suggestions: ["example.com", "*.example.com"]
1637 }
1638 ]
1639 },
1640 %{
1641 group: :pleroma,
1642 key: :mrf_activity_expiration,
1643 tab: :mrf,
1644 related_policy: "Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy",
1645 label: "MRF Activity Expiration Policy",
1646 type: :group,
1647 description: "Adds automatic expiration to all local activities",
1648 children: [
1649 %{
1650 key: :days,
1651 type: :integer,
1652 description: "Default global expiration time for all local activities (in days)",
1653 suggestions: [90, 365]
1654 }
1655 ]
1656 },
1657 %{
1658 group: :pleroma,
1659 key: :mrf_subchain,
1660 tab: :mrf,
1661 related_policy: "Pleroma.Web.ActivityPub.MRF.SubchainPolicy",
1662 label: "MRF Subchain",
1663 type: :group,
1664 description:
1665 "This policy processes messages through an alternate pipeline when a given message matches certain criteria." <>
1666 " All criteria are configured as a map of regular expressions to lists of policy modules.",
1667 children: [
1668 %{
1669 key: :match_actor,
1670 type: {:map, {:list, :string}},
1671 description: "Matches a series of regular expressions against the actor field",
1672 suggestions: [
1673 %{
1674 ~r/https:\/\/example.com/s => [Pleroma.Web.ActivityPub.MRF.DropPolicy]
1675 }
1676 ]
1677 }
1678 ]
1679 },
1680 %{
1681 group: :pleroma,
1682 key: :mrf_rejectnonpublic,
1683 tab: :mrf,
1684 related_policy: "Pleroma.Web.ActivityPub.MRF.RejectNonPublic",
1685 description: "RejectNonPublic drops posts with non-public visibility settings.",
1686 label: "MRF Reject Non Public",
1687 type: :group,
1688 children: [
1689 %{
1690 key: :allow_followersonly,
1691 label: "Allow followers-only",
1692 type: :boolean,
1693 description: "Whether to allow followers-only posts"
1694 },
1695 %{
1696 key: :allow_direct,
1697 type: :boolean,
1698 description: "Whether to allow direct messages"
1699 }
1700 ]
1701 },
1702 %{
1703 group: :pleroma,
1704 key: :mrf_hellthread,
1705 tab: :mrf,
1706 related_policy: "Pleroma.Web.ActivityPub.MRF.HellthreadPolicy",
1707 label: "MRF Hellthread",
1708 type: :group,
1709 description: "Block messages with excessive user mentions",
1710 children: [
1711 %{
1712 key: :delist_threshold,
1713 type: :integer,
1714 description:
1715 "Number of mentioned users after which the message gets removed from timelines and" <>
1716 "disables notifications. Set to 0 to disable.",
1717 suggestions: [10]
1718 },
1719 %{
1720 key: :reject_threshold,
1721 type: :integer,
1722 description:
1723 "Number of mentioned users after which the messaged gets rejected. Set to 0 to disable.",
1724 suggestions: [20]
1725 }
1726 ]
1727 },
1728 %{
1729 group: :pleroma,
1730 key: :mrf_keyword,
1731 tab: :mrf,
1732 related_policy: "Pleroma.Web.ActivityPub.MRF.KeywordPolicy",
1733 label: "MRF Keyword",
1734 type: :group,
1735 description: "Reject or Word-Replace messages with a keyword or regex",
1736 children: [
1737 %{
1738 key: :reject,
1739 type: {:list, :string},
1740 description:
1741 "A list of patterns which result in message being rejected. Each pattern can be a string or a regular expression.",
1742 suggestions: ["foo", ~r/foo/iu]
1743 },
1744 %{
1745 key: :federated_timeline_removal,
1746 type: {:list, :string},
1747 description:
1748 "A list of patterns which result in message being removed from federated timelines (a.k.a unlisted). Each pattern can be a string or a regular expression.",
1749 suggestions: ["foo", ~r/foo/iu]
1750 },
1751 %{
1752 key: :replace,
1753 type: {:list, :tuple},
1754 description:
1755 "A list of tuples containing {pattern, replacement}. Each pattern can be a string or a regular expression.",
1756 suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}]
1757 }
1758 ]
1759 },
1760 %{
1761 group: :pleroma,
1762 key: :mrf_mention,
1763 tab: :mrf,
1764 related_policy: "Pleroma.Web.ActivityPub.MRF.MentionPolicy",
1765 label: "MRF Mention",
1766 type: :group,
1767 description: "Block messages which mention a specific user",
1768 children: [
1769 %{
1770 key: :actors,
1771 type: {:list, :string},
1772 description: "A list of actors for which any post mentioning them will be dropped",
1773 suggestions: ["actor1", "actor2"]
1774 }
1775 ]
1776 },
1777 %{
1778 group: :pleroma,
1779 key: :mrf_vocabulary,
1780 tab: :mrf,
1781 related_policy: "Pleroma.Web.ActivityPub.MRF.VocabularyPolicy",
1782 label: "MRF Vocabulary",
1783 type: :group,
1784 description: "Filter messages which belong to certain activity vocabularies",
1785 children: [
1786 %{
1787 key: :accept,
1788 type: {:list, :string},
1789 description:
1790 "A list of ActivityStreams terms to accept. If empty, all supported messages are accepted.",
1791 suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
1792 },
1793 %{
1794 key: :reject,
1795 type: {:list, :string},
1796 description:
1797 "A list of ActivityStreams terms to reject. If empty, no messages are rejected.",
1798 suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
1799 }
1800 ]
1801 },
1802 # %{
1803 # group: :pleroma,
1804 # key: :mrf_user_allowlist,
1805 # tab: :mrf,
1806 # related_policy: "Pleroma.Web.ActivityPub.MRF.UserAllowListPolicy",
1807 # type: :map,
1808 # description:
1809 # "The keys in this section are the domain names that the policy should apply to." <>
1810 # " Each key should be assigned a list of users that should be allowed through by their ActivityPub ID",
1811 # suggestions: [
1812 # %{"example.org" => ["https://example.org/users/admin"]}
1813 # ]
1814 # ]
1815 # },
1816 %{
1817 group: :pleroma,
1818 key: :media_proxy,
1819 type: :group,
1820 description: "Media proxy",
1821 children: [
1822 %{
1823 key: :enabled,
1824 type: :boolean,
1825 description: "Enables proxying of remote media to the instance's proxy"
1826 },
1827 %{
1828 key: :base_url,
1829 label: "Base URL",
1830 type: :string,
1831 description:
1832 "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
1833 suggestions: ["https://example.com"]
1834 },
1835 %{
1836 key: :invalidation,
1837 type: :keyword,
1838 descpiption: "",
1839 suggestions: [
1840 enabled: true,
1841 provider: Pleroma.Web.MediaProxy.Invalidation.Script
1842 ],
1843 children: [
1844 %{
1845 key: :enabled,
1846 type: :boolean,
1847 description: "Enables media cache object invalidation."
1848 },
1849 %{
1850 key: :provider,
1851 type: :module,
1852 description: "Module which will be used to purge objects from the cache.",
1853 suggestions: [
1854 Pleroma.Web.MediaProxy.Invalidation.Script,
1855 Pleroma.Web.MediaProxy.Invalidation.Http
1856 ]
1857 }
1858 ]
1859 },
1860 %{
1861 key: :proxy_opts,
1862 label: "Proxy Options",
1863 type: :keyword,
1864 description: "Options for Pleroma.ReverseProxy",
1865 suggestions: [
1866 redirect_on_failure: false,
1867 max_body_length: 25 * 1_048_576,
1868 http: [
1869 follow_redirect: true,
1870 pool: :media
1871 ]
1872 ],
1873 children: [
1874 %{
1875 key: :redirect_on_failure,
1876 type: :boolean,
1877 description:
1878 "Redirects the client to the real remote URL if there's any HTTP errors. " <>
1879 "Any error during body processing will not be redirected as the response is chunked."
1880 },
1881 %{
1882 key: :max_body_length,
1883 type: :integer,
1884 description:
1885 "Limits the content length to be approximately the " <>
1886 "specified length. It is validated with the `content-length` header and also verified when proxying."
1887 },
1888 %{
1889 key: :http,
1890 label: "HTTP",
1891 type: :keyword,
1892 description: "HTTP options",
1893 children: [
1894 %{
1895 key: :adapter,
1896 type: :keyword,
1897 description: "Adapter specific options",
1898 children: [
1899 %{
1900 key: :ssl_options,
1901 type: :keyword,
1902 label: "SSL Options",
1903 description: "SSL options for HTTP adapter",
1904 children: [
1905 %{
1906 key: :versions,
1907 type: {:list, :atom},
1908 description: "List of TLS version to use",
1909 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
1910 }
1911 ]
1912 }
1913 ]
1914 },
1915 %{
1916 key: :proxy_url,
1917 label: "Proxy URL",
1918 type: [:string, :tuple],
1919 description: "Proxy URL",
1920 suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
1921 }
1922 ]
1923 }
1924 ]
1925 },
1926 %{
1927 key: :whitelist,
1928 type: {:list, :string},
1929 description: "List of hosts with scheme to bypass the mediaproxy",
1930 suggestions: ["http://example.com"]
1931 }
1932 ]
1933 },
1934 %{
1935 group: :pleroma,
1936 key: Pleroma.Web.MediaProxy.Invalidation.Http,
1937 type: :group,
1938 description: "HTTP invalidate settings",
1939 children: [
1940 %{
1941 key: :method,
1942 type: :atom,
1943 description: "HTTP method of request. Default: :purge"
1944 },
1945 %{
1946 key: :headers,
1947 type: {:keyword, :string},
1948 description: "HTTP headers of request",
1949 suggestions: [{"x-refresh", 1}]
1950 },
1951 %{
1952 key: :options,
1953 type: :keyword,
1954 description: "Request options",
1955 children: [
1956 %{
1957 key: :params,
1958 type: {:map, :string}
1959 }
1960 ]
1961 }
1962 ]
1963 },
1964 %{
1965 group: :pleroma,
1966 key: Pleroma.Web.MediaProxy.Invalidation.Script,
1967 type: :group,
1968 description: "Script invalidate settings",
1969 children: [
1970 %{
1971 key: :script_path,
1972 type: :string,
1973 description: "Path to shell script. Which will run purge cache.",
1974 suggestions: ["./installation/nginx-cache-purge.sh.example"]
1975 }
1976 ]
1977 },
1978 %{
1979 group: :pleroma,
1980 key: :gopher,
1981 type: :group,
1982 description: "Gopher settings",
1983 children: [
1984 %{
1985 key: :enabled,
1986 type: :boolean,
1987 description: "Enables the gopher interface"
1988 },
1989 %{
1990 key: :ip,
1991 label: "IP",
1992 type: :tuple,
1993 description: "IP address to bind to",
1994 suggestions: [{0, 0, 0, 0}]
1995 },
1996 %{
1997 key: :port,
1998 type: :integer,
1999 description: "Port to bind to",
2000 suggestions: [9999]
2001 },
2002 %{
2003 key: :dstport,
2004 type: :integer,
2005 description: "Port advertised in URLs (optional, defaults to port)",
2006 suggestions: [9999]
2007 }
2008 ]
2009 },
2010 %{
2011 group: :pleroma,
2012 key: :activitypub,
2013 label: "ActivityPub",
2014 type: :group,
2015 description: "ActivityPub-related settings",
2016 children: [
2017 %{
2018 key: :unfollow_blocked,
2019 type: :boolean,
2020 description: "Whether blocks result in people getting unfollowed"
2021 },
2022 %{
2023 key: :outgoing_blocks,
2024 type: :boolean,
2025 description: "Whether to federate blocks to other instances"
2026 },
2027 %{
2028 key: :sign_object_fetches,
2029 type: :boolean,
2030 description: "Sign object fetches with HTTP signatures"
2031 },
2032 %{
2033 key: :note_replies_output_limit,
2034 type: :integer,
2035 description:
2036 "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)"
2037 },
2038 %{
2039 key: :follow_handshake_timeout,
2040 type: :integer,
2041 description: "Following handshake timeout",
2042 suggestions: [500]
2043 }
2044 ]
2045 },
2046 %{
2047 group: :pleroma,
2048 key: :http_security,
2049 label: "HTTP security",
2050 type: :group,
2051 description: "HTTP security settings",
2052 children: [
2053 %{
2054 key: :enabled,
2055 type: :boolean,
2056 description: "Whether the managed content security policy is enabled"
2057 },
2058 %{
2059 key: :sts,
2060 label: "STS",
2061 type: :boolean,
2062 description: "Whether to additionally send a Strict-Transport-Security header"
2063 },
2064 %{
2065 key: :sts_max_age,
2066 label: "STS max age",
2067 type: :integer,
2068 description: "The maximum age for the Strict-Transport-Security header if sent",
2069 suggestions: [31_536_000]
2070 },
2071 %{
2072 key: :ct_max_age,
2073 label: "CT max age",
2074 type: :integer,
2075 description: "The maximum age for the Expect-CT header if sent",
2076 suggestions: [2_592_000]
2077 },
2078 %{
2079 key: :referrer_policy,
2080 type: :string,
2081 description: "The referrer policy to use, either \"same-origin\" or \"no-referrer\"",
2082 suggestions: ["same-origin", "no-referrer"]
2083 },
2084 %{
2085 key: :report_uri,
2086 label: "Report URI",
2087 type: :string,
2088 description: "Adds the specified URL to report-uri and report-to group in CSP header",
2089 suggestions: ["https://example.com/report-uri"]
2090 }
2091 ]
2092 },
2093 %{
2094 group: :web_push_encryption,
2095 key: :vapid_details,
2096 label: "Vapid Details",
2097 type: :group,
2098 description:
2099 "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it.",
2100 children: [
2101 %{
2102 key: :subject,
2103 type: :string,
2104 description:
2105 "A mailto link for the administrative contact." <>
2106 " It's best if this email is not a personal email address, but rather a group email to the instance moderation team.",
2107 suggestions: ["mailto:moderators@pleroma.com"]
2108 },
2109 %{
2110 key: :public_key,
2111 type: :string,
2112 description: "VAPID public key",
2113 suggestions: ["Public key"]
2114 },
2115 %{
2116 key: :private_key,
2117 type: :string,
2118 description: "VAPID private key",
2119 suggestions: ["Private key"]
2120 }
2121 ]
2122 },
2123 %{
2124 group: :pleroma,
2125 key: Pleroma.Captcha,
2126 type: :group,
2127 description: "Captcha-related settings",
2128 children: [
2129 %{
2130 key: :enabled,
2131 type: :boolean,
2132 description: "Whether the captcha should be shown on registration"
2133 },
2134 %{
2135 key: :method,
2136 type: :module,
2137 description: "The method/service to use for captcha",
2138 suggestions: [Pleroma.Captcha.Kocaptcha, Pleroma.Captcha.Native]
2139 },
2140 %{
2141 key: :seconds_valid,
2142 type: :integer,
2143 description: "The time in seconds for which the captcha is valid",
2144 suggestions: [60]
2145 }
2146 ]
2147 },
2148 %{
2149 group: :pleroma,
2150 key: Pleroma.Captcha.Kocaptcha,
2151 type: :group,
2152 description:
2153 "Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <>
2154 " here: https://github.com/koto-bank/kocaptcha. The default endpoint (https://captcha.kotobank.ch) is hosted by the developer.",
2155 children: [
2156 %{
2157 key: :endpoint,
2158 type: :string,
2159 description: "The kocaptcha endpoint to use",
2160 suggestions: ["https://captcha.kotobank.ch"]
2161 }
2162 ]
2163 },
2164 %{
2165 group: :pleroma,
2166 label: "Pleroma Admin Token",
2167 type: :group,
2168 description:
2169 "Allows setting a token that can be used to authenticate requests with admin privileges without a normal user account token. Append the `admin_token` parameter to requests to utilize it. (Please reconsider using HTTP Basic Auth or OAuth-based authentication if possible)",
2170 children: [
2171 %{
2172 key: :admin_token,
2173 type: :string,
2174 description: "Admin token",
2175 suggestions: [
2176 "Please use a high entropy string or UUID"
2177 ]
2178 }
2179 ]
2180 },
2181 %{
2182 group: :pleroma,
2183 key: Oban,
2184 type: :group,
2185 description: """
2186 [Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.
2187
2188 Note: if you are running PostgreSQL in [`silent_mode`](https://postgresqlco.nf/en/doc/param/silent_mode?version=9.1),
2189 it's advised to set [`log_destination`](https://postgresqlco.nf/en/doc/param/log_destination?version=9.1) to `syslog`,
2190 otherwise `postmaster.log` file may grow because of "you don't own a lock of type ShareLock" warnings
2191 (see https://github.com/sorentwo/oban/issues/52).
2192 """,
2193 children: [
2194 %{
2195 key: :log,
2196 type: {:dropdown, :atom},
2197 description: "Logs verbose mode",
2198 suggestions: [false, :error, :warn, :info, :debug]
2199 },
2200 %{
2201 key: :queues,
2202 type: {:keyword, :integer},
2203 description:
2204 "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)",
2205 suggestions: [
2206 activity_expiration: 10,
2207 attachments_cleanup: 5,
2208 background: 5,
2209 federator_incoming: 50,
2210 federator_outgoing: 50,
2211 mailer: 10,
2212 scheduled_activities: 10,
2213 transmogrifier: 20,
2214 web_push: 50
2215 ],
2216 children: [
2217 %{
2218 key: :activity_expiration,
2219 type: :integer,
2220 description: "Activity expiration queue",
2221 suggestions: [10]
2222 },
2223 %{
2224 key: :attachments_cleanup,
2225 type: :integer,
2226 description: "Attachment deletion queue",
2227 suggestions: [5]
2228 },
2229 %{
2230 key: :background,
2231 type: :integer,
2232 description: "Background queue",
2233 suggestions: [5]
2234 },
2235 %{
2236 key: :federator_incoming,
2237 type: :integer,
2238 description: "Incoming federation queue",
2239 suggestions: [50]
2240 },
2241 %{
2242 key: :federator_outgoing,
2243 type: :integer,
2244 description: "Outgoing federation queue",
2245 suggestions: [50]
2246 },
2247 %{
2248 key: :mailer,
2249 type: :integer,
2250 description: "Email sender queue, see Pleroma.Emails.Mailer",
2251 suggestions: [10]
2252 },
2253 %{
2254 key: :scheduled_activities,
2255 type: :integer,
2256 description: "Scheduled activities queue, see Pleroma.ScheduledActivities",
2257 suggestions: [10]
2258 },
2259 %{
2260 key: :transmogrifier,
2261 type: :integer,
2262 description: "Transmogrifier queue",
2263 suggestions: [20]
2264 },
2265 %{
2266 key: :web_push,
2267 type: :integer,
2268 description: "Web push notifications queue",
2269 suggestions: [50]
2270 }
2271 ]
2272 },
2273 %{
2274 key: :crontab,
2275 type: {:list, :tuple},
2276 description: "Settings for cron background jobs",
2277 suggestions: [
2278 {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker},
2279 {"0 * * * *", Pleroma.Workers.Cron.StatsWorker},
2280 {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker},
2281 {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
2282 {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
2283 ]
2284 }
2285 ]
2286 },
2287 %{
2288 group: :pleroma,
2289 key: :workers,
2290 type: :group,
2291 description: "Includes custom worker options not interpretable directly by `Oban`",
2292 children: [
2293 %{
2294 key: :retries,
2295 type: {:keyword, :integer},
2296 description: "Max retry attempts for failed jobs, per `Oban` queue",
2297 suggestions: [
2298 federator_incoming: 5,
2299 federator_outgoing: 5
2300 ]
2301 }
2302 ]
2303 },
2304 %{
2305 group: :pleroma,
2306 key: Pleroma.Web.Metadata,
2307 type: :group,
2308 description: "Metadata-related settings",
2309 children: [
2310 %{
2311 key: :providers,
2312 type: {:list, :module},
2313 description: "List of metadata providers to enable",
2314 suggestions: [
2315 Pleroma.Web.Metadata.Providers.OpenGraph,
2316 Pleroma.Web.Metadata.Providers.TwitterCard,
2317 Pleroma.Web.Metadata.Providers.RelMe,
2318 Pleroma.Web.Metadata.Providers.Feed
2319 ]
2320 },
2321 %{
2322 key: :unfurl_nsfw,
2323 label: "Unfurl NSFW",
2324 type: :boolean,
2325 description: "When enabled NSFW attachments will be shown in previews"
2326 }
2327 ]
2328 },
2329 %{
2330 group: :pleroma,
2331 key: :rich_media,
2332 type: :group,
2333 description:
2334 "If enabled the instance will parse metadata from attached links to generate link previews",
2335 children: [
2336 %{
2337 key: :enabled,
2338 type: :boolean,
2339 description: "Enables RichMedia parsing of URLs"
2340 },
2341 %{
2342 key: :ignore_hosts,
2343 type: {:list, :string},
2344 description: "List of hosts which will be ignored by the metadata parser",
2345 suggestions: ["accounts.google.com", "xss.website"]
2346 },
2347 %{
2348 key: :ignore_tld,
2349 label: "Ignore TLD",
2350 type: {:list, :string},
2351 description: "List TLDs (top-level domains) which will ignore for parse metadata",
2352 suggestions: ["local", "localdomain", "lan"]
2353 },
2354 %{
2355 key: :parsers,
2356 type: {:list, :module},
2357 description:
2358 "List of Rich Media parsers. Module names are shortened (removed leading `Pleroma.Web.RichMedia.Parsers.` part), but on adding custom module you need to use full name.",
2359 suggestions: [
2360 Pleroma.Web.RichMedia.Parsers.OEmbed,
2361 Pleroma.Web.RichMedia.Parsers.TwitterCard
2362 ]
2363 },
2364 %{
2365 key: :ttl_setters,
2366 label: "TTL setters",
2367 type: {:list, :module},
2368 description:
2369 "List of rich media TTL setters. Module names are shortened (removed leading `Pleroma.Web.RichMedia.Parser.` part), but on adding custom module you need to use full name.",
2370 suggestions: [
2371 Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl
2372 ]
2373 }
2374 ]
2375 },
2376 %{
2377 group: :pleroma,
2378 key: Pleroma.Formatter,
2379 label: "Auto Linker",
2380 type: :group,
2381 description:
2382 "Configuration for Pleroma's link formatter which parses mentions, hashtags, and URLs.",
2383 children: [
2384 %{
2385 key: :class,
2386 type: [:string, :boolean],
2387 description: "Specify the class to be added to the generated link. Disable to clear.",
2388 suggestions: ["auto-linker", false]
2389 },
2390 %{
2391 key: :rel,
2392 type: [:string, :boolean],
2393 description: "Override the rel attribute. Disable to clear.",
2394 suggestions: ["ugc", "noopener noreferrer", false]
2395 },
2396 %{
2397 key: :new_window,
2398 type: :boolean,
2399 description: "Link URLs will open in a new window/tab."
2400 },
2401 %{
2402 key: :truncate,
2403 type: [:integer, :boolean],
2404 description:
2405 "Set to a number to truncate URLs longer than the number. Truncated URLs will end in `...`",
2406 suggestions: [15, false]
2407 },
2408 %{
2409 key: :strip_prefix,
2410 type: :boolean,
2411 description: "Strip the scheme prefix."
2412 },
2413 %{
2414 key: :extra,
2415 type: :boolean,
2416 description: "Link URLs with rarely used schemes (magnet, ipfs, irc, etc.)"
2417 },
2418 %{
2419 key: :validate_tld,
2420 type: [:atom, :boolean],
2421 description:
2422 "Set to false to disable TLD validation for URLs/emails. Can be set to :no_scheme to validate TLDs only for URLs without a scheme (e.g `example.com` will be validated, but `http://example.loki` won't)",
2423 suggestions: [:no_scheme, true]
2424 }
2425 ]
2426 },
2427 %{
2428 group: :pleroma,
2429 key: Pleroma.ScheduledActivity,
2430 type: :group,
2431 description: "Scheduled activities settings",
2432 children: [
2433 %{
2434 key: :daily_user_limit,
2435 type: :integer,
2436 description:
2437 "The number of scheduled activities a user is allowed to create in a single day. Default: 25.",
2438 suggestions: [25]
2439 },
2440 %{
2441 key: :total_user_limit,
2442 type: :integer,
2443 description:
2444 "The number of scheduled activities a user is allowed to create in total. Default: 300.",
2445 suggestions: [300]
2446 },
2447 %{
2448 key: :enabled,
2449 type: :boolean,
2450 description: "Whether scheduled activities are sent to the job queue to be executed"
2451 }
2452 ]
2453 },
2454 %{
2455 group: :pleroma,
2456 key: Pleroma.ActivityExpiration,
2457 type: :group,
2458 description: "Expired activity settings",
2459 children: [
2460 %{
2461 key: :enabled,
2462 type: :boolean,
2463 description: "Whether expired activities will be sent to the job queue to be deleted"
2464 }
2465 ]
2466 },
2467 %{
2468 group: :pleroma,
2469 label: "Pleroma Authenticator",
2470 type: :group,
2471 description: "Authenticator",
2472 children: [
2473 %{
2474 key: Pleroma.Web.Auth.Authenticator,
2475 type: :module,
2476 suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
2477 }
2478 ]
2479 },
2480 %{
2481 group: :pleroma,
2482 key: :ldap,
2483 label: "LDAP",
2484 type: :group,
2485 description:
2486 "Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <>
2487 " will be verified by trying to authenticate (bind) to a LDAP server." <>
2488 " If a user exists in the LDAP directory but there is no account with the same name yet on the" <>
2489 " Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.",
2490 children: [
2491 %{
2492 key: :enabled,
2493 type: :boolean,
2494 description: "Enables LDAP authentication"
2495 },
2496 %{
2497 key: :host,
2498 type: :string,
2499 description: "LDAP server hostname",
2500 suggestions: ["localhosts"]
2501 },
2502 %{
2503 key: :port,
2504 type: :integer,
2505 description: "LDAP port, e.g. 389 or 636",
2506 suggestions: [389, 636]
2507 },
2508 %{
2509 key: :ssl,
2510 label: "SSL",
2511 type: :boolean,
2512 description: "Enable to use SSL, usually implies the port 636"
2513 },
2514 %{
2515 key: :sslopts,
2516 label: "SSL options",
2517 type: :keyword,
2518 description: "Additional SSL options",
2519 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2520 children: [
2521 %{
2522 key: :cacertfile,
2523 type: :string,
2524 description: "Path to file with PEM encoded cacerts",
2525 suggestions: ["path/to/file/with/PEM/cacerts"]
2526 },
2527 %{
2528 key: :verify,
2529 type: :atom,
2530 description: "Type of cert verification",
2531 suggestions: [:verify_peer]
2532 }
2533 ]
2534 },
2535 %{
2536 key: :tls,
2537 label: "TLS",
2538 type: :boolean,
2539 description: "Enable to use STARTTLS, usually implies the port 389"
2540 },
2541 %{
2542 key: :tlsopts,
2543 label: "TLS options",
2544 type: :keyword,
2545 description: "Additional TLS options",
2546 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2547 children: [
2548 %{
2549 key: :cacertfile,
2550 type: :string,
2551 description: "Path to file with PEM encoded cacerts",
2552 suggestions: ["path/to/file/with/PEM/cacerts"]
2553 },
2554 %{
2555 key: :verify,
2556 type: :atom,
2557 description: "Type of cert verification",
2558 suggestions: [:verify_peer]
2559 }
2560 ]
2561 },
2562 %{
2563 key: :base,
2564 type: :string,
2565 description: "LDAP base, e.g. \"dc=example,dc=com\"",
2566 suggestions: ["dc=example,dc=com"]
2567 },
2568 %{
2569 key: :uid,
2570 label: "UID",
2571 type: :string,
2572 description:
2573 "LDAP attribute name to authenticate the user, e.g. when \"cn\", the filter will be \"cn=username,base\"",
2574 suggestions: ["cn"]
2575 }
2576 ]
2577 },
2578 %{
2579 group: :pleroma,
2580 key: :auth,
2581 type: :group,
2582 description: "Authentication / authorization settings",
2583 children: [
2584 %{
2585 key: :enforce_oauth_admin_scope_usage,
2586 label: "Enforce OAuth admin scope usage",
2587 type: :boolean,
2588 description:
2589 "OAuth admin scope requirement toggle. " <>
2590 "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <>
2591 "(client app must support admin scopes). If disabled and token doesn't have admin scope(s), " <>
2592 "`is_admin` user flag grants access to admin-specific actions."
2593 },
2594 %{
2595 key: :auth_template,
2596 type: :string,
2597 description:
2598 "Authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.ee`.",
2599 suggestions: ["show.html"]
2600 },
2601 %{
2602 key: :oauth_consumer_template,
2603 label: "OAuth consumer template",
2604 type: :string,
2605 description:
2606 "OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to" <>
2607 " `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.",
2608 suggestions: ["consumer.html"]
2609 },
2610 %{
2611 key: :oauth_consumer_strategies,
2612 label: "OAuth consumer strategies",
2613 type: {:list, :string},
2614 description:
2615 "The list of enabled OAuth consumer strategies. By default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <>
2616 " Each entry in this space-delimited string should be of format \"strategy\" or \"strategy:dependency\"" <>
2617 " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_<strategy>).",
2618 suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"]
2619 }
2620 ]
2621 },
2622 %{
2623 group: :pleroma,
2624 key: :email_notifications,
2625 type: :group,
2626 description: "Email notifications settings",
2627 children: [
2628 %{
2629 key: :digest,
2630 type: :map,
2631 description:
2632 "emails of \"what you've missed\" for users who have been inactive for a while",
2633 suggestions: [
2634 %{
2635 active: false,
2636 schedule: "0 0 * * 0",
2637 interval: 7,
2638 inactivity_threshold: 7
2639 }
2640 ],
2641 children: [
2642 %{
2643 key: :active,
2644 label: "Enabled",
2645 type: :boolean,
2646 description: "Globally enable or disable digest emails"
2647 },
2648 %{
2649 key: :schedule,
2650 type: :string,
2651 description:
2652 "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\".",
2653 suggestions: ["0 0 * * 0"]
2654 },
2655 %{
2656 key: :interval,
2657 type: :integer,
2658 description: "Minimum interval between digest emails to one user",
2659 suggestions: [7]
2660 },
2661 %{
2662 key: :inactivity_threshold,
2663 type: :integer,
2664 description: "Minimum user inactivity threshold",
2665 suggestions: [7]
2666 }
2667 ]
2668 }
2669 ]
2670 },
2671 %{
2672 group: :pleroma,
2673 key: Pleroma.Emails.UserEmail,
2674 type: :group,
2675 description: "Email template settings",
2676 children: [
2677 %{
2678 key: :logo,
2679 type: {:string, :image},
2680 description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.",
2681 suggestions: ["some/path/logo.png"]
2682 },
2683 %{
2684 key: :styling,
2685 type: :map,
2686 description: "A map with color settings for email templates.",
2687 suggestions: [
2688 %{
2689 link_color: "#d8a070",
2690 background_color: "#2C3645",
2691 content_background_color: "#1B2635",
2692 header_color: "#d8a070",
2693 text_color: "#b9b9ba",
2694 text_muted_color: "#b9b9ba"
2695 }
2696 ],
2697 children: [
2698 %{
2699 key: :link_color,
2700 type: :string,
2701 suggestions: ["#d8a070"]
2702 },
2703 %{
2704 key: :background_color,
2705 type: :string,
2706 suggestions: ["#2C3645"]
2707 },
2708 %{
2709 key: :content_background_color,
2710 type: :string,
2711 suggestions: ["#1B2635"]
2712 },
2713 %{
2714 key: :header_color,
2715 type: :string,
2716 suggestions: ["#d8a070"]
2717 },
2718 %{
2719 key: :text_color,
2720 type: :string,
2721 suggestions: ["#b9b9ba"]
2722 },
2723 %{
2724 key: :text_muted_color,
2725 type: :string,
2726 suggestions: ["#b9b9ba"]
2727 }
2728 ]
2729 }
2730 ]
2731 },
2732 %{
2733 group: :pleroma,
2734 key: Pleroma.Emails.NewUsersDigestEmail,
2735 type: :group,
2736 description: "New users admin email digest",
2737 children: [
2738 %{
2739 key: :enabled,
2740 type: :boolean,
2741 description: "Enables new users admin digest email when `true`"
2742 }
2743 ]
2744 },
2745 %{
2746 group: :pleroma,
2747 key: :oauth2,
2748 label: "OAuth2",
2749 type: :group,
2750 description: "Configure OAuth 2 provider capabilities",
2751 children: [
2752 %{
2753 key: :token_expires_in,
2754 type: :integer,
2755 description: "The lifetime in seconds of the access token",
2756 suggestions: [600]
2757 },
2758 %{
2759 key: :issue_new_refresh_token,
2760 type: :boolean,
2761 description:
2762 "Keeps old refresh token or generate new refresh token when to obtain an access token"
2763 },
2764 %{
2765 key: :clean_expired_tokens,
2766 type: :boolean,
2767 description: "Enable a background job to clean expired OAuth tokens. Default: disabled."
2768 }
2769 ]
2770 },
2771 %{
2772 group: :pleroma,
2773 key: :emoji,
2774 type: :group,
2775 children: [
2776 %{
2777 key: :shortcode_globs,
2778 type: {:list, :string},
2779 description: "Location of custom emoji files. * can be used as a wildcard.",
2780 suggestions: ["/emoji/custom/**/*.png"]
2781 },
2782 %{
2783 key: :pack_extensions,
2784 type: {:list, :string},
2785 description:
2786 "A list of file extensions for emojis, when no emoji.txt for a pack is present",
2787 suggestions: [".png", ".gif"]
2788 },
2789 %{
2790 key: :groups,
2791 type: {:keyword, {:list, :string}},
2792 description:
2793 "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name" <>
2794 " and the value is the location or array of locations. * can be used as a wildcard.",
2795 suggestions: [
2796 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
2797 ]
2798 },
2799 %{
2800 key: :default_manifest,
2801 type: :string,
2802 description:
2803 "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
2804 " Currently only one manifest can be added (no arrays).",
2805 suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
2806 },
2807 %{
2808 key: :shared_pack_cache_seconds_per_file,
2809 label: "Shared pack cache s/file",
2810 type: :integer,
2811 descpiption:
2812 "When an emoji pack is shared, the archive is created and cached in memory" <>
2813 " for this amount of seconds multiplied by the number of files.",
2814 suggestions: [60]
2815 }
2816 ]
2817 },
2818 %{
2819 group: :pleroma,
2820 key: :rate_limit,
2821 type: :group,
2822 description:
2823 "Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
2824 children: [
2825 %{
2826 key: :search,
2827 type: [:tuple, {:list, :tuple}],
2828 description: "For the search requests (account & status search etc.)",
2829 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2830 },
2831 %{
2832 key: :timeline,
2833 type: [:tuple, {:list, :tuple}],
2834 description: "For requests to timelines (each timeline has it's own limiter)",
2835 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2836 },
2837 %{
2838 key: :app_account_creation,
2839 type: [:tuple, {:list, :tuple}],
2840 description: "For registering user accounts from the same IP address",
2841 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2842 },
2843 %{
2844 key: :relations_actions,
2845 type: [:tuple, {:list, :tuple}],
2846 description: "For actions on relationships with all users (follow, unfollow)",
2847 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2848 },
2849 %{
2850 key: :relation_id_action,
2851 label: "Relation ID action",
2852 type: [:tuple, {:list, :tuple}],
2853 description: "For actions on relation with a specific user (follow, unfollow)",
2854 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2855 },
2856 %{
2857 key: :statuses_actions,
2858 type: [:tuple, {:list, :tuple}],
2859 description:
2860 "For create / delete / fav / unfav / reblog / unreblog actions on any statuses",
2861 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2862 },
2863 %{
2864 key: :status_id_action,
2865 label: "Status ID action",
2866 type: [:tuple, {:list, :tuple}],
2867 description:
2868 "For fav / unfav or reblog / unreblog actions on the same status by the same user",
2869 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2870 },
2871 %{
2872 key: :authentication,
2873 type: [:tuple, {:list, :tuple}],
2874 description: "For authentication create / password check / user existence check requests",
2875 suggestions: [{60_000, 15}]
2876 }
2877 ]
2878 },
2879 %{
2880 group: :esshd,
2881 label: "ESSHD",
2882 type: :group,
2883 description:
2884 "Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <>
2885 "and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key",
2886 children: [
2887 %{
2888 key: :enabled,
2889 type: :boolean,
2890 description: "Enables SSH"
2891 },
2892 %{
2893 key: :priv_dir,
2894 type: :string,
2895 description: "Dir with SSH keys",
2896 suggestions: ["/some/path/ssh_keys"]
2897 },
2898 %{
2899 key: :handler,
2900 type: :string,
2901 description: "Handler module",
2902 suggestions: ["Pleroma.BBS.Handler"]
2903 },
2904 %{
2905 key: :port,
2906 type: :integer,
2907 description: "Port to connect",
2908 suggestions: [10_022]
2909 },
2910 %{
2911 key: :password_authenticator,
2912 type: :string,
2913 description: "Authenticator module",
2914 suggestions: ["Pleroma.BBS.Authenticator"]
2915 }
2916 ]
2917 },
2918 %{
2919 group: :mime,
2920 label: "Mime Types",
2921 type: :group,
2922 description: "Mime Types settings",
2923 children: [
2924 %{
2925 key: :types,
2926 type: :map,
2927 suggestions: [
2928 %{
2929 "application/xml" => ["xml"],
2930 "application/xrd+xml" => ["xrd+xml"],
2931 "application/jrd+json" => ["jrd+json"],
2932 "application/activity+json" => ["activity+json"],
2933 "application/ld+json" => ["activity+json"]
2934 }
2935 ],
2936 children: [
2937 %{
2938 key: "application/xml",
2939 type: {:list, :string},
2940 suggestions: ["xml"]
2941 },
2942 %{
2943 key: "application/xrd+xml",
2944 type: {:list, :string},
2945 suggestions: ["xrd+xml"]
2946 },
2947 %{
2948 key: "application/jrd+json",
2949 type: {:list, :string},
2950 suggestions: ["jrd+json"]
2951 },
2952 %{
2953 key: "application/activity+json",
2954 type: {:list, :string},
2955 suggestions: ["activity+json"]
2956 },
2957 %{
2958 key: "application/ld+json",
2959 type: {:list, :string},
2960 suggestions: ["activity+json"]
2961 }
2962 ]
2963 }
2964 ]
2965 },
2966 %{
2967 group: :pleroma,
2968 key: :chat,
2969 type: :group,
2970 description: "Pleroma chat settings",
2971 children: [
2972 %{
2973 key: :enabled,
2974 type: :boolean
2975 }
2976 ]
2977 },
2978 %{
2979 group: :pleroma,
2980 key: :http,
2981 label: "HTTP",
2982 type: :group,
2983 description: "HTTP settings",
2984 children: [
2985 %{
2986 key: :proxy_url,
2987 label: "Proxy URL",
2988 type: [:string, :tuple],
2989 description: "Proxy URL",
2990 suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
2991 },
2992 %{
2993 key: :send_user_agent,
2994 type: :boolean
2995 },
2996 %{
2997 key: :user_agent,
2998 type: [:string, :atom],
2999 description:
3000 "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`.",
3001 suggestions: ["Pleroma", :default]
3002 },
3003 %{
3004 key: :adapter,
3005 type: :keyword,
3006 description: "Adapter specific options",
3007 suggestions: [],
3008 children: [
3009 %{
3010 key: :ssl_options,
3011 type: :keyword,
3012 label: "SSL Options",
3013 description: "SSL options for HTTP adapter",
3014 children: [
3015 %{
3016 key: :versions,
3017 type: {:list, :atom},
3018 description: "List of TLS version to use",
3019 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
3020 }
3021 ]
3022 }
3023 ]
3024 }
3025 ]
3026 },
3027 %{
3028 group: :pleroma,
3029 key: :markup,
3030 label: "Markup Settings",
3031 type: :group,
3032 children: [
3033 %{
3034 key: :allow_inline_images,
3035 type: :boolean
3036 },
3037 %{
3038 key: :allow_headings,
3039 type: :boolean
3040 },
3041 %{
3042 key: :allow_tables,
3043 type: :boolean
3044 },
3045 %{
3046 key: :allow_fonts,
3047 type: :boolean
3048 },
3049 %{
3050 key: :scrub_policy,
3051 type: {:list, :module},
3052 description:
3053 "Module names are shortened (removed leading `Pleroma.HTML.` part), but on adding custom module you need to use full name.",
3054 suggestions: [Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]
3055 }
3056 ]
3057 },
3058 %{
3059 group: :pleroma,
3060 key: :user,
3061 type: :group,
3062 children: [
3063 %{
3064 key: :deny_follow_blocked,
3065 type: :boolean
3066 }
3067 ]
3068 },
3069 %{
3070 group: :pleroma,
3071 key: :mrf_normalize_markup,
3072 tab: :mrf,
3073 related_policy: "Pleroma.Web.ActivityPub.MRF.NormalizeMarkup",
3074 label: "MRF Normalize Markup",
3075 description: "MRF NormalizeMarkup settings. Scrub configured hypertext markup.",
3076 type: :group,
3077 children: [
3078 %{
3079 key: :scrub_policy,
3080 type: :module,
3081 suggestions: [Pleroma.HTML.Scrubber.Default]
3082 }
3083 ]
3084 },
3085 %{
3086 group: :pleroma,
3087 key: Pleroma.User,
3088 type: :group,
3089 children: [
3090 %{
3091 key: :restricted_nicknames,
3092 type: {:list, :string},
3093 description: "List of nicknames users may not register with.",
3094 suggestions: [
3095 ".well-known",
3096 "~",
3097 "about",
3098 "activities",
3099 "api",
3100 "auth",
3101 "check_password",
3102 "dev",
3103 "friend-requests",
3104 "inbox",
3105 "internal",
3106 "main",
3107 "media",
3108 "nodeinfo",
3109 "notice",
3110 "oauth",
3111 "objects",
3112 "ostatus_subscribe",
3113 "pleroma",
3114 "proxy",
3115 "push",
3116 "registration",
3117 "relay",
3118 "settings",
3119 "status",
3120 "tag",
3121 "user-search",
3122 "user_exists",
3123 "users",
3124 "web"
3125 ]
3126 },
3127 %{
3128 key: :email_blacklist,
3129 type: {:list, :string},
3130 description: "List of email domains users may not register with.",
3131 suggestions: ["mailinator.com", "maildrop.cc"]
3132 }
3133 ]
3134 },
3135 %{
3136 group: :cors_plug,
3137 label: "CORS plug config",
3138 type: :group,
3139 children: [
3140 %{
3141 key: :max_age,
3142 type: :integer,
3143 suggestions: [86_400]
3144 },
3145 %{
3146 key: :methods,
3147 type: {:list, :string},
3148 suggestions: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]
3149 },
3150 %{
3151 key: :expose,
3152 type: {:list, :string},
3153 suggestions: [
3154 "Link",
3155 "X-RateLimit-Reset",
3156 "X-RateLimit-Limit",
3157 "X-RateLimit-Remaining",
3158 "X-Request-Id",
3159 "Idempotency-Key"
3160 ]
3161 },
3162 %{
3163 key: :credentials,
3164 type: :boolean
3165 },
3166 %{
3167 key: :headers,
3168 type: {:list, :string},
3169 suggestions: ["Authorization", "Content-Type", "Idempotency-Key"]
3170 }
3171 ]
3172 },
3173 %{
3174 group: :pleroma,
3175 key: Pleroma.Plugs.RemoteIp,
3176 type: :group,
3177 description: """
3178 `Pleroma.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
3179 **If your instance is not behind at least one reverse proxy, you should not enable this plug.**
3180 """,
3181 children: [
3182 %{
3183 key: :enabled,
3184 type: :boolean,
3185 description: "Enable/disable the plug. Default: disabled."
3186 },
3187 %{
3188 key: :headers,
3189 type: {:list, :string},
3190 description:
3191 "A list of strings naming the `req_headers` to use when deriving the `remote_ip`. Order does not matter. Default: `~w[forwarded x-forwarded-for x-client-ip x-real-ip]`."
3192 },
3193 %{
3194 key: :proxies,
3195 type: {:list, :string},
3196 description:
3197 "A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Default: `[]`."
3198 },
3199 %{
3200 key: :reserved,
3201 type: {:list, :string},
3202 description:
3203 "Defaults to [localhost](https://en.wikipedia.org/wiki/Localhost) and [private network](https://en.wikipedia.org/wiki/Private_network)."
3204 }
3205 ]
3206 },
3207 %{
3208 group: :pleroma,
3209 key: :web_cache_ttl,
3210 label: "Web cache TTL",
3211 type: :group,
3212 description:
3213 "The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration.",
3214 children: [
3215 %{
3216 key: :activity_pub,
3217 type: :integer,
3218 description:
3219 "Activity pub routes (except question activities). Default: `nil` (no expiration).",
3220 suggestions: [30_000, nil]
3221 },
3222 %{
3223 key: :activity_pub_question,
3224 type: :integer,
3225 description: "Activity pub routes (question activities). Default: `30_000` (30 seconds).",
3226 suggestions: [30_000]
3227 }
3228 ]
3229 },
3230 %{
3231 group: :pleroma,
3232 key: :static_fe,
3233 label: "Static FE",
3234 type: :group,
3235 description:
3236 "Render profiles and posts using server-generated HTML that is viewable without using JavaScript",
3237 children: [
3238 %{
3239 key: :enabled,
3240 type: :boolean,
3241 description: "Enables the rendering of static HTML. Default: disabled."
3242 }
3243 ]
3244 },
3245 %{
3246 group: :pleroma,
3247 key: :feed,
3248 type: :group,
3249 description: "Configure feed rendering",
3250 children: [
3251 %{
3252 key: :post_title,
3253 type: :map,
3254 description: "Configure title rendering",
3255 children: [
3256 %{
3257 key: :max_length,
3258 type: :integer,
3259 description: "Maximum number of characters before truncating title",
3260 suggestions: [100]
3261 },
3262 %{
3263 key: :omission,
3264 type: :string,
3265 description: "Replacement which will be used after truncating string",
3266 suggestions: ["..."]
3267 }
3268 ]
3269 }
3270 ]
3271 },
3272 %{
3273 group: :pleroma,
3274 key: :mrf_object_age,
3275 tab: :mrf,
3276 related_policy: "Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy",
3277 label: "MRF Object Age",
3278 type: :group,
3279 description:
3280 "Rejects or delists posts based on their timestamp deviance from your server's clock.",
3281 children: [
3282 %{
3283 key: :threshold,
3284 type: :integer,
3285 description: "Required age (in seconds) of a post before actions are taken.",
3286 suggestions: [172_800]
3287 },
3288 %{
3289 key: :actions,
3290 type: {:list, :atom},
3291 description:
3292 "A list of actions to apply to the post. `:delist` removes the post from public timelines; " <>
3293 "`:strip_followers` removes followers from the ActivityPub recipient list ensuring they won't be delivered to home timelines; " <>
3294 "`:reject` rejects the message entirely",
3295 suggestions: [:delist, :strip_followers, :reject]
3296 }
3297 ]
3298 },
3299 %{
3300 group: :pleroma,
3301 key: :modules,
3302 type: :group,
3303 description: "Custom Runtime Modules",
3304 children: [
3305 %{
3306 key: :runtime_dir,
3307 type: :string,
3308 description: "A path to custom Elixir modules (such as MRF policies)."
3309 }
3310 ]
3311 },
3312 %{
3313 group: :pleroma,
3314 key: :streamer,
3315 type: :group,
3316 description: "Settings for notifications streamer",
3317 children: [
3318 %{
3319 key: :workers,
3320 type: :integer,
3321 description: "Number of workers to send notifications",
3322 suggestions: [3]
3323 },
3324 %{
3325 key: :overflow_workers,
3326 type: :integer,
3327 description: "Maximum number of workers created if pool is empty",
3328 suggestions: [2]
3329 }
3330 ]
3331 },
3332 %{
3333 group: :pleroma,
3334 key: :connections_pool,
3335 type: :group,
3336 description: "Advanced settings for `Gun` connections pool",
3337 children: [
3338 %{
3339 key: :connection_acquisition_wait,
3340 type: :integer,
3341 description:
3342 "Timeout to acquire a connection from pool. The total max time is this value multiplied by the number of retries. Default: 250ms.",
3343 suggestions: [250]
3344 },
3345 %{
3346 key: :connection_acquisition_retries,
3347 type: :integer,
3348 description:
3349 "Number of attempts to acquire the connection from the pool if it is overloaded. Default: 5",
3350 suggestions: [5]
3351 },
3352 %{
3353 key: :max_connections,
3354 type: :integer,
3355 description: "Maximum number of connections in the pool. Default: 250 connections.",
3356 suggestions: [250]
3357 },
3358 %{
3359 key: :await_up_timeout,
3360 type: :integer,
3361 description: "Timeout while `gun` will wait until connection is up. Default: 5000ms.",
3362 suggestions: [5000]
3363 },
3364 %{
3365 key: :reclaim_multiplier,
3366 type: :integer,
3367 description:
3368 "Multiplier for the number of idle connection to be reclaimed if the pool is full. For example if the pool maxes out at 250 connections and this setting is set to 0.3, the pool will reclaim at most 75 idle connections if it's overloaded. Default: 0.1",
3369 suggestions: [0.1]
3370 }
3371 ]
3372 },
3373 %{
3374 group: :pleroma,
3375 key: :pools,
3376 type: :group,
3377 description: "Advanced settings for `Gun` workers pools",
3378 children:
3379 Enum.map([:federation, :media, :upload, :default], fn pool_name ->
3380 %{
3381 key: pool_name,
3382 type: :keyword,
3383 description: "Settings for #{pool_name} pool.",
3384 children: [
3385 %{
3386 key: :size,
3387 type: :integer,
3388 description: "Maximum number of concurrent requests in the pool.",
3389 suggestions: [50]
3390 },
3391 %{
3392 key: :max_waiting,
3393 type: :integer,
3394 description:
3395 "Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errrors when a new request is made",
3396 suggestions: [10]
3397 }
3398 ]
3399 }
3400 end)
3401 },
3402 %{
3403 group: :pleroma,
3404 key: :hackney_pools,
3405 type: :group,
3406 description: "Advanced settings for `Hackney` connections pools",
3407 children: [
3408 %{
3409 key: :federation,
3410 type: :keyword,
3411 description: "Settings for federation pool.",
3412 children: [
3413 %{
3414 key: :max_connections,
3415 type: :integer,
3416 description: "Number workers in the pool.",
3417 suggestions: [50]
3418 },
3419 %{
3420 key: :timeout,
3421 type: :integer,
3422 description: "Timeout while `hackney` will wait for response.",
3423 suggestions: [150_000]
3424 }
3425 ]
3426 },
3427 %{
3428 key: :media,
3429 type: :keyword,
3430 description: "Settings for media pool.",
3431 children: [
3432 %{
3433 key: :max_connections,
3434 type: :integer,
3435 description: "Number workers in the pool.",
3436 suggestions: [50]
3437 },
3438 %{
3439 key: :timeout,
3440 type: :integer,
3441 description: "Timeout while `hackney` will wait for response.",
3442 suggestions: [150_000]
3443 }
3444 ]
3445 },
3446 %{
3447 key: :upload,
3448 type: :keyword,
3449 description: "Settings for upload pool.",
3450 children: [
3451 %{
3452 key: :max_connections,
3453 type: :integer,
3454 description: "Number workers in the pool.",
3455 suggestions: [25]
3456 },
3457 %{
3458 key: :timeout,
3459 type: :integer,
3460 description: "Timeout while `hackney` will wait for response.",
3461 suggestions: [300_000]
3462 }
3463 ]
3464 }
3465 ]
3466 },
3467 %{
3468 group: :pleroma,
3469 key: :restrict_unauthenticated,
3470 label: "Restrict Unauthenticated",
3471 type: :group,
3472 description:
3473 "Disallow viewing timelines, user profiles and statuses for unauthenticated users.",
3474 children: [
3475 %{
3476 key: :timelines,
3477 type: :map,
3478 description: "Settings for public and federated timelines.",
3479 children: [
3480 %{
3481 key: :local,
3482 type: :boolean,
3483 description: "Disallow view public timeline."
3484 },
3485 %{
3486 key: :federated,
3487 type: :boolean,
3488 description: "Disallow view federated timeline."
3489 }
3490 ]
3491 },
3492 %{
3493 key: :profiles,
3494 type: :map,
3495 description: "Settings for user profiles.",
3496 children: [
3497 %{
3498 key: :local,
3499 type: :boolean,
3500 description: "Disallow view local user profiles."
3501 },
3502 %{
3503 key: :remote,
3504 type: :boolean,
3505 description: "Disallow view remote user profiles."
3506 }
3507 ]
3508 },
3509 %{
3510 key: :activities,
3511 type: :map,
3512 description: "Settings for statuses.",
3513 children: [
3514 %{
3515 key: :local,
3516 type: :boolean,
3517 description: "Disallow view local statuses."
3518 },
3519 %{
3520 key: :remote,
3521 type: :boolean,
3522 description: "Disallow view remote statuses."
3523 }
3524 ]
3525 }
3526 ]
3527 },
3528 %{
3529 group: :pleroma,
3530 key: Pleroma.Web.ApiSpec.CastAndValidate,
3531 type: :group,
3532 children: [
3533 %{
3534 key: :strict,
3535 type: :boolean,
3536 description:
3537 "Enables strict input validation (useful in development, not recommended in production)"
3538 }
3539 ]
3540 },
3541 %{
3542 group: :pleroma,
3543 key: :instances_favicons,
3544 type: :group,
3545 description: "Control favicons for instances",
3546 children: [
3547 %{
3548 key: :enabled,
3549 type: :boolean,
3550 description: "Allow/disallow displaying and getting instances favicons"
3551 }
3552 ]
3553 },
3554 %{
3555 group: :ex_aws,
3556 key: :s3,
3557 type: :group,
3558 descriptions: "S3 service related settings",
3559 children: [
3560 %{
3561 key: :access_key_id,
3562 type: :string,
3563 description: "S3 access key ID",
3564 suggestions: ["AKIAQ8UKHTGIYN7DMWWJ"]
3565 },
3566 %{
3567 key: :secret_access_key,
3568 type: :string,
3569 description: "Secret access key",
3570 suggestions: ["JFGt+fgH1UQ7vLUQjpW+WvjTdV/UNzVxcwn7DkaeFKtBS5LvoXvIiME4NQBsT6ZZ"]
3571 },
3572 %{
3573 key: :host,
3574 type: :string,
3575 description: "S3 host",
3576 suggestions: ["s3.eu-central-1.amazonaws.com"]
3577 }
3578 ]
3579 },
3580 %{
3581 group: :pleroma,
3582 key: :frontends,
3583 type: :group,
3584 description: "Installed frontends management",
3585 children: [
3586 %{
3587 key: :primary,
3588 type: :map,
3589 description: "Primary frontend, the one that is served for all pages by default",
3590 children: frontend_options
3591 },
3592 %{
3593 key: :admin,
3594 type: :map,
3595 description: "Admin frontend",
3596 children: frontend_options
3597 },
3598 %{
3599 key: :available,
3600 type: :map,
3601 description:
3602 "A map containing available frontends and parameters for their installation.",
3603 children: [
3604 frontend_options
3605 ]
3606 }
3607 ]
3608 },
3609 %{
3610 group: :pleroma,
3611 key: Pleroma.Web.Preload,
3612 type: :group,
3613 description: "Preload-related settings",
3614 children: [
3615 %{
3616 key: :providers,
3617 type: {:list, :module},
3618 description: "List of preload providers to enable",
3619 suggestions: [
3620 Pleroma.Web.Preload.Providers.Instance,
3621 Pleroma.Web.Preload.Providers.User,
3622 Pleroma.Web.Preload.Providers.Timelines,
3623 Pleroma.Web.Preload.Providers.StatusNet
3624 ]
3625 }
3626 ]
3627 }
3628 ]