1 # This file is responsible for configuring your application
2 # and its dependencies with the aid of the Mix.Config module.
4 # This configuration file is loaded before any dependency and
5 # is restricted to this project.
8 # General application configuration
9 config :pleroma, ecto_repos: [Pleroma.Repo]
11 config :pleroma, Pleroma.Repo,
12 types: Pleroma.PostgresTypes,
13 telemetry_event: [Pleroma.Repo.Instrumenter]
15 config :pleroma, Pleroma.Captcha,
18 method: Pleroma.Captcha.Kocaptcha
20 config :pleroma, :hackney_pools,
34 config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
36 # Upload configuration
37 config :pleroma, Pleroma.Upload,
38 uploader: Pleroma.Uploaders.Local,
39 filters: [Pleroma.Upload.Filter.Dedupe],
43 redirect_on_failure: false,
44 max_body_length: 25 * 1_048_576,
46 follow_redirect: true,
51 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
53 config :pleroma, Pleroma.Uploaders.S3,
55 public_endpoint: "https://s3.amazonaws.com"
57 config :pleroma, Pleroma.Uploaders.MDII,
58 cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
59 files: "https://mdii.sakura.ne.jp"
61 config :pleroma, :emoji,
62 shortcode_globs: ["/emoji/custom/**/*.png"],
64 # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md`
65 Finmoji: "/finmoji/128px/*-128.png",
66 Custom: ["/emoji/*.png", "/emoji/custom/*.png"]
69 config :pleroma, :uri_schemes,
90 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
91 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
98 # Configures the endpoint
99 config :pleroma, Pleroma.Web.Endpoint,
100 instrumenters: [Pleroma.Web.Endpoint.Instrumenter],
101 url: [host: "localhost"],
106 {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
107 {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
108 {Phoenix.Transports.WebSocket,
109 {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
110 {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
115 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
116 signing_salt: "CqaoopA2",
117 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
118 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
119 secure_cookie_flag: true
121 # Configures Elixir's Logger
122 config :logger, :console,
123 format: "$time $metadata[$level] $message\n",
124 metadata: [:request_id]
126 config :logger, :ex_syslogger,
129 format: "$metadata[$level] $message",
130 metadata: [:request_id]
135 webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"
137 config :mime, :types, %{
138 "application/xml" => ["xml"],
139 "application/xrd+xml" => ["xrd+xml"],
140 "application/jrd+json" => ["jrd+json"],
141 "application/activity+json" => ["activity+json"],
142 "application/ld+json" => ["activity+json"]
145 config :pleroma, :websub, Pleroma.Web.Websub
146 config :pleroma, :ostatus, Pleroma.Web.OStatus
147 config :pleroma, :httpoison, Pleroma.HTTP
148 config :tesla, adapter: Tesla.Adapter.Hackney
150 # Configures http settings, upstream proxy etc.
151 config :pleroma, :http,
155 # We don't support TLS v1.3 yet
156 versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
160 config :pleroma, :instance,
162 email: "example@example.com",
163 description: "A Pleroma instance, an alternative fediverse server",
165 remote_limit: 100_000,
166 upload_limit: 16_000_000,
167 avatar_upload_limit: 2_000_000,
168 background_upload_limit: 4_000_000,
169 banner_upload_limit: 4_000_000,
170 registrations_open: true,
172 federation_reachability_timeout_days: 7,
174 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
176 quarantined_instances: [],
177 managed_config: true,
178 static_dir: "instance/static/",
179 allowed_post_formats: [
184 finmoji_enabled: true,
185 mrf_transparency: true,
186 autofollowed_nicknames: [],
187 max_pinned_statuses: 1,
188 no_attachment_links: false,
189 welcome_user_nickname: nil,
190 welcome_message: nil,
191 max_report_comment_size: 1000,
192 safe_dm_mentions: false
194 config :pleroma, :markup,
195 # XXX - unfortunately, inline images must be enabled by default right now, because
196 # of custom emoji. Issue #275 discusses defanging that somehow.
197 allow_inline_images: true,
198 allow_headings: false,
202 Pleroma.HTML.Transform.MediaProxy,
203 Pleroma.HTML.Scrubber.Default
206 # Deprecated, will be gone in 1.0
207 config :pleroma, :fe,
208 theme: "pleroma-dark",
209 logo: "/static/logo.png",
211 logo_margin: "0.1em",
212 background: "/static/aurora_borealis.jpg",
213 redirect_root_no_login: "/main/all",
214 redirect_root_login: "/main/friends",
215 show_instance_panel: true,
216 scope_options_enabled: false,
217 formatting_options_enabled: false,
218 collapse_message_with_subject: false,
219 hide_post_stats: false,
220 hide_user_stats: false,
222 subject_line_behavior: "email",
223 always_show_subject_input: true
225 config :pleroma, :frontend_configurations,
227 theme: "pleroma-dark",
228 logo: "/static/logo.png",
229 background: "/images/city.jpg",
230 redirectRootNoLogin: "/main/all",
231 redirectRootLogin: "/main/friends",
232 showInstanceSpecificPanel: true,
233 scopeOptionsEnabled: false,
234 formattingOptionsEnabled: false,
235 collapseMessageWithSubject: false,
236 hidePostStats: false,
237 hideUserStats: false,
239 subjectLineBehavior: "email",
240 alwaysShowSubjectInput: true
243 showInstanceSpecificPanel: true
246 config :pleroma, :activitypub,
248 unfollow_blocked: true,
249 outgoing_blocks: true,
250 follow_handshake_timeout: 500
252 config :pleroma, :user, deny_follow_blocked: true
254 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
256 config :pleroma, :mrf_rejectnonpublic,
257 allow_followersonly: false,
260 config :pleroma, :mrf_hellthread,
261 delist_threshold: 10,
264 config :pleroma, :mrf_simple,
267 federated_timeline_removal: [],
271 config :pleroma, :mrf_keyword,
273 federated_timeline_removal: [],
276 config :pleroma, :rich_media, enabled: true
278 config :pleroma, :media_proxy,
281 redirect_on_failure: false,
282 max_body_length: 25 * 1_048_576,
284 follow_redirect: true,
289 config :pleroma, :chat, enabled: true
291 config :phoenix, :format_encoders, json: Jason
293 config :pleroma, :gopher,
298 config :pleroma, Pleroma.Web.Metadata, providers: [], unfurl_nsfw: false
300 config :pleroma, :suggestions,
303 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
306 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
308 config :pleroma, :http_security,
311 sts_max_age: 31_536_000,
312 ct_max_age: 2_592_000,
313 referrer_policy: "same-origin"
317 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
322 "X-RateLimit-Remaining",
327 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
329 config :pleroma, Pleroma.User,
330 restricted_nicknames: [
361 config :pleroma, Pleroma.Web.Federator.RetryQueue,
367 config :pleroma_job_queue, :queues,
368 federator_incoming: 50,
369 federator_outgoing: 50,
371 scheduled_activities: 10
373 config :pleroma, :fetch_initial_posts,
387 config :pleroma, :ldap,
388 enabled: System.get_env("LDAP_ENABLED") == "true",
389 host: System.get_env("LDAP_HOST") || "localhost",
390 port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
391 ssl: System.get_env("LDAP_SSL") == "true",
393 tls: System.get_env("LDAP_TLS") == "true",
395 base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
396 uid: System.get_env("LDAP_UID") || "cn"
398 oauth_consumer_strategies = String.split(System.get_env("OAUTH_CONSUMER_STRATEGIES") || "")
400 ueberauth_providers =
401 for strategy <- oauth_consumer_strategies do
402 strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
403 strategy_module = String.to_atom(strategy_module_name)
404 {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
410 providers: ueberauth_providers
412 config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies
414 config :pleroma, Pleroma.Mailer, adapter: Swoosh.Adapters.Sendmail
416 config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, path: "/api/pleroma/app_metrics"
418 config :pleroma, Pleroma.ScheduledActivity,
419 daily_user_limit: 25,
420 total_user_limit: 300,
423 # Import environment specific config. This must remain at the bottom
424 # of this file so it overrides the configuration defined above.
425 import_config "#{Mix.env()}.exs"