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