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