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