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