10 # .;Y. ;$MMMMMM9. :tc.
11 # vY. .. .nMMM@MMU. ;1v.
12 # i7i ... .#MM@M@C. .....:71i
13 # it: .... $MMM@9;.,i;;;i,;tti
14 # :t7. ..... 0MMMWv.,iii:::,,;St.
15 # .nC. ..... IMMMQ..,::::::,.,czX.
16 # .ct: ....... .ZMMMI..,:::::::,,:76Y.
17 # c2: ......,i..Y$M@t..:::::::,,..inZY
18 # vov ......:ii..c$MBc..,,,,,,,,,,..iI9i
19 # i9Y ......iii:..7@MA,..,,,,,,,,,....;AA:
20 # iIS. ......:ii::..;@MI....,............;Ez.
21 # .I9. ......:i::::...8M1..................C0z.
22 # .z9; ......:i::::,.. .i:...................zWX.
23 # vbv ......,i::::,,. ................. :AQY
24 # c6Y. .,...,::::,,..:t0@@QY. ................ :8bi
25 # :6S. ..,,...,:::,,,..EMMMMMMI. ............... .;bZ,
26 # :6o, .,,,,..:::,,,..i#MMMMMM#v................. YW2.
27 # .n8i ..,,,,,,,::,,,,.. tMMMMM@C:.................. .1Wn
28 # 7Uc. .:::,,,,,::,,,,.. i1t;,..................... .UEi
29 # 7C...::::::::::::,,,,.. .................... vSi.
30 # ;1;...,,::::::,......... .................. Yz:
32 # izAotX7777777777777777777777777777777777777777Y7n92:
33 # .;CoIIIIIUAA666666699999ZZZZZZZZZZZZZZZZZZZZ6ov.
36 # DO NOT EDIT THIS FILE! THIS FILE CONTAINS THE DEFAULT VALUES FOR THE CON-
37 # FIGURATION! EDIT YOUR SECRET FILE (either prod.secret.exs, dev.secret.exs).
39 # This file is responsible for configuring your application
40 # and its dependencies with the aid of the Config module.
42 # This configuration file is loaded before any dependency and
43 # is restricted to this project.
46 # General application configuration
47 config :pleroma, ecto_repos: [Pleroma.Repo]
49 config :pleroma, Pleroma.Repo,
50 telemetry_event: [Pleroma.Repo.Instrumenter],
53 config :pleroma, Pleroma.Captcha,
56 method: Pleroma.Captcha.Native
58 config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
60 # Upload configuration
61 config :pleroma, Pleroma.Upload,
62 uploader: Pleroma.Uploaders.Local,
63 filters: [Pleroma.Upload.Filter.Dedupe],
66 filename_display_max_length: 30,
67 default_description: nil,
70 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
72 config :pleroma, Pleroma.Uploaders.S3,
74 bucket_namespace: nil,
75 truncated_namespace: nil,
76 streaming_enabled: true
79 # host: "s3.wasabisys.com", # required if not Amazon AWS
81 secret_access_key: nil,
82 # region: "us-east-1", # may be required for Amazon AWS
85 config :pleroma, :emoji,
86 shortcode_globs: ["/emoji/custom/**/*.png"],
87 pack_extensions: [".png", ".gif"],
89 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
91 default_manifest: "https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json",
92 shared_pack_cache_seconds_per_file: 60
94 config :pleroma, :uri_schemes,
116 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
117 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
120 transport_log: false,
124 # Configures the endpoint
125 config :pleroma, Pleroma.Web.Endpoint,
126 url: [host: "localhost"],
132 {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
133 {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
134 {Phoenix.Transports.WebSocket,
135 {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
136 {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
141 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
142 live_view: [signing_salt: "U5ELgdEwTD3n1+D5s0rY0AMg8/y1STxZ3Zvsl3bWh+oBcGrYdil0rXqPMRd3Glcq"],
143 signing_salt: "CqaoopA2",
144 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
145 pubsub_server: Pleroma.PubSub,
146 secure_cookie_flag: true,
147 extra_cookie_attrs: [
151 # Configures Elixir's Logger
152 config :logger, :console,
154 format: "\n$time $metadata[$level] $message\n",
155 metadata: [:request_id]
157 config :logger, :ex_syslogger,
160 format: "$metadata[$level] $message",
161 metadata: [:request_id]
163 config :mime, :types, %{
164 "application/xml" => ["xml"],
165 "application/xrd+xml" => ["xrd+xml"],
166 "application/jrd+json" => ["jrd+json"],
167 "application/activity+json" => ["activity+json"],
168 "application/ld+json" => ["activity+json"]
171 config :tesla, adapter: Tesla.Adapter.Hackney
173 # Configures http settings, upstream proxy etc.
174 config :pleroma, :http,
176 send_user_agent: true,
177 user_agent: :default,
180 config :pleroma, :instance,
182 email: "example@example.com",
183 notify_email: "noreply@example.com",
184 description: "Pleroma: An efficient and flexible fediverse server",
185 short_description: "",
186 background_image: "/images/city.jpg",
187 instance_thumbnail: "/instance/thumbnail.jpeg",
189 description_limit: 5_000,
190 remote_limit: 100_000,
191 upload_limit: 16_000_000,
192 avatar_upload_limit: 2_000_000,
193 background_upload_limit: 4_000_000,
194 banner_upload_limit: 4_000_000,
197 max_option_chars: 200,
199 max_expiration: 365 * 24 * 60 * 60
201 registrations_open: true,
202 invites_enabled: false,
203 account_activation_required: false,
204 account_approval_required: false,
206 federation_incoming_replies_max_depth: 100,
207 federation_reachability_timeout_days: 7,
208 federation_publisher_modules: [
209 Pleroma.Web.ActivityPub.Publisher
213 quarantined_instances: [],
214 static_dir: "instance/static/",
215 allowed_post_formats: [
221 autofollowed_nicknames: [],
222 autofollowing_nicknames: [],
223 max_pinned_statuses: 1,
224 attachment_links: false,
225 max_report_comment_size: 1000,
226 report_strip_status: true,
227 safe_dm_mentions: false,
229 remote_post_retention_days: 90,
230 skip_thread_containment: true,
231 limit_to_local_content: :unauthenticated,
232 user_bio_length: 5000,
233 user_name_length: 100,
234 max_account_fields: 10,
235 max_remote_account_fields: 20,
236 account_field_name_length: 512,
237 account_field_value_length: 2048,
238 registration_reason_length: 500,
239 external_user_synchronization: true,
240 extended_nickname_format: true,
241 cleanup_attachments: false,
242 multi_factor_authentication: [
253 show_reactions: true,
254 password_reset_token_validity: 60 * 60 * 24,
255 profile_directory: true,
258 :users_manage_invites,
259 :users_manage_activation_state,
261 :users_manage_credentials,
266 :reports_manage_reports,
267 :moderation_log_read,
268 :announcements_manage_announcements,
272 moderator_privileges: [:messages_delete, :reports_manage_reports],
273 max_endorsed_users: 20,
274 birthday_required: false,
276 max_media_attachments: 1_000
278 config :pleroma, :welcome,
281 sender_nickname: nil,
286 sender_nickname: nil,
292 subject: "Welcome to <%= instance_name %>",
293 html: "Welcome to <%= instance_name %>",
294 text: "Welcome to <%= instance_name %>"
297 config :pleroma, :feed,
303 config :pleroma, :markup,
304 # XXX - unfortunately, inline images must be enabled by default right now, because
305 # of custom emoji. Issue #275 discusses defanging that somehow.
306 allow_inline_images: true,
307 allow_headings: false,
311 Pleroma.HTML.Scrubber.Default,
312 Pleroma.HTML.Transform.MediaProxy
315 config :pleroma, :frontend_configurations,
317 alwaysShowSubjectInput: true,
318 background: "/images/city.jpg",
319 collapseMessageWithSubject: false,
322 hideFilteredStatuses: false,
323 hideMutedPosts: false,
324 hidePostStats: false,
326 hideUserStats: false,
327 loginMethod: "password",
328 logo: "/static/logo.svg",
331 minimalScopesMode: false,
332 noAttachmentLinks: false,
334 postContentType: "text/plain",
335 redirectRootLogin: "/main/friends",
336 redirectRootNoLogin: "/main/all",
339 showFeaturesPanel: true,
340 showInstanceSpecificPanel: false,
341 subjectLineBehavior: "email",
342 theme: "pleroma-dark",
343 webPushNotifications: false
346 config :pleroma, :assets,
349 url: "/images/pleroma-fox-tan-smol.png",
350 mime_type: "image/png"
352 pleroma_fox_tan_shy: %{
353 url: "/images/pleroma-fox-tan-shy.png",
354 mime_type: "image/png"
357 default_mascot: :pleroma_fox_tan
359 config :pleroma, :manifest,
362 src: "/static/logo.svg",
363 type: "image/svg+xml"
366 theme_color: "#282c37",
367 background_color: "#191b22"
369 config :pleroma, :activitypub,
370 unfollow_blocked: true,
371 outgoing_blocks: true,
372 blockers_visible: true,
373 follow_handshake_timeout: 500,
374 note_replies_output_limit: 5,
375 sign_object_fetches: true,
376 authorized_fetch_mode: false
378 config :pleroma, :streamer,
382 config :pleroma, :user, deny_follow_blocked: true
384 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
386 config :pleroma, :mrf_rejectnonpublic,
387 allow_followersonly: false,
390 config :pleroma, :mrf_hellthread,
391 delist_threshold: 10,
394 config :pleroma, :mrf_simple,
397 federated_timeline_removal: [],
406 config :pleroma, :mrf_keyword,
408 federated_timeline_removal: [],
411 config :pleroma, :mrf_hashtag,
414 federated_timeline_removal: []
416 config :pleroma, :mrf_subchain, match_actor: %{}
418 config :pleroma, :mrf_activity_expiration, days: 365
420 config :pleroma, :mrf_vocabulary,
424 # threshold of 7 days
425 config :pleroma, :mrf_object_age,
427 actions: [:delist, :strip_followers]
429 config :pleroma, :mrf_follow_bot, follower_nickname: nil
431 config :pleroma, :rich_media,
434 ignore_tld: ["local", "localdomain", "lan"],
436 Pleroma.Web.RichMedia.Parsers.TwitterCard,
437 Pleroma.Web.RichMedia.Parsers.OEmbed
439 failure_backoff: 60_000,
440 ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
442 config :pleroma, :media_proxy,
446 provider: Pleroma.Web.MediaProxy.Invalidation.Script
449 redirect_on_failure: false,
450 max_body_length: 25 * 1_048_576,
451 # Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
452 max_read_duration: 30_000,
454 follow_redirect: true,
460 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
465 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script,
469 # Note: media preview proxy depends on media proxy to be enabled
470 config :pleroma, :media_preview_proxy,
472 thumbnail_max_width: 600,
473 thumbnail_max_height: 600,
475 min_content_length: 100 * 1024
477 config :pleroma, :shout,
481 config :phoenix, :format_encoders, json: Jason, "activity+json": Jason
483 config :phoenix, :json_library, Jason
485 config :phoenix, :filter_parameters, ["password", "confirm"]
487 config :pleroma, :gopher,
492 config :pleroma, Pleroma.Web.Metadata,
494 Pleroma.Web.Metadata.Providers.OpenGraph,
495 Pleroma.Web.Metadata.Providers.TwitterCard
499 config :pleroma, Pleroma.Web.Preload,
501 Pleroma.Web.Preload.Providers.Instance
504 config :pleroma, :http_security,
507 sts_max_age: 31_536_000,
508 ct_max_age: 2_592_000,
509 referrer_policy: "same-origin"
513 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
518 "X-RateLimit-Remaining",
523 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
525 config :pleroma, Pleroma.User,
526 restricted_nicknames: [
557 "verify_credentials",
558 "update_credentials",
561 "confirmation_resend",
566 config :pleroma, Oban,
570 activity_expiration: 10,
572 filter_expiration: 1,
574 federator_incoming: 5,
575 federator_outgoing: 5,
580 scheduled_activities: 10,
581 poll_notifications: 10,
584 attachments_cleanup: 1,
588 plugins: [Oban.Plugins.Pruner],
590 {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
591 {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
594 config :pleroma, :workers,
596 federator_incoming: 5,
597 federator_outgoing: 5
600 config :pleroma, Pleroma.Formatter,
607 validate_tld: :no_scheme
609 config :pleroma, :ldap,
610 enabled: System.get_env("LDAP_ENABLED") == "true",
611 host: System.get_env("LDAP_HOST") || "localhost",
612 port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
613 ssl: System.get_env("LDAP_SSL") == "true",
615 tls: System.get_env("LDAP_TLS") == "true",
617 base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
618 uid: System.get_env("LDAP_UID") || "cn"
623 oauth_consumer_strategies =
624 System.get_env("OAUTH_CONSUMER_STRATEGIES")
627 |> Enum.map(&hd(String.split(&1, ":")))
629 ueberauth_providers =
630 for strategy <- oauth_consumer_strategies do
631 strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
632 strategy_module = String.to_atom(strategy_module_name)
633 {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
639 providers: ueberauth_providers
641 config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies
643 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
645 config :pleroma, Pleroma.Emails.UserEmail,
648 link_color: "#d8a070",
649 background_color: "#2C3645",
650 content_background_color: "#1B2635",
651 header_color: "#d8a070",
652 text_color: "#b9b9ba",
653 text_muted_color: "#b9b9ba"
656 config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false
658 config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
662 path: "/api/pleroma/app_metrics",
665 config :pleroma, Pleroma.ScheduledActivity,
666 daily_user_limit: 25,
667 total_user_limit: 300,
670 config :pleroma, :email_notifications,
674 inactivity_threshold: 7
677 config :pleroma, :oauth2,
678 token_expires_in: 3600 * 24 * 365 * 100,
679 issue_new_refresh_token: true,
680 clean_expired_tokens: false
682 config :pleroma, :database, rum_enabled: false
684 config :pleroma, :features, improved_hashtag_timeline: :auto
686 config :pleroma, :populate_hashtags_table, fault_rate_allowance: 0.01
688 config :pleroma, :delete_context_objects, fault_rate_allowance: 0.01
690 config :pleroma, :env, Mix.env()
692 config :http_signatures,
693 adapter: Pleroma.Signature
695 config :pleroma, :rate_limit,
696 authentication: {60_000, 15},
698 search: [{1000, 10}, {1000, 30}],
699 app_account_creation: {1_800_000, 25},
700 relations_actions: {10_000, 10},
701 relation_id_action: {60_000, 2},
702 statuses_actions: {10_000, 15},
703 status_id_action: {60_000, 3},
704 password_reset: {1_800_000, 5},
705 account_confirmation_resend: {8_640_000, 5},
706 ap_routes: {60_000, 15}
708 config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifetime: 600
710 config :pleroma, Pleroma.Web.Plugs.RemoteIp,
712 headers: ["x-forwarded-for"],
723 config :pleroma, :static_fe, enabled: false
725 # Example of frontend configuration
726 # This example will make us serve the primary frontend from the
727 # frontends directory within your `:pleroma, :instance, static_dir`.
728 # e.g., instance/static/frontends/pleroma/develop/
730 # With no frontend configuration, the bundled files from the `static` directory will
733 # config :pleroma, :frontends,
734 # primary: %{"name" => "pleroma-fe", "ref" => "develop"},
735 # admin: %{"name" => "admin-fe", "ref" => "stable"},
738 config :pleroma, :frontends,
742 "git" => "https://git.pleroma.social/lambadalambda/kenoma",
744 "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
748 "name" => "pleroma-fe",
749 "git" => "https://git.pleroma.social/pleroma/pleroma-fe",
751 "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
756 "git" => "https://git.pleroma.social/pleroma/fedi-fe",
758 "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build_release",
760 "custom-http-headers" => [
761 {"service-worker-allowed", "/"}
765 "name" => "admin-fe",
766 "git" => "https://git.pleroma.social/pleroma/admin-fe",
768 "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
773 "git" => "https://gitlab.com/soapbox-pub/soapbox",
775 "https://gitlab.com/soapbox-pub/soapbox/-/jobs/artifacts/${ref}/download?job=build-production",
776 "ref" => "v3.0.0-beta.1",
777 "build_dir" => "static"
780 "name" => "glitch-lily",
781 "git" => "https://lily-is.land/infra/glitch-lily",
783 "https://lily-is.land/infra/glitch-lily/-/jobs/artifacts/${ref}/download?job=build",
785 "build_dir" => "public"
789 config :pleroma, :web_cache_ttl,
791 activity_pub_question: 30_000
793 config :pleroma, :modules, runtime_dir: "instance/modules"
795 config :pleroma, configurable_from_database: false
797 config :pleroma, Pleroma.Repo,
798 parameters: [gin_fuzzy_search_limit: "500"],
801 config :pleroma, :connections_pool,
802 reclaim_multiplier: 0.1,
803 connection_acquisition_wait: 250,
804 connection_acquisition_retries: 5,
805 max_connections: 250,
806 max_idle_time: 30_000,
808 connect_timeout: 5_000
810 config :pleroma, :pools,
832 config :pleroma, :hackney_pools,
846 config :pleroma, :majic_pool, size: 2
848 private_instance? = :if_instance_is_private
850 config :pleroma, :restrict_unauthenticated,
851 timelines: %{local: private_instance?, federated: private_instance?},
852 profiles: %{local: private_instance?, remote: private_instance?},
853 activities: %{local: private_instance?, remote: private_instance?}
855 config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
857 config :pleroma, :mrf,
858 policies: [Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy, Pleroma.Web.ActivityPub.MRF.TagPolicy],
860 transparency_exclusions: []
862 config :tzdata, :http_client, Pleroma.HTTP.Tzdata
864 config :ex_aws, http_client: Pleroma.HTTP.ExAws
866 config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
868 config :pleroma, :instances_favicons, enabled: false
870 config :floki, :html_parser, Floki.HTMLParser.FastHtml
872 config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
874 config :pleroma, Pleroma.User.Backup,
875 purge_after_days: 30,
879 config :pleroma, ConcurrentLimiter, [
880 {Pleroma.Web.RichMedia.Helpers, [max_running: 5, max_waiting: 5]},
881 {Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]}
884 config :pleroma, Pleroma.Web.WebFinger, domain: nil, update_nickname_on_user_fetch: true
886 # Import environment specific config. This must remain at the bottom
887 # of this file so it overrides the configuration defined above.
889 import_config "#{Mix.env()}.exs"