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