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