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, shortcode_globs: ["/emoji/custom/**/*.png"]
63 config :pleroma, :uri_schemes,
84 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
85 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
92 # Configures the endpoint
93 config :pleroma, Pleroma.Web.Endpoint,
94 instrumenters: [Pleroma.Web.Endpoint.Instrumenter],
95 url: [host: "localhost"],
100 {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
101 {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
102 {Phoenix.Transports.WebSocket,
103 {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
104 {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
109 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
110 signing_salt: "CqaoopA2",
111 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
112 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
113 secure_cookie_flag: true
115 # Configures Elixir's Logger
116 config :logger, :console,
117 format: "$time $metadata[$level] $message\n",
118 metadata: [:request_id]
120 config :logger, :ex_syslogger,
123 format: "$metadata[$level] $message",
124 metadata: [:request_id]
129 webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"
131 config :mime, :types, %{
132 "application/xml" => ["xml"],
133 "application/xrd+xml" => ["xrd+xml"],
134 "application/jrd+json" => ["jrd+json"],
135 "application/activity+json" => ["activity+json"],
136 "application/ld+json" => ["activity+json"]
139 config :pleroma, :websub, Pleroma.Web.Websub
140 config :pleroma, :ostatus, Pleroma.Web.OStatus
141 config :pleroma, :httpoison, Pleroma.HTTP
142 config :tesla, adapter: Tesla.Adapter.Hackney
144 # Configures http settings, upstream proxy etc.
145 config :pleroma, :http,
149 # We don't support TLS v1.3 yet
150 versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
154 config :pleroma, :instance,
156 email: "example@example.com",
157 description: "A Pleroma instance, an alternative fediverse server",
159 remote_limit: 100_000,
160 upload_limit: 16_000_000,
161 avatar_upload_limit: 2_000_000,
162 background_upload_limit: 4_000_000,
163 banner_upload_limit: 4_000_000,
164 registrations_open: true,
166 federation_reachability_timeout_days: 7,
168 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
170 quarantined_instances: [],
171 managed_config: true,
172 static_dir: "instance/static/",
173 allowed_post_formats: [
178 finmoji_enabled: true,
179 mrf_transparency: true,
180 autofollowed_nicknames: [],
181 max_pinned_statuses: 1,
182 no_attachment_links: false,
183 welcome_user_nickname: nil,
184 welcome_message: nil,
185 max_report_comment_size: 1000,
186 safe_dm_mentions: false
188 config :pleroma, :markup,
189 # XXX - unfortunately, inline images must be enabled by default right now, because
190 # of custom emoji. Issue #275 discusses defanging that somehow.
191 allow_inline_images: true,
192 allow_headings: false,
196 Pleroma.HTML.Transform.MediaProxy,
197 Pleroma.HTML.Scrubber.Default
200 # Deprecated, will be gone in 1.0
201 config :pleroma, :fe,
202 theme: "pleroma-dark",
203 logo: "/static/logo.png",
205 logo_margin: "0.1em",
206 background: "/static/aurora_borealis.jpg",
207 redirect_root_no_login: "/main/all",
208 redirect_root_login: "/main/friends",
209 show_instance_panel: true,
210 scope_options_enabled: false,
211 formatting_options_enabled: false,
212 collapse_message_with_subject: false,
213 hide_post_stats: false,
214 hide_user_stats: false,
216 subject_line_behavior: "email",
217 always_show_subject_input: true
219 config :pleroma, :frontend_configurations,
221 theme: "pleroma-dark",
222 logo: "/static/logo.png",
223 background: "/images/city.jpg",
224 redirectRootNoLogin: "/main/all",
225 redirectRootLogin: "/main/friends",
226 showInstanceSpecificPanel: true,
227 scopeOptionsEnabled: false,
228 formattingOptionsEnabled: false,
229 collapseMessageWithSubject: false,
230 hidePostStats: false,
231 hideUserStats: false,
233 subjectLineBehavior: "email",
234 alwaysShowSubjectInput: true
237 showInstanceSpecificPanel: true
240 config :pleroma, :activitypub,
242 unfollow_blocked: true,
243 outgoing_blocks: true,
244 follow_handshake_timeout: 500
246 config :pleroma, :user, deny_follow_blocked: true
248 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
250 config :pleroma, :mrf_rejectnonpublic,
251 allow_followersonly: false,
254 config :pleroma, :mrf_hellthread,
255 delist_threshold: 10,
258 config :pleroma, :mrf_simple,
261 federated_timeline_removal: [],
265 config :pleroma, :mrf_keyword,
267 federated_timeline_removal: [],
270 config :pleroma, :rich_media, enabled: true
272 config :pleroma, :media_proxy,
275 redirect_on_failure: false,
276 max_body_length: 25 * 1_048_576,
278 follow_redirect: true,
283 config :pleroma, :chat, enabled: true
285 config :phoenix, :format_encoders, json: Jason
287 config :pleroma, :gopher,
292 config :pleroma, Pleroma.Web.Metadata, providers: [], unfurl_nsfw: false
294 config :pleroma, :suggestions,
297 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
300 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
302 config :pleroma, :http_security,
305 sts_max_age: 31_536_000,
306 ct_max_age: 2_592_000,
307 referrer_policy: "same-origin"
311 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
316 "X-RateLimit-Remaining",
321 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
323 config :pleroma, Pleroma.User,
324 restricted_nicknames: [
355 config :pleroma, Pleroma.Web.Federator.RetryQueue,
361 config :pleroma_job_queue, :queues,
362 federator_incoming: 50,
363 federator_outgoing: 50,
367 config :pleroma, :fetch_initial_posts,
381 config :pleroma, :ldap,
382 enabled: System.get_env("LDAP_ENABLED") == "true",
383 host: System.get_env("LDAP_HOST") || "localhost",
384 port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
385 ssl: System.get_env("LDAP_SSL") == "true",
387 tls: System.get_env("LDAP_TLS") == "true",
389 base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
390 uid: System.get_env("LDAP_UID") || "cn"
392 config :pleroma, Pleroma.Mailer, adapter: Swoosh.Adapters.Sendmail
394 config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, path: "/api/pleroma/app_metrics"
396 # Import environment specific config. This must remain at the bottom
397 # of this file so it overrides the configuration defined above.
398 import_config "#{Mix.env()}.exs"