69072312c840bb9e5ee1b9d973c5587f325408f1
[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: :mrf,
1560 tab: :mrf,
1561 label: "MRF",
1562 type: :group,
1563 description: "General MRF settings",
1564 children: [
1565 %{
1566 key: :policies,
1567 type: [:module, {:list, :module}],
1568 description:
1569 "A list of MRF policies enabled. Module names are shortened (removed leading `Pleroma.Web.ActivityPub.MRF.` part), but on adding custom module you need to use full name.",
1570 suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF}
1571 },
1572 %{
1573 key: :transparency,
1574 label: "MRF transparency",
1575 type: :boolean,
1576 description:
1577 "Make the content of your Message Rewrite Facility settings public (via nodeinfo)"
1578 },
1579 %{
1580 key: :transparency_exclusions,
1581 label: "MRF transparency exclusions",
1582 type: {:list, :string},
1583 description:
1584 "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.",
1585 suggestions: [
1586 "exclusion.com"
1587 ]
1588 }
1589 ]
1590 },
1591 %{
1592 group: :pleroma,
1593 key: :media_proxy,
1594 type: :group,
1595 description: "Media proxy",
1596 children: [
1597 %{
1598 key: :enabled,
1599 type: :boolean,
1600 description: "Enables proxying of remote media to the instance's proxy"
1601 },
1602 %{
1603 key: :base_url,
1604 label: "Base URL",
1605 type: :string,
1606 description:
1607 "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
1608 suggestions: ["https://example.com"]
1609 },
1610 %{
1611 key: :invalidation,
1612 type: :keyword,
1613 descpiption: "",
1614 suggestions: [
1615 enabled: true,
1616 provider: Pleroma.Web.MediaProxy.Invalidation.Script
1617 ],
1618 children: [
1619 %{
1620 key: :enabled,
1621 type: :boolean,
1622 description: "Enables media cache object invalidation."
1623 },
1624 %{
1625 key: :provider,
1626 type: :module,
1627 description: "Module which will be used to purge objects from the cache.",
1628 suggestions: [
1629 Pleroma.Web.MediaProxy.Invalidation.Script,
1630 Pleroma.Web.MediaProxy.Invalidation.Http
1631 ]
1632 }
1633 ]
1634 },
1635 %{
1636 key: :proxy_opts,
1637 label: "Proxy Options",
1638 type: :keyword,
1639 description: "Options for Pleroma.ReverseProxy",
1640 suggestions: [
1641 redirect_on_failure: false,
1642 max_body_length: 25 * 1_048_576,
1643 max_read_duration: 30_000,
1644 http: [
1645 follow_redirect: true,
1646 pool: :media
1647 ]
1648 ],
1649 children: [
1650 %{
1651 key: :redirect_on_failure,
1652 type: :boolean,
1653 description:
1654 "Redirects the client to the real remote URL if there's any HTTP errors. " <>
1655 "Any error during body processing will not be redirected as the response is chunked."
1656 },
1657 %{
1658 key: :max_body_length,
1659 type: :integer,
1660 description:
1661 "Limits the content length to be approximately the " <>
1662 "specified length. It is validated with the `content-length` header and also verified when proxying."
1663 },
1664 %{
1665 key: :max_read_duration,
1666 type: :integer,
1667 description: "Timeout (in milliseconds) of GET request to remote URI."
1668 },
1669 %{
1670 key: :http,
1671 label: "HTTP",
1672 type: :keyword,
1673 description: "HTTP options",
1674 children: [
1675 %{
1676 key: :adapter,
1677 type: :keyword,
1678 description: "Adapter specific options",
1679 children: [
1680 %{
1681 key: :ssl_options,
1682 type: :keyword,
1683 label: "SSL Options",
1684 description: "SSL options for HTTP adapter",
1685 children: [
1686 %{
1687 key: :versions,
1688 type: {:list, :atom},
1689 description: "List of TLS version to use",
1690 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
1691 }
1692 ]
1693 }
1694 ]
1695 },
1696 %{
1697 key: :proxy_url,
1698 label: "Proxy URL",
1699 type: [:string, :tuple],
1700 description: "Proxy URL",
1701 suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
1702 }
1703 ]
1704 }
1705 ]
1706 },
1707 %{
1708 key: :whitelist,
1709 type: {:list, :string},
1710 description: "List of hosts with scheme to bypass the mediaproxy",
1711 suggestions: ["http://example.com"]
1712 }
1713 ]
1714 },
1715 %{
1716 group: :pleroma,
1717 key: :media_preview_proxy,
1718 type: :group,
1719 description: "Media preview proxy",
1720 children: [
1721 %{
1722 key: :enabled,
1723 type: :boolean,
1724 description:
1725 "Enables proxying of remote media preview to the instance's proxy. Requires enabled media proxy."
1726 },
1727 %{
1728 key: :thumbnail_max_width,
1729 type: :integer,
1730 description:
1731 "Max width of preview thumbnail for images (video preview always has original dimensions)."
1732 },
1733 %{
1734 key: :thumbnail_max_height,
1735 type: :integer,
1736 description:
1737 "Max height of preview thumbnail for images (video preview always has original dimensions)."
1738 },
1739 %{
1740 key: :image_quality,
1741 type: :integer,
1742 description: "Quality of the output. Ranges from 0 (min quality) to 100 (max quality)."
1743 },
1744 %{
1745 key: :min_content_length,
1746 type: :integer,
1747 description:
1748 "Min content length to perform preview, in bytes. If greater than 0, media smaller in size will be served as is, without thumbnailing."
1749 }
1750 ]
1751 },
1752 %{
1753 group: :pleroma,
1754 key: Pleroma.Web.MediaProxy.Invalidation.Http,
1755 type: :group,
1756 description: "HTTP invalidate settings",
1757 children: [
1758 %{
1759 key: :method,
1760 type: :atom,
1761 description: "HTTP method of request. Default: :purge"
1762 },
1763 %{
1764 key: :headers,
1765 type: {:keyword, :string},
1766 description: "HTTP headers of request",
1767 suggestions: [{"x-refresh", 1}]
1768 },
1769 %{
1770 key: :options,
1771 type: :keyword,
1772 description: "Request options",
1773 children: [
1774 %{
1775 key: :params,
1776 type: {:map, :string}
1777 }
1778 ]
1779 }
1780 ]
1781 },
1782 %{
1783 group: :pleroma,
1784 key: Pleroma.Web.MediaProxy.Invalidation.Script,
1785 type: :group,
1786 description: "Script invalidate settings",
1787 children: [
1788 %{
1789 key: :script_path,
1790 type: :string,
1791 description: "Path to shell script. Which will run purge cache.",
1792 suggestions: ["./installation/nginx-cache-purge.sh.example"]
1793 }
1794 ]
1795 },
1796 %{
1797 group: :pleroma,
1798 key: :gopher,
1799 type: :group,
1800 description: "Gopher settings",
1801 children: [
1802 %{
1803 key: :enabled,
1804 type: :boolean,
1805 description: "Enables the gopher interface"
1806 },
1807 %{
1808 key: :ip,
1809 label: "IP",
1810 type: :tuple,
1811 description: "IP address to bind to",
1812 suggestions: [{0, 0, 0, 0}]
1813 },
1814 %{
1815 key: :port,
1816 type: :integer,
1817 description: "Port to bind to",
1818 suggestions: [9999]
1819 },
1820 %{
1821 key: :dstport,
1822 type: :integer,
1823 description: "Port advertised in URLs (optional, defaults to port)",
1824 suggestions: [9999]
1825 }
1826 ]
1827 },
1828 %{
1829 group: :pleroma,
1830 key: :activitypub,
1831 label: "ActivityPub",
1832 type: :group,
1833 description: "ActivityPub-related settings",
1834 children: [
1835 %{
1836 key: :unfollow_blocked,
1837 type: :boolean,
1838 description: "Whether blocks result in people getting unfollowed"
1839 },
1840 %{
1841 key: :outgoing_blocks,
1842 type: :boolean,
1843 description: "Whether to federate blocks to other instances"
1844 },
1845 %{
1846 key: :sign_object_fetches,
1847 type: :boolean,
1848 description: "Sign object fetches with HTTP signatures"
1849 },
1850 %{
1851 key: :note_replies_output_limit,
1852 type: :integer,
1853 description:
1854 "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)"
1855 },
1856 %{
1857 key: :follow_handshake_timeout,
1858 type: :integer,
1859 description: "Following handshake timeout",
1860 suggestions: [500]
1861 }
1862 ]
1863 },
1864 %{
1865 group: :pleroma,
1866 key: :http_security,
1867 label: "HTTP security",
1868 type: :group,
1869 description: "HTTP security settings",
1870 children: [
1871 %{
1872 key: :enabled,
1873 type: :boolean,
1874 description: "Whether the managed content security policy is enabled"
1875 },
1876 %{
1877 key: :sts,
1878 label: "STS",
1879 type: :boolean,
1880 description: "Whether to additionally send a Strict-Transport-Security header"
1881 },
1882 %{
1883 key: :sts_max_age,
1884 label: "STS max age",
1885 type: :integer,
1886 description: "The maximum age for the Strict-Transport-Security header if sent",
1887 suggestions: [31_536_000]
1888 },
1889 %{
1890 key: :ct_max_age,
1891 label: "CT max age",
1892 type: :integer,
1893 description: "The maximum age for the Expect-CT header if sent",
1894 suggestions: [2_592_000]
1895 },
1896 %{
1897 key: :referrer_policy,
1898 type: :string,
1899 description: "The referrer policy to use, either \"same-origin\" or \"no-referrer\"",
1900 suggestions: ["same-origin", "no-referrer"]
1901 },
1902 %{
1903 key: :report_uri,
1904 label: "Report URI",
1905 type: :string,
1906 description: "Adds the specified URL to report-uri and report-to group in CSP header",
1907 suggestions: ["https://example.com/report-uri"]
1908 }
1909 ]
1910 },
1911 %{
1912 group: :web_push_encryption,
1913 key: :vapid_details,
1914 label: "Vapid Details",
1915 type: :group,
1916 description:
1917 "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it.",
1918 children: [
1919 %{
1920 key: :subject,
1921 type: :string,
1922 description:
1923 "A mailto link for the administrative contact." <>
1924 " It's best if this email is not a personal email address, but rather a group email to the instance moderation team.",
1925 suggestions: ["mailto:moderators@pleroma.com"]
1926 },
1927 %{
1928 key: :public_key,
1929 type: :string,
1930 description: "VAPID public key",
1931 suggestions: ["Public key"]
1932 },
1933 %{
1934 key: :private_key,
1935 type: :string,
1936 description: "VAPID private key",
1937 suggestions: ["Private key"]
1938 }
1939 ]
1940 },
1941 %{
1942 group: :pleroma,
1943 key: Pleroma.Captcha,
1944 type: :group,
1945 description: "Captcha-related settings",
1946 children: [
1947 %{
1948 key: :enabled,
1949 type: :boolean,
1950 description: "Whether the captcha should be shown on registration"
1951 },
1952 %{
1953 key: :method,
1954 type: :module,
1955 description: "The method/service to use for captcha",
1956 suggestions: [Pleroma.Captcha.Kocaptcha, Pleroma.Captcha.Native]
1957 },
1958 %{
1959 key: :seconds_valid,
1960 type: :integer,
1961 description: "The time in seconds for which the captcha is valid",
1962 suggestions: [60]
1963 }
1964 ]
1965 },
1966 %{
1967 group: :pleroma,
1968 key: Pleroma.Captcha.Kocaptcha,
1969 type: :group,
1970 description:
1971 "Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <>
1972 " here: https://github.com/koto-bank/kocaptcha. The default endpoint (https://captcha.kotobank.ch) is hosted by the developer.",
1973 children: [
1974 %{
1975 key: :endpoint,
1976 type: :string,
1977 description: "The kocaptcha endpoint to use",
1978 suggestions: ["https://captcha.kotobank.ch"]
1979 }
1980 ]
1981 },
1982 %{
1983 group: :pleroma,
1984 label: "Pleroma Admin Token",
1985 type: :group,
1986 description:
1987 "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)",
1988 children: [
1989 %{
1990 key: :admin_token,
1991 type: :string,
1992 description: "Admin token",
1993 suggestions: [
1994 "Please use a high entropy string or UUID"
1995 ]
1996 }
1997 ]
1998 },
1999 %{
2000 group: :pleroma,
2001 key: Oban,
2002 type: :group,
2003 description: """
2004 [Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.
2005
2006 Note: if you are running PostgreSQL in [`silent_mode`](https://postgresqlco.nf/en/doc/param/silent_mode?version=9.1),
2007 it's advised to set [`log_destination`](https://postgresqlco.nf/en/doc/param/log_destination?version=9.1) to `syslog`,
2008 otherwise `postmaster.log` file may grow because of "you don't own a lock of type ShareLock" warnings
2009 (see https://github.com/sorentwo/oban/issues/52).
2010 """,
2011 children: [
2012 %{
2013 key: :log,
2014 type: {:dropdown, :atom},
2015 description: "Logs verbose mode",
2016 suggestions: [false, :error, :warn, :info, :debug]
2017 },
2018 %{
2019 key: :queues,
2020 type: {:keyword, :integer},
2021 description:
2022 "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)",
2023 suggestions: [
2024 activity_expiration: 10,
2025 attachments_cleanup: 5,
2026 background: 5,
2027 federator_incoming: 50,
2028 federator_outgoing: 50,
2029 mailer: 10,
2030 scheduled_activities: 10,
2031 transmogrifier: 20,
2032 web_push: 50
2033 ],
2034 children: [
2035 %{
2036 key: :activity_expiration,
2037 type: :integer,
2038 description: "Activity expiration queue",
2039 suggestions: [10]
2040 },
2041 %{
2042 key: :backup,
2043 type: :integer,
2044 description: "Backup queue",
2045 suggestions: [1]
2046 },
2047 %{
2048 key: :attachments_cleanup,
2049 type: :integer,
2050 description: "Attachment deletion queue",
2051 suggestions: [5]
2052 },
2053 %{
2054 key: :background,
2055 type: :integer,
2056 description: "Background queue",
2057 suggestions: [5]
2058 },
2059 %{
2060 key: :federator_incoming,
2061 type: :integer,
2062 description: "Incoming federation queue",
2063 suggestions: [50]
2064 },
2065 %{
2066 key: :federator_outgoing,
2067 type: :integer,
2068 description: "Outgoing federation queue",
2069 suggestions: [50]
2070 },
2071 %{
2072 key: :mailer,
2073 type: :integer,
2074 description: "Email sender queue, see Pleroma.Emails.Mailer",
2075 suggestions: [10]
2076 },
2077 %{
2078 key: :scheduled_activities,
2079 type: :integer,
2080 description: "Scheduled activities queue, see Pleroma.ScheduledActivities",
2081 suggestions: [10]
2082 },
2083 %{
2084 key: :transmogrifier,
2085 type: :integer,
2086 description: "Transmogrifier queue",
2087 suggestions: [20]
2088 },
2089 %{
2090 key: :web_push,
2091 type: :integer,
2092 description: "Web push notifications queue",
2093 suggestions: [50]
2094 }
2095 ]
2096 },
2097 %{
2098 key: :crontab,
2099 type: {:list, :tuple},
2100 description: "Settings for cron background jobs",
2101 suggestions: [
2102 {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
2103 {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
2104 ]
2105 }
2106 ]
2107 },
2108 %{
2109 group: :pleroma,
2110 key: :workers,
2111 type: :group,
2112 description: "Includes custom worker options not interpretable directly by `Oban`",
2113 children: [
2114 %{
2115 key: :retries,
2116 type: {:keyword, :integer},
2117 description: "Max retry attempts for failed jobs, per `Oban` queue",
2118 suggestions: [
2119 federator_incoming: 5,
2120 federator_outgoing: 5
2121 ]
2122 }
2123 ]
2124 },
2125 %{
2126 group: :pleroma,
2127 key: Pleroma.Web.Metadata,
2128 type: :group,
2129 description: "Metadata-related settings",
2130 children: [
2131 %{
2132 key: :providers,
2133 type: {:list, :module},
2134 description: "List of metadata providers to enable",
2135 suggestions: [
2136 Pleroma.Web.Metadata.Providers.OpenGraph,
2137 Pleroma.Web.Metadata.Providers.TwitterCard,
2138 Pleroma.Web.Metadata.Providers.RelMe,
2139 Pleroma.Web.Metadata.Providers.Feed
2140 ]
2141 },
2142 %{
2143 key: :unfurl_nsfw,
2144 label: "Unfurl NSFW",
2145 type: :boolean,
2146 description: "When enabled NSFW attachments will be shown in previews"
2147 }
2148 ]
2149 },
2150 %{
2151 group: :pleroma,
2152 key: :rich_media,
2153 type: :group,
2154 description:
2155 "If enabled the instance will parse metadata from attached links to generate link previews",
2156 children: [
2157 %{
2158 key: :enabled,
2159 type: :boolean,
2160 description: "Enables RichMedia parsing of URLs"
2161 },
2162 %{
2163 key: :ignore_hosts,
2164 type: {:list, :string},
2165 description: "List of hosts which will be ignored by the metadata parser",
2166 suggestions: ["accounts.google.com", "xss.website"]
2167 },
2168 %{
2169 key: :ignore_tld,
2170 label: "Ignore TLD",
2171 type: {:list, :string},
2172 description: "List TLDs (top-level domains) which will ignore for parse metadata",
2173 suggestions: ["local", "localdomain", "lan"]
2174 },
2175 %{
2176 key: :parsers,
2177 type: {:list, :module},
2178 description:
2179 "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.",
2180 suggestions: [
2181 Pleroma.Web.RichMedia.Parsers.OEmbed,
2182 Pleroma.Web.RichMedia.Parsers.TwitterCard
2183 ]
2184 },
2185 %{
2186 key: :ttl_setters,
2187 label: "TTL setters",
2188 type: {:list, :module},
2189 description:
2190 "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.",
2191 suggestions: [
2192 Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl
2193 ]
2194 },
2195 %{
2196 key: :failure_backoff,
2197 type: :integer,
2198 description:
2199 "Amount of milliseconds after request failure, during which the request will not be retried.",
2200 suggestions: [60_000]
2201 }
2202 ]
2203 },
2204 %{
2205 group: :pleroma,
2206 key: Pleroma.Formatter,
2207 label: "Linkify",
2208 type: :group,
2209 description:
2210 "Configuration for Pleroma's link formatter which parses mentions, hashtags, and URLs.",
2211 children: [
2212 %{
2213 key: :class,
2214 type: [:string, :boolean],
2215 description: "Specify the class to be added to the generated link. Disable to clear.",
2216 suggestions: ["auto-linker", false]
2217 },
2218 %{
2219 key: :rel,
2220 type: [:string, :boolean],
2221 description: "Override the rel attribute. Disable to clear.",
2222 suggestions: ["ugc", "noopener noreferrer", false]
2223 },
2224 %{
2225 key: :new_window,
2226 type: :boolean,
2227 description: "Link URLs will open in a new window/tab."
2228 },
2229 %{
2230 key: :truncate,
2231 type: [:integer, :boolean],
2232 description:
2233 "Set to a number to truncate URLs longer than the number. Truncated URLs will end in `...`",
2234 suggestions: [15, false]
2235 },
2236 %{
2237 key: :strip_prefix,
2238 type: :boolean,
2239 description: "Strip the scheme prefix."
2240 },
2241 %{
2242 key: :extra,
2243 type: :boolean,
2244 description: "Link URLs with rarely used schemes (magnet, ipfs, irc, etc.)"
2245 },
2246 %{
2247 key: :validate_tld,
2248 type: [:atom, :boolean],
2249 description:
2250 "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)",
2251 suggestions: [:no_scheme, true]
2252 }
2253 ]
2254 },
2255 %{
2256 group: :pleroma,
2257 key: Pleroma.ScheduledActivity,
2258 type: :group,
2259 description: "Scheduled activities settings",
2260 children: [
2261 %{
2262 key: :daily_user_limit,
2263 type: :integer,
2264 description:
2265 "The number of scheduled activities a user is allowed to create in a single day. Default: 25.",
2266 suggestions: [25]
2267 },
2268 %{
2269 key: :total_user_limit,
2270 type: :integer,
2271 description:
2272 "The number of scheduled activities a user is allowed to create in total. Default: 300.",
2273 suggestions: [300]
2274 },
2275 %{
2276 key: :enabled,
2277 type: :boolean,
2278 description: "Whether scheduled activities are sent to the job queue to be executed"
2279 }
2280 ]
2281 },
2282 %{
2283 group: :pleroma,
2284 key: Pleroma.Workers.PurgeExpiredActivity,
2285 type: :group,
2286 description: "Expired activities settings",
2287 children: [
2288 %{
2289 key: :enabled,
2290 type: :boolean,
2291 description: "Enables expired activities addition & deletion"
2292 },
2293 %{
2294 key: :min_lifetime,
2295 type: :integer,
2296 description: "Minimum lifetime for ephemeral activity (in seconds)",
2297 suggestions: [600]
2298 }
2299 ]
2300 },
2301 %{
2302 group: :pleroma,
2303 label: "Pleroma Authenticator",
2304 type: :group,
2305 description: "Authenticator",
2306 children: [
2307 %{
2308 key: Pleroma.Web.Auth.Authenticator,
2309 type: :module,
2310 suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
2311 }
2312 ]
2313 },
2314 %{
2315 group: :pleroma,
2316 key: :ldap,
2317 label: "LDAP",
2318 type: :group,
2319 description:
2320 "Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <>
2321 " will be verified by trying to authenticate (bind) to a LDAP server." <>
2322 " If a user exists in the LDAP directory but there is no account with the same name yet on the" <>
2323 " Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.",
2324 children: [
2325 %{
2326 key: :enabled,
2327 type: :boolean,
2328 description: "Enables LDAP authentication"
2329 },
2330 %{
2331 key: :host,
2332 type: :string,
2333 description: "LDAP server hostname",
2334 suggestions: ["localhosts"]
2335 },
2336 %{
2337 key: :port,
2338 type: :integer,
2339 description: "LDAP port, e.g. 389 or 636",
2340 suggestions: [389, 636]
2341 },
2342 %{
2343 key: :ssl,
2344 label: "SSL",
2345 type: :boolean,
2346 description: "Enable to use SSL, usually implies the port 636"
2347 },
2348 %{
2349 key: :sslopts,
2350 label: "SSL options",
2351 type: :keyword,
2352 description: "Additional SSL options",
2353 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2354 children: [
2355 %{
2356 key: :cacertfile,
2357 type: :string,
2358 description: "Path to file with PEM encoded cacerts",
2359 suggestions: ["path/to/file/with/PEM/cacerts"]
2360 },
2361 %{
2362 key: :verify,
2363 type: :atom,
2364 description: "Type of cert verification",
2365 suggestions: [:verify_peer]
2366 }
2367 ]
2368 },
2369 %{
2370 key: :tls,
2371 label: "TLS",
2372 type: :boolean,
2373 description: "Enable to use STARTTLS, usually implies the port 389"
2374 },
2375 %{
2376 key: :tlsopts,
2377 label: "TLS options",
2378 type: :keyword,
2379 description: "Additional TLS options",
2380 suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2381 children: [
2382 %{
2383 key: :cacertfile,
2384 type: :string,
2385 description: "Path to file with PEM encoded cacerts",
2386 suggestions: ["path/to/file/with/PEM/cacerts"]
2387 },
2388 %{
2389 key: :verify,
2390 type: :atom,
2391 description: "Type of cert verification",
2392 suggestions: [:verify_peer]
2393 }
2394 ]
2395 },
2396 %{
2397 key: :base,
2398 type: :string,
2399 description: "LDAP base, e.g. \"dc=example,dc=com\"",
2400 suggestions: ["dc=example,dc=com"]
2401 },
2402 %{
2403 key: :uid,
2404 label: "UID",
2405 type: :string,
2406 description:
2407 "LDAP attribute name to authenticate the user, e.g. when \"cn\", the filter will be \"cn=username,base\"",
2408 suggestions: ["cn"]
2409 }
2410 ]
2411 },
2412 %{
2413 group: :pleroma,
2414 key: :auth,
2415 type: :group,
2416 description: "Authentication / authorization settings",
2417 children: [
2418 %{
2419 key: :enforce_oauth_admin_scope_usage,
2420 label: "Enforce OAuth admin scope usage",
2421 type: :boolean,
2422 description:
2423 "OAuth admin scope requirement toggle. " <>
2424 "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <>
2425 "(client app must support admin scopes). If disabled and token doesn't have admin scope(s), " <>
2426 "`is_admin` user flag grants access to admin-specific actions."
2427 },
2428 %{
2429 key: :auth_template,
2430 type: :string,
2431 description:
2432 "Authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.ee`.",
2433 suggestions: ["show.html"]
2434 },
2435 %{
2436 key: :oauth_consumer_template,
2437 label: "OAuth consumer template",
2438 type: :string,
2439 description:
2440 "OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to" <>
2441 " `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.",
2442 suggestions: ["consumer.html"]
2443 },
2444 %{
2445 key: :oauth_consumer_strategies,
2446 label: "OAuth consumer strategies",
2447 type: {:list, :string},
2448 description:
2449 "The list of enabled OAuth consumer strategies. By default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <>
2450 " Each entry in this space-delimited string should be of format \"strategy\" or \"strategy:dependency\"" <>
2451 " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_<strategy>).",
2452 suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"]
2453 }
2454 ]
2455 },
2456 %{
2457 group: :pleroma,
2458 key: :email_notifications,
2459 type: :group,
2460 description: "Email notifications settings",
2461 children: [
2462 %{
2463 key: :digest,
2464 type: :map,
2465 description:
2466 "emails of \"what you've missed\" for users who have been inactive for a while",
2467 suggestions: [
2468 %{
2469 active: false,
2470 schedule: "0 0 * * 0",
2471 interval: 7,
2472 inactivity_threshold: 7
2473 }
2474 ],
2475 children: [
2476 %{
2477 key: :active,
2478 label: "Enabled",
2479 type: :boolean,
2480 description: "Globally enable or disable digest emails"
2481 },
2482 %{
2483 key: :schedule,
2484 type: :string,
2485 description:
2486 "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\".",
2487 suggestions: ["0 0 * * 0"]
2488 },
2489 %{
2490 key: :interval,
2491 type: :integer,
2492 description: "Minimum interval between digest emails to one user",
2493 suggestions: [7]
2494 },
2495 %{
2496 key: :inactivity_threshold,
2497 type: :integer,
2498 description: "Minimum user inactivity threshold",
2499 suggestions: [7]
2500 }
2501 ]
2502 }
2503 ]
2504 },
2505 %{
2506 group: :pleroma,
2507 key: Pleroma.Emails.UserEmail,
2508 type: :group,
2509 description: "Email template settings",
2510 children: [
2511 %{
2512 key: :logo,
2513 type: {:string, :image},
2514 description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.",
2515 suggestions: ["some/path/logo.png"]
2516 },
2517 %{
2518 key: :styling,
2519 type: :map,
2520 description: "A map with color settings for email templates.",
2521 suggestions: [
2522 %{
2523 link_color: "#d8a070",
2524 background_color: "#2C3645",
2525 content_background_color: "#1B2635",
2526 header_color: "#d8a070",
2527 text_color: "#b9b9ba",
2528 text_muted_color: "#b9b9ba"
2529 }
2530 ],
2531 children: [
2532 %{
2533 key: :link_color,
2534 type: :string,
2535 suggestions: ["#d8a070"]
2536 },
2537 %{
2538 key: :background_color,
2539 type: :string,
2540 suggestions: ["#2C3645"]
2541 },
2542 %{
2543 key: :content_background_color,
2544 type: :string,
2545 suggestions: ["#1B2635"]
2546 },
2547 %{
2548 key: :header_color,
2549 type: :string,
2550 suggestions: ["#d8a070"]
2551 },
2552 %{
2553 key: :text_color,
2554 type: :string,
2555 suggestions: ["#b9b9ba"]
2556 },
2557 %{
2558 key: :text_muted_color,
2559 type: :string,
2560 suggestions: ["#b9b9ba"]
2561 }
2562 ]
2563 }
2564 ]
2565 },
2566 %{
2567 group: :pleroma,
2568 key: Pleroma.Emails.NewUsersDigestEmail,
2569 type: :group,
2570 description: "New users admin email digest",
2571 children: [
2572 %{
2573 key: :enabled,
2574 type: :boolean,
2575 description: "Enables new users admin digest email when `true`"
2576 }
2577 ]
2578 },
2579 %{
2580 group: :pleroma,
2581 key: :oauth2,
2582 label: "OAuth2",
2583 type: :group,
2584 description: "Configure OAuth 2 provider capabilities",
2585 children: [
2586 %{
2587 key: :token_expires_in,
2588 type: :integer,
2589 description: "The lifetime in seconds of the access token",
2590 suggestions: [600]
2591 },
2592 %{
2593 key: :issue_new_refresh_token,
2594 type: :boolean,
2595 description:
2596 "Keeps old refresh token or generate new refresh token when to obtain an access token"
2597 },
2598 %{
2599 key: :clean_expired_tokens,
2600 type: :boolean,
2601 description: "Enable a background job to clean expired OAuth tokens. Default: disabled."
2602 }
2603 ]
2604 },
2605 %{
2606 group: :pleroma,
2607 key: :emoji,
2608 type: :group,
2609 children: [
2610 %{
2611 key: :shortcode_globs,
2612 type: {:list, :string},
2613 description: "Location of custom emoji files. * can be used as a wildcard.",
2614 suggestions: ["/emoji/custom/**/*.png"]
2615 },
2616 %{
2617 key: :pack_extensions,
2618 type: {:list, :string},
2619 description:
2620 "A list of file extensions for emojis, when no emoji.txt for a pack is present",
2621 suggestions: [".png", ".gif"]
2622 },
2623 %{
2624 key: :groups,
2625 type: {:keyword, {:list, :string}},
2626 description:
2627 "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name" <>
2628 " and the value is the location or array of locations. * can be used as a wildcard.",
2629 suggestions: [
2630 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
2631 ]
2632 },
2633 %{
2634 key: :default_manifest,
2635 type: :string,
2636 description:
2637 "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
2638 " Currently only one manifest can be added (no arrays).",
2639 suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
2640 },
2641 %{
2642 key: :shared_pack_cache_seconds_per_file,
2643 label: "Shared pack cache s/file",
2644 type: :integer,
2645 descpiption:
2646 "When an emoji pack is shared, the archive is created and cached in memory" <>
2647 " for this amount of seconds multiplied by the number of files.",
2648 suggestions: [60]
2649 }
2650 ]
2651 },
2652 %{
2653 group: :pleroma,
2654 key: :rate_limit,
2655 type: :group,
2656 description:
2657 "Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
2658 children: [
2659 %{
2660 key: :search,
2661 type: [:tuple, {:list, :tuple}],
2662 description: "For the search requests (account & status search etc.)",
2663 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2664 },
2665 %{
2666 key: :timeline,
2667 type: [:tuple, {:list, :tuple}],
2668 description: "For requests to timelines (each timeline has it's own limiter)",
2669 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2670 },
2671 %{
2672 key: :app_account_creation,
2673 type: [:tuple, {:list, :tuple}],
2674 description: "For registering user accounts from the same IP address",
2675 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2676 },
2677 %{
2678 key: :relations_actions,
2679 type: [:tuple, {:list, :tuple}],
2680 description: "For actions on relationships with all users (follow, unfollow)",
2681 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2682 },
2683 %{
2684 key: :relation_id_action,
2685 label: "Relation ID action",
2686 type: [:tuple, {:list, :tuple}],
2687 description: "For actions on relation with a specific user (follow, unfollow)",
2688 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2689 },
2690 %{
2691 key: :statuses_actions,
2692 type: [:tuple, {:list, :tuple}],
2693 description:
2694 "For create / delete / fav / unfav / reblog / unreblog actions on any statuses",
2695 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2696 },
2697 %{
2698 key: :status_id_action,
2699 label: "Status ID action",
2700 type: [:tuple, {:list, :tuple}],
2701 description:
2702 "For fav / unfav or reblog / unreblog actions on the same status by the same user",
2703 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2704 },
2705 %{
2706 key: :authentication,
2707 type: [:tuple, {:list, :tuple}],
2708 description: "For authentication create / password check / user existence check requests",
2709 suggestions: [{60_000, 15}]
2710 }
2711 ]
2712 },
2713 %{
2714 group: :esshd,
2715 label: "ESSHD",
2716 type: :group,
2717 description:
2718 "Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <>
2719 "and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key",
2720 children: [
2721 %{
2722 key: :enabled,
2723 type: :boolean,
2724 description: "Enables SSH"
2725 },
2726 %{
2727 key: :priv_dir,
2728 type: :string,
2729 description: "Dir with SSH keys",
2730 suggestions: ["/some/path/ssh_keys"]
2731 },
2732 %{
2733 key: :handler,
2734 type: :string,
2735 description: "Handler module",
2736 suggestions: ["Pleroma.BBS.Handler"]
2737 },
2738 %{
2739 key: :port,
2740 type: :integer,
2741 description: "Port to connect",
2742 suggestions: [10_022]
2743 },
2744 %{
2745 key: :password_authenticator,
2746 type: :string,
2747 description: "Authenticator module",
2748 suggestions: ["Pleroma.BBS.Authenticator"]
2749 }
2750 ]
2751 },
2752 %{
2753 group: :mime,
2754 label: "Mime Types",
2755 type: :group,
2756 description: "Mime Types settings",
2757 children: [
2758 %{
2759 key: :types,
2760 type: :map,
2761 suggestions: [
2762 %{
2763 "application/xml" => ["xml"],
2764 "application/xrd+xml" => ["xrd+xml"],
2765 "application/jrd+json" => ["jrd+json"],
2766 "application/activity+json" => ["activity+json"],
2767 "application/ld+json" => ["activity+json"]
2768 }
2769 ],
2770 children: [
2771 %{
2772 key: "application/xml",
2773 type: {:list, :string},
2774 suggestions: ["xml"]
2775 },
2776 %{
2777 key: "application/xrd+xml",
2778 type: {:list, :string},
2779 suggestions: ["xrd+xml"]
2780 },
2781 %{
2782 key: "application/jrd+json",
2783 type: {:list, :string},
2784 suggestions: ["jrd+json"]
2785 },
2786 %{
2787 key: "application/activity+json",
2788 type: {:list, :string},
2789 suggestions: ["activity+json"]
2790 },
2791 %{
2792 key: "application/ld+json",
2793 type: {:list, :string},
2794 suggestions: ["activity+json"]
2795 }
2796 ]
2797 }
2798 ]
2799 },
2800 %{
2801 group: :pleroma,
2802 key: :chat,
2803 type: :group,
2804 description: "Pleroma chat settings",
2805 children: [
2806 %{
2807 key: :enabled,
2808 type: :boolean
2809 }
2810 ]
2811 },
2812 %{
2813 group: :pleroma,
2814 key: :http,
2815 label: "HTTP",
2816 type: :group,
2817 description: "HTTP settings",
2818 children: [
2819 %{
2820 key: :proxy_url,
2821 label: "Proxy URL",
2822 type: [:string, :tuple],
2823 description: "Proxy URL",
2824 suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
2825 },
2826 %{
2827 key: :send_user_agent,
2828 type: :boolean
2829 },
2830 %{
2831 key: :user_agent,
2832 type: [:string, :atom],
2833 description:
2834 "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`.",
2835 suggestions: ["Pleroma", :default]
2836 },
2837 %{
2838 key: :adapter,
2839 type: :keyword,
2840 description: "Adapter specific options",
2841 suggestions: [],
2842 children: [
2843 %{
2844 key: :ssl_options,
2845 type: :keyword,
2846 label: "SSL Options",
2847 description: "SSL options for HTTP adapter",
2848 children: [
2849 %{
2850 key: :versions,
2851 type: {:list, :atom},
2852 description: "List of TLS version to use",
2853 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
2854 }
2855 ]
2856 }
2857 ]
2858 }
2859 ]
2860 },
2861 %{
2862 group: :pleroma,
2863 key: :markup,
2864 label: "Markup Settings",
2865 type: :group,
2866 children: [
2867 %{
2868 key: :allow_inline_images,
2869 type: :boolean
2870 },
2871 %{
2872 key: :allow_headings,
2873 type: :boolean
2874 },
2875 %{
2876 key: :allow_tables,
2877 type: :boolean
2878 },
2879 %{
2880 key: :allow_fonts,
2881 type: :boolean
2882 },
2883 %{
2884 key: :scrub_policy,
2885 type: {:list, :module},
2886 description:
2887 "Module names are shortened (removed leading `Pleroma.HTML.` part), but on adding custom module you need to use full name.",
2888 suggestions: [Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]
2889 }
2890 ]
2891 },
2892 %{
2893 group: :pleroma,
2894 key: :user,
2895 type: :group,
2896 children: [
2897 %{
2898 key: :deny_follow_blocked,
2899 type: :boolean
2900 }
2901 ]
2902 },
2903 %{
2904 group: :pleroma,
2905 key: Pleroma.User,
2906 type: :group,
2907 children: [
2908 %{
2909 key: :restricted_nicknames,
2910 type: {:list, :string},
2911 description: "List of nicknames users may not register with.",
2912 suggestions: [
2913 ".well-known",
2914 "~",
2915 "about",
2916 "activities",
2917 "api",
2918 "auth",
2919 "check_password",
2920 "dev",
2921 "friend-requests",
2922 "inbox",
2923 "internal",
2924 "main",
2925 "media",
2926 "nodeinfo",
2927 "notice",
2928 "oauth",
2929 "objects",
2930 "ostatus_subscribe",
2931 "pleroma",
2932 "proxy",
2933 "push",
2934 "registration",
2935 "relay",
2936 "settings",
2937 "status",
2938 "tag",
2939 "user-search",
2940 "user_exists",
2941 "users",
2942 "web"
2943 ]
2944 },
2945 %{
2946 key: :email_blacklist,
2947 type: {:list, :string},
2948 description: "List of email domains users may not register with.",
2949 suggestions: ["mailinator.com", "maildrop.cc"]
2950 }
2951 ]
2952 },
2953 %{
2954 group: :cors_plug,
2955 label: "CORS plug config",
2956 type: :group,
2957 children: [
2958 %{
2959 key: :max_age,
2960 type: :integer,
2961 suggestions: [86_400]
2962 },
2963 %{
2964 key: :methods,
2965 type: {:list, :string},
2966 suggestions: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]
2967 },
2968 %{
2969 key: :expose,
2970 type: {:list, :string},
2971 suggestions: [
2972 "Link",
2973 "X-RateLimit-Reset",
2974 "X-RateLimit-Limit",
2975 "X-RateLimit-Remaining",
2976 "X-Request-Id",
2977 "Idempotency-Key"
2978 ]
2979 },
2980 %{
2981 key: :credentials,
2982 type: :boolean
2983 },
2984 %{
2985 key: :headers,
2986 type: {:list, :string},
2987 suggestions: ["Authorization", "Content-Type", "Idempotency-Key"]
2988 }
2989 ]
2990 },
2991 %{
2992 group: :pleroma,
2993 key: Pleroma.Web.Plugs.RemoteIp,
2994 type: :group,
2995 description: """
2996 `Pleroma.Web.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
2997 **If your instance is not behind at least one reverse proxy, you should not enable this plug.**
2998 """,
2999 children: [
3000 %{
3001 key: :enabled,
3002 type: :boolean,
3003 description: "Enable/disable the plug. Default: disabled."
3004 },
3005 %{
3006 key: :headers,
3007 type: {:list, :string},
3008 description: """
3009 A list of strings naming the HTTP headers to use when deriving the true client IP. Default: `["x-forwarded-for"]`.
3010 """
3011 },
3012 %{
3013 key: :proxies,
3014 type: {:list, :string},
3015 description:
3016 "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."
3017 },
3018 %{
3019 key: :reserved,
3020 type: {:list, :string},
3021 description: """
3022 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"]`
3023 """
3024 }
3025 ]
3026 },
3027 %{
3028 group: :pleroma,
3029 key: :web_cache_ttl,
3030 label: "Web cache TTL",
3031 type: :group,
3032 description:
3033 "The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration.",
3034 children: [
3035 %{
3036 key: :activity_pub,
3037 type: :integer,
3038 description:
3039 "Activity pub routes (except question activities). Default: `nil` (no expiration).",
3040 suggestions: [30_000, nil]
3041 },
3042 %{
3043 key: :activity_pub_question,
3044 type: :integer,
3045 description: "Activity pub routes (question activities). Default: `30_000` (30 seconds).",
3046 suggestions: [30_000]
3047 }
3048 ]
3049 },
3050 %{
3051 group: :pleroma,
3052 key: :static_fe,
3053 label: "Static FE",
3054 type: :group,
3055 description:
3056 "Render profiles and posts using server-generated HTML that is viewable without using JavaScript",
3057 children: [
3058 %{
3059 key: :enabled,
3060 type: :boolean,
3061 description: "Enables the rendering of static HTML. Default: disabled."
3062 }
3063 ]
3064 },
3065 %{
3066 group: :pleroma,
3067 key: :feed,
3068 type: :group,
3069 description: "Configure feed rendering",
3070 children: [
3071 %{
3072 key: :post_title,
3073 type: :map,
3074 description: "Configure title rendering",
3075 children: [
3076 %{
3077 key: :max_length,
3078 type: :integer,
3079 description: "Maximum number of characters before truncating title",
3080 suggestions: [100]
3081 },
3082 %{
3083 key: :omission,
3084 type: :string,
3085 description: "Replacement which will be used after truncating string",
3086 suggestions: ["..."]
3087 }
3088 ]
3089 }
3090 ]
3091 },
3092 %{
3093 group: :pleroma,
3094 key: :modules,
3095 type: :group,
3096 description: "Custom Runtime Modules",
3097 children: [
3098 %{
3099 key: :runtime_dir,
3100 type: :string,
3101 description: "A path to custom Elixir modules (such as MRF policies)."
3102 }
3103 ]
3104 },
3105 %{
3106 group: :pleroma,
3107 key: :streamer,
3108 type: :group,
3109 description: "Settings for notifications streamer",
3110 children: [
3111 %{
3112 key: :workers,
3113 type: :integer,
3114 description: "Number of workers to send notifications",
3115 suggestions: [3]
3116 },
3117 %{
3118 key: :overflow_workers,
3119 type: :integer,
3120 description: "Maximum number of workers created if pool is empty",
3121 suggestions: [2]
3122 }
3123 ]
3124 },
3125 %{
3126 group: :pleroma,
3127 key: :connections_pool,
3128 type: :group,
3129 description: "Advanced settings for `Gun` connections pool",
3130 children: [
3131 %{
3132 key: :connection_acquisition_wait,
3133 type: :integer,
3134 description:
3135 "Timeout to acquire a connection from pool. The total max time is this value multiplied by the number of retries. Default: 250ms.",
3136 suggestions: [250]
3137 },
3138 %{
3139 key: :connection_acquisition_retries,
3140 type: :integer,
3141 description:
3142 "Number of attempts to acquire the connection from the pool if it is overloaded. Default: 5",
3143 suggestions: [5]
3144 },
3145 %{
3146 key: :max_connections,
3147 type: :integer,
3148 description: "Maximum number of connections in the pool. Default: 250 connections.",
3149 suggestions: [250]
3150 },
3151 %{
3152 key: :connect_timeout,
3153 type: :integer,
3154 description: "Timeout while `gun` will wait until connection is up. Default: 5000ms.",
3155 suggestions: [5000]
3156 },
3157 %{
3158 key: :reclaim_multiplier,
3159 type: :integer,
3160 description:
3161 "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",
3162 suggestions: [0.1]
3163 }
3164 ]
3165 },
3166 %{
3167 group: :pleroma,
3168 key: :pools,
3169 type: :group,
3170 description: "Advanced settings for `Gun` workers pools",
3171 children:
3172 Enum.map([:federation, :media, :upload, :default], fn pool_name ->
3173 %{
3174 key: pool_name,
3175 type: :keyword,
3176 description: "Settings for #{pool_name} pool.",
3177 children: [
3178 %{
3179 key: :size,
3180 type: :integer,
3181 description: "Maximum number of concurrent requests in the pool.",
3182 suggestions: [50]
3183 },
3184 %{
3185 key: :max_waiting,
3186 type: :integer,
3187 description:
3188 "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",
3189 suggestions: [10]
3190 },
3191 %{
3192 key: :recv_timeout,
3193 type: :integer,
3194 description: "Timeout for the pool while gun will wait for response",
3195 suggestions: [10_000]
3196 }
3197 ]
3198 }
3199 end)
3200 },
3201 %{
3202 group: :pleroma,
3203 key: :hackney_pools,
3204 type: :group,
3205 description: "Advanced settings for `Hackney` connections pools",
3206 children: [
3207 %{
3208 key: :federation,
3209 type: :keyword,
3210 description: "Settings for federation pool.",
3211 children: [
3212 %{
3213 key: :max_connections,
3214 type: :integer,
3215 description: "Number workers in the pool.",
3216 suggestions: [50]
3217 },
3218 %{
3219 key: :timeout,
3220 type: :integer,
3221 description: "Timeout while `hackney` will wait for response.",
3222 suggestions: [150_000]
3223 }
3224 ]
3225 },
3226 %{
3227 key: :media,
3228 type: :keyword,
3229 description: "Settings for media pool.",
3230 children: [
3231 %{
3232 key: :max_connections,
3233 type: :integer,
3234 description: "Number workers in the pool.",
3235 suggestions: [50]
3236 },
3237 %{
3238 key: :timeout,
3239 type: :integer,
3240 description: "Timeout while `hackney` will wait for response.",
3241 suggestions: [150_000]
3242 }
3243 ]
3244 },
3245 %{
3246 key: :upload,
3247 type: :keyword,
3248 description: "Settings for upload pool.",
3249 children: [
3250 %{
3251 key: :max_connections,
3252 type: :integer,
3253 description: "Number workers in the pool.",
3254 suggestions: [25]
3255 },
3256 %{
3257 key: :timeout,
3258 type: :integer,
3259 description: "Timeout while `hackney` will wait for response.",
3260 suggestions: [300_000]
3261 }
3262 ]
3263 }
3264 ]
3265 },
3266 %{
3267 group: :pleroma,
3268 key: :restrict_unauthenticated,
3269 label: "Restrict Unauthenticated",
3270 type: :group,
3271 description:
3272 "Disallow viewing timelines, user profiles and statuses for unauthenticated users.",
3273 children: [
3274 %{
3275 key: :timelines,
3276 type: :map,
3277 description: "Settings for public and federated timelines.",
3278 children: [
3279 %{
3280 key: :local,
3281 type: :boolean,
3282 description: "Disallow view public timeline."
3283 },
3284 %{
3285 key: :federated,
3286 type: :boolean,
3287 description: "Disallow view federated timeline."
3288 }
3289 ]
3290 },
3291 %{
3292 key: :profiles,
3293 type: :map,
3294 description: "Settings for user profiles.",
3295 children: [
3296 %{
3297 key: :local,
3298 type: :boolean,
3299 description: "Disallow view local user profiles."
3300 },
3301 %{
3302 key: :remote,
3303 type: :boolean,
3304 description: "Disallow view remote user profiles."
3305 }
3306 ]
3307 },
3308 %{
3309 key: :activities,
3310 type: :map,
3311 description: "Settings for statuses.",
3312 children: [
3313 %{
3314 key: :local,
3315 type: :boolean,
3316 description: "Disallow view local statuses."
3317 },
3318 %{
3319 key: :remote,
3320 type: :boolean,
3321 description: "Disallow view remote statuses."
3322 }
3323 ]
3324 }
3325 ]
3326 },
3327 %{
3328 group: :pleroma,
3329 key: Pleroma.Web.ApiSpec.CastAndValidate,
3330 type: :group,
3331 children: [
3332 %{
3333 key: :strict,
3334 type: :boolean,
3335 description:
3336 "Enables strict input validation (useful in development, not recommended in production)"
3337 }
3338 ]
3339 },
3340 %{
3341 group: :pleroma,
3342 key: :instances_favicons,
3343 type: :group,
3344 description: "Control favicons for instances",
3345 children: [
3346 %{
3347 key: :enabled,
3348 type: :boolean,
3349 description: "Allow/disallow displaying and getting instances favicons"
3350 }
3351 ]
3352 },
3353 %{
3354 group: :ex_aws,
3355 key: :s3,
3356 type: :group,
3357 descriptions: "S3 service related settings",
3358 children: [
3359 %{
3360 key: :access_key_id,
3361 type: :string,
3362 description: "S3 access key ID",
3363 suggestions: ["AKIAQ8UKHTGIYN7DMWWJ"]
3364 },
3365 %{
3366 key: :secret_access_key,
3367 type: :string,
3368 description: "Secret access key",
3369 suggestions: ["JFGt+fgH1UQ7vLUQjpW+WvjTdV/UNzVxcwn7DkaeFKtBS5LvoXvIiME4NQBsT6ZZ"]
3370 },
3371 %{
3372 key: :host,
3373 type: :string,
3374 description: "S3 host",
3375 suggestions: ["s3.eu-central-1.amazonaws.com"]
3376 }
3377 ]
3378 },
3379 %{
3380 group: :pleroma,
3381 key: :frontends,
3382 type: :group,
3383 description: "Installed frontends management",
3384 children: [
3385 %{
3386 key: :primary,
3387 type: :map,
3388 description: "Primary frontend, the one that is served for all pages by default",
3389 children: installed_frontend_options
3390 },
3391 %{
3392 key: :admin,
3393 type: :map,
3394 description: "Admin frontend",
3395 children: installed_frontend_options
3396 },
3397 %{
3398 key: :available,
3399 type: :map,
3400 description:
3401 "A map containing available frontends and parameters for their installation.",
3402 children: frontend_options
3403 }
3404 ]
3405 },
3406 %{
3407 group: :pleroma,
3408 key: Pleroma.Web.Preload,
3409 type: :group,
3410 description: "Preload-related settings",
3411 children: [
3412 %{
3413 key: :providers,
3414 type: {:list, :module},
3415 description: "List of preload providers to enable",
3416 suggestions: [
3417 Pleroma.Web.Preload.Providers.Instance,
3418 Pleroma.Web.Preload.Providers.User,
3419 Pleroma.Web.Preload.Providers.Timelines,
3420 Pleroma.Web.Preload.Providers.StatusNet
3421 ]
3422 }
3423 ]
3424 },
3425 %{
3426 group: :pleroma,
3427 key: :majic_pool,
3428 type: :group,
3429 description: "Majic/libmagic configuration",
3430 children: [
3431 %{
3432 key: :size,
3433 type: :integer,
3434 description: "Number of majic workers to start.",
3435 suggestions: [2]
3436 }
3437 ]
3438 },
3439 %{
3440 group: :pleroma,
3441 key: Pleroma.User.Backup,
3442 type: :group,
3443 description: "Account Backup",
3444 children: [
3445 %{
3446 key: :purge_after_days,
3447 type: :integer,
3448 description: "Remove backup achives after N days",
3449 suggestions: [30]
3450 },
3451 %{
3452 key: :limit_days,
3453 type: :integer,
3454 description: "Limit user to export not more often than once per N days",
3455 suggestions: [7]
3456 }
3457 ]
3458 },
3459 %{
3460 group: :prometheus,
3461 key: Pleroma.Web.Endpoint.MetricsExporter,
3462 type: :group,
3463 description: "Prometheus app metrics endpoint configuration",
3464 children: [
3465 %{
3466 key: :enabled,
3467 type: :boolean,
3468 description: "[Pleroma extension] Enables app metrics endpoint."
3469 },
3470 %{
3471 key: :ip_whitelist,
3472 type: [{:list, :string}, {:list, :charlist}, {:list, :tuple}],
3473 description:
3474 "[Pleroma extension] If non-empty, restricts access to app metrics endpoint to specified IP addresses."
3475 },
3476 %{
3477 key: :auth,
3478 type: [:boolean, :tuple],
3479 description: "Enables HTTP Basic Auth for app metrics endpoint.",
3480 suggestion: [false, {:basic, "myusername", "mypassword"}]
3481 },
3482 %{
3483 key: :path,
3484 type: :string,
3485 description: "App metrics endpoint URI path.",
3486 suggestions: ["/api/pleroma/app_metrics"]
3487 },
3488 %{
3489 key: :format,
3490 type: :atom,
3491 description: "App metrics endpoint output format.",
3492 suggestions: [:text, :protobuf]
3493 }
3494 ]
3495 }
3496 ]