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