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