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 Mix.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 types: Pleroma.PostgresTypes,
51 telemetry_event: [Pleroma.Repo.Instrumenter],
54 config :pleroma, Pleroma.Captcha,
57 method: Pleroma.Captcha.Native
59 config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
61 # Upload configuration
62 config :pleroma, Pleroma.Upload,
63 uploader: Pleroma.Uploaders.Local,
64 filters: [Pleroma.Upload.Filter.Dedupe],
68 redirect_on_failure: false,
69 max_body_length: 25 * 1_048_576,
71 follow_redirect: true,
75 filename_display_max_length: 30,
76 default_description: nil
78 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
80 config :pleroma, Pleroma.Uploaders.S3,
82 streaming_enabled: true,
83 public_endpoint: "https://s3.amazonaws.com"
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 # FedSockets are commented out of the dispatch table on stable because they can't even
133 # fail properly when they are disabled. They will hang the connection instead of returning a 404.
134 # {"/api/fedsocket/v1", Pleroma.Web.FedSockets.IncomingHandler, []},
135 {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
136 {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
137 {Phoenix.Transports.WebSocket,
138 {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
139 {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
144 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
145 signing_salt: "CqaoopA2",
146 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
147 pubsub_server: Pleroma.PubSub,
148 secure_cookie_flag: true,
149 extra_cookie_attrs: [
153 config :pleroma, :fed_sockets,
155 connection_duration: :timer.hours(8),
156 rejection_duration: :timer.minutes(15),
157 fed_socket_fetches: [
163 # Configures Elixir's Logger
164 config :logger, :console,
166 format: "\n$time $metadata[$level] $message\n",
167 metadata: [:request_id]
169 config :logger, :ex_syslogger,
172 format: "$metadata[$level] $message",
173 metadata: [:request_id]
178 webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"
180 config :mime, :types, %{
181 "application/xml" => ["xml"],
182 "application/xrd+xml" => ["xrd+xml"],
183 "application/jrd+json" => ["jrd+json"],
184 "application/activity+json" => ["activity+json"],
185 "application/ld+json" => ["activity+json"]
188 config :tesla, adapter: Tesla.Adapter.Hackney
190 # Configures http settings, upstream proxy etc.
191 config :pleroma, :http,
193 send_user_agent: true,
194 user_agent: :default,
197 config :pleroma, :instance,
199 email: "example@example.com",
200 notify_email: "noreply@example.com",
201 description: "Pleroma: An efficient and flexible fediverse server",
202 background_image: "/images/city.jpg",
203 instance_thumbnail: "/instance/thumbnail.jpeg",
205 description_limit: 5_000,
207 remote_limit: 100_000,
208 upload_limit: 16_000_000,
209 avatar_upload_limit: 2_000_000,
210 background_upload_limit: 4_000_000,
211 banner_upload_limit: 4_000_000,
214 max_option_chars: 200,
216 max_expiration: 365 * 24 * 60 * 60
218 registrations_open: true,
219 invites_enabled: false,
220 account_activation_required: false,
221 account_approval_required: false,
223 federation_incoming_replies_max_depth: 100,
224 federation_reachability_timeout_days: 7,
225 federation_publisher_modules: [
226 Pleroma.Web.ActivityPub.Publisher
230 quarantined_instances: [],
231 static_dir: "instance/static/",
232 allowed_post_formats: [
238 autofollowed_nicknames: [],
239 max_pinned_statuses: 1,
240 attachment_links: false,
241 max_report_comment_size: 1000,
242 safe_dm_mentions: false,
244 remote_post_retention_days: 90,
245 skip_thread_containment: true,
246 limit_to_local_content: :unauthenticated,
247 user_bio_length: 5000,
248 user_name_length: 100,
249 max_account_fields: 10,
250 max_remote_account_fields: 20,
251 account_field_name_length: 512,
252 account_field_value_length: 2048,
253 registration_reason_length: 500,
254 external_user_synchronization: true,
255 extended_nickname_format: true,
256 cleanup_attachments: false,
257 multi_factor_authentication: [
270 config :pleroma, :welcome,
273 sender_nickname: nil,
278 sender_nickname: nil,
284 subject: "Welcome to <%= instance_name %>",
285 html: "Welcome to <%= instance_name %>",
286 text: "Welcome to <%= instance_name %>"
289 config :pleroma, :feed,
295 config :pleroma, :markup,
296 # XXX - unfortunately, inline images must be enabled by default right now, because
297 # of custom emoji. Issue #275 discusses defanging that somehow.
298 allow_inline_images: true,
299 allow_headings: false,
303 Pleroma.HTML.Scrubber.Default,
304 Pleroma.HTML.Transform.MediaProxy
307 config :pleroma, :frontend_configurations,
309 alwaysShowSubjectInput: true,
310 background: "/images/city.jpg",
311 collapseMessageWithSubject: false,
314 hideFilteredStatuses: false,
315 hideMutedPosts: false,
316 hidePostStats: false,
318 hideUserStats: false,
319 loginMethod: "password",
320 logo: "/static/logo.png",
323 minimalScopesMode: false,
324 noAttachmentLinks: false,
326 postContentType: "text/plain",
327 redirectRootLogin: "/main/friends",
328 redirectRootNoLogin: "/main/all",
331 showFeaturesPanel: true,
332 showInstanceSpecificPanel: false,
333 subjectLineBehavior: "email",
334 theme: "pleroma-dark",
335 webPushNotifications: false
338 showInstanceSpecificPanel: true
341 config :pleroma, :assets,
344 url: "/images/pleroma-fox-tan-smol.png",
345 mime_type: "image/png"
347 pleroma_fox_tan_shy: %{
348 url: "/images/pleroma-fox-tan-shy.png",
349 mime_type: "image/png"
352 default_mascot: :pleroma_fox_tan
354 config :pleroma, :manifest,
357 src: "/static/logo.png",
361 theme_color: "#282c37",
362 background_color: "#191b22"
364 config :pleroma, :activitypub,
365 unfollow_blocked: true,
366 outgoing_blocks: true,
367 follow_handshake_timeout: 500,
368 note_replies_output_limit: 5,
369 sign_object_fetches: true,
370 authorized_fetch_mode: false
372 config :pleroma, :streamer,
376 config :pleroma, :user, deny_follow_blocked: true
378 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
380 config :pleroma, :mrf_rejectnonpublic,
381 allow_followersonly: false,
384 config :pleroma, :mrf_hellthread,
385 delist_threshold: 10,
388 config :pleroma, :mrf_simple,
391 federated_timeline_removal: [],
400 config :pleroma, :mrf_keyword,
402 federated_timeline_removal: [],
405 config :pleroma, :mrf_subchain, match_actor: %{}
407 config :pleroma, :mrf_activity_expiration, days: 365
409 config :pleroma, :mrf_vocabulary,
413 # threshold of 7 days
414 config :pleroma, :mrf_object_age,
416 actions: [:delist, :strip_followers]
418 config :pleroma, :rich_media,
421 ignore_tld: ["local", "localdomain", "lan"],
423 Pleroma.Web.RichMedia.Parsers.TwitterCard,
424 Pleroma.Web.RichMedia.Parsers.OEmbed
426 failure_backoff: 60_000,
427 ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
429 config :pleroma, :media_proxy,
433 provider: Pleroma.Web.MediaProxy.Invalidation.Script
436 redirect_on_failure: false,
437 max_body_length: 25 * 1_048_576,
438 # Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
439 max_read_duration: 30_000,
441 follow_redirect: true,
447 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
452 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, script_path: nil
454 # Note: media preview proxy depends on media proxy to be enabled
455 config :pleroma, :media_preview_proxy,
457 thumbnail_max_width: 600,
458 thumbnail_max_height: 600,
460 min_content_length: 100 * 1024
462 config :pleroma, :chat, enabled: true
464 config :phoenix, :format_encoders, json: Jason
466 config :phoenix, :json_library, Jason
468 config :phoenix, :filter_parameters, ["password", "confirm"]
470 config :pleroma, :gopher,
475 config :pleroma, Pleroma.Web.Metadata,
477 Pleroma.Web.Metadata.Providers.OpenGraph,
478 Pleroma.Web.Metadata.Providers.TwitterCard
482 config :pleroma, Pleroma.Web.Preload,
484 Pleroma.Web.Preload.Providers.Instance
487 config :pleroma, :http_security,
490 sts_max_age: 31_536_000,
491 ct_max_age: 2_592_000,
492 referrer_policy: "same-origin"
496 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
501 "X-RateLimit-Remaining",
506 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
508 config :pleroma, Pleroma.User,
509 restricted_nicknames: [
540 "verify_credentials",
541 "update_credentials",
544 "confirmation_resend",
549 config :pleroma, Oban,
553 activity_expiration: 10,
555 federator_incoming: 50,
556 federator_outgoing: 50,
561 scheduled_activities: 10,
564 attachments_cleanup: 5,
567 plugins: [Oban.Plugins.Pruner],
569 {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
570 {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
573 config :pleroma, :workers,
575 federator_incoming: 5,
576 federator_outgoing: 5
579 config :pleroma, Pleroma.Formatter,
586 validate_tld: :no_scheme
588 config :pleroma, :ldap,
589 enabled: System.get_env("LDAP_ENABLED") == "true",
590 host: System.get_env("LDAP_HOST") || "localhost",
591 port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
592 ssl: System.get_env("LDAP_SSL") == "true",
594 tls: System.get_env("LDAP_TLS") == "true",
596 base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
597 uid: System.get_env("LDAP_UID") || "cn"
602 oauth_consumer_strategies =
603 System.get_env("OAUTH_CONSUMER_STRATEGIES")
606 |> Enum.map(&hd(String.split(&1, ":")))
608 ueberauth_providers =
609 for strategy <- oauth_consumer_strategies do
610 strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
611 strategy_module = String.to_atom(strategy_module_name)
612 {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
618 providers: ueberauth_providers
622 enforce_oauth_admin_scope_usage: true,
623 oauth_consumer_strategies: oauth_consumer_strategies
625 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
627 config :pleroma, Pleroma.Emails.UserEmail,
630 link_color: "#d8a070",
631 background_color: "#2C3645",
632 content_background_color: "#1B2635",
633 header_color: "#d8a070",
634 text_color: "#b9b9ba",
635 text_muted_color: "#b9b9ba"
638 config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false
640 config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
644 path: "/api/pleroma/app_metrics",
647 config :pleroma, Pleroma.ScheduledActivity,
648 daily_user_limit: 25,
649 total_user_limit: 300,
652 config :pleroma, :email_notifications,
656 inactivity_threshold: 7
659 config :pleroma, :oauth2,
660 token_expires_in: 600,
661 issue_new_refresh_token: true,
662 clean_expired_tokens: false
664 config :pleroma, :database, rum_enabled: false
666 config :pleroma, :env, Mix.env()
668 config :http_signatures,
669 adapter: Pleroma.Signature
671 config :pleroma, :rate_limit,
672 authentication: {60_000, 15},
674 search: [{1000, 10}, {1000, 30}],
675 app_account_creation: {1_800_000, 25},
676 relations_actions: {10_000, 10},
677 relation_id_action: {60_000, 2},
678 statuses_actions: {10_000, 15},
679 status_id_action: {60_000, 3},
680 password_reset: {1_800_000, 5},
681 account_confirmation_resend: {8_640_000, 5},
682 ap_routes: {60_000, 15}
684 config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifetime: 600
686 config :pleroma, Pleroma.Web.Plugs.RemoteIp,
688 headers: ["x-forwarded-for"],
699 config :pleroma, :static_fe, enabled: false
701 # Example of frontend configuration
702 # This example will make us serve the primary frontend from the
703 # frontends directory within your `:pleroma, :instance, static_dir`.
704 # e.g., instance/static/frontends/pleroma/develop/
706 # With no frontend configuration, the bundled files from the `static` directory will
709 # config :pleroma, :frontends,
710 # primary: %{"name" => "pleroma-fe", "ref" => "develop"},
711 # admin: %{"name" => "admin-fe", "ref" => "stable"},
714 config :pleroma, :frontends,
718 "git" => "https://git.pleroma.social/lambadalambda/kenoma",
720 "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
724 "name" => "pleroma-fe",
725 "git" => "https://git.pleroma.social/pleroma/pleroma-fe",
727 "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
732 "git" => "https://git.pleroma.social/pleroma/fedi-fe",
734 "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
738 "name" => "admin-fe",
739 "git" => "https://git.pleroma.social/pleroma/admin-fe",
741 "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
745 "name" => "soapbox-fe",
746 "git" => "https://gitlab.com/soapbox-pub/soapbox-fe",
748 "https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production",
750 "build_dir" => "static"
754 config :pleroma, :web_cache_ttl,
756 activity_pub_question: 30_000
758 config :pleroma, :modules, runtime_dir: "instance/modules"
760 config :pleroma, configurable_from_database: false
762 config :pleroma, Pleroma.Repo,
763 parameters: [gin_fuzzy_search_limit: "500"],
766 config :pleroma, :connections_pool,
767 reclaim_multiplier: 0.1,
768 connection_acquisition_wait: 250,
769 connection_acquisition_retries: 5,
770 max_connections: 250,
771 max_idle_time: 30_000,
773 connect_timeout: 5_000
775 config :pleroma, :pools,
797 config :pleroma, :hackney_pools,
811 config :pleroma, :majic_pool, size: 2
813 private_instance? = :if_instance_is_private
815 config :pleroma, :restrict_unauthenticated,
816 timelines: %{local: private_instance?, federated: private_instance?},
817 profiles: %{local: private_instance?, remote: private_instance?},
818 activities: %{local: private_instance?, remote: private_instance?}
820 config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
822 config :pleroma, :mrf,
823 policies: Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
825 transparency_exclusions: []
827 config :tzdata, :http_client, Pleroma.HTTP.Tzdata
829 config :ex_aws, http_client: Pleroma.HTTP.ExAws
831 config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
833 config :pleroma, :instances_favicons, enabled: false
835 config :floki, :html_parser, Floki.HTMLParser.FastHtml
837 config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
839 # Import environment specific config. This must remain at the bottom
840 # of this file so it overrides the configuration defined above.
841 import_config "#{Mix.env()}.exs"