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