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]
126 config :mime, :types, %{
127 "application/xml" => ["xml"],
128 "application/xrd+xml" => ["xrd+xml"],
129 "application/jrd+json" => ["jrd+json"],
130 "application/activity+json" => ["activity+json"],
131 "application/ld+json" => ["activity+json"]
134 config :pleroma, :websub, Pleroma.Web.Websub
135 config :pleroma, :ostatus, Pleroma.Web.OStatus
136 config :pleroma, :httpoison, Pleroma.HTTP
137 config :tesla, adapter: Tesla.Adapter.Hackney
139 # Configures http settings, upstream proxy etc.
140 config :pleroma, :http,
144 # We don't support TLS v1.3 yet
145 versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
149 config :pleroma, :instance,
151 email: "example@example.com",
152 description: "A Pleroma instance, an alternative fediverse server",
154 remote_limit: 100_000,
155 upload_limit: 16_000_000,
156 avatar_upload_limit: 2_000_000,
157 background_upload_limit: 4_000_000,
158 banner_upload_limit: 4_000_000,
159 registrations_open: true,
161 federation_reachability_timeout_days: 7,
163 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
165 quarantined_instances: [],
166 managed_config: true,
167 static_dir: "instance/static/",
168 allowed_post_formats: [
173 finmoji_enabled: true,
174 mrf_transparency: true,
175 autofollowed_nicknames: [],
176 max_pinned_statuses: 1,
177 no_attachment_links: false,
178 welcome_user_nickname: nil,
179 welcome_message: nil,
180 max_report_comment_size: 1000,
181 safe_dm_mentions: false
183 config :pleroma, :markup,
184 # XXX - unfortunately, inline images must be enabled by default right now, because
185 # of custom emoji. Issue #275 discusses defanging that somehow.
186 allow_inline_images: true,
187 allow_headings: false,
191 Pleroma.HTML.Transform.MediaProxy,
192 Pleroma.HTML.Scrubber.Default
195 # Deprecated, will be gone in 1.0
196 config :pleroma, :fe,
197 theme: "pleroma-dark",
198 logo: "/static/logo.png",
200 logo_margin: "0.1em",
201 background: "/static/aurora_borealis.jpg",
202 redirect_root_no_login: "/main/all",
203 redirect_root_login: "/main/friends",
204 show_instance_panel: true,
205 scope_options_enabled: false,
206 formatting_options_enabled: false,
207 collapse_message_with_subject: false,
208 hide_post_stats: false,
209 hide_user_stats: false,
211 subject_line_behavior: "email",
212 always_show_subject_input: true
214 config :pleroma, :frontend_configurations,
216 theme: "pleroma-dark",
217 logo: "/static/logo.png",
218 background: "/images/city.jpg",
219 redirectRootNoLogin: "/main/all",
220 redirectRootLogin: "/main/friends",
221 showInstanceSpecificPanel: true,
222 scopeOptionsEnabled: false,
223 formattingOptionsEnabled: false,
224 collapseMessageWithSubject: false,
225 hidePostStats: false,
226 hideUserStats: false,
228 subjectLineBehavior: "email",
229 alwaysShowSubjectInput: true
232 showInstanceSpecificPanel: true
235 config :pleroma, :activitypub,
237 unfollow_blocked: true,
238 outgoing_blocks: true,
239 follow_handshake_timeout: 500
241 config :pleroma, :user, deny_follow_blocked: true
243 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
245 config :pleroma, :mrf_rejectnonpublic,
246 allow_followersonly: false,
249 config :pleroma, :mrf_hellthread,
250 delist_threshold: 10,
253 config :pleroma, :mrf_simple,
256 federated_timeline_removal: [],
260 config :pleroma, :mrf_keyword,
262 federated_timeline_removal: [],
265 config :pleroma, :rich_media, enabled: true
267 config :pleroma, :media_proxy,
270 redirect_on_failure: false,
271 max_body_length: 25 * 1_048_576,
273 follow_redirect: true,
278 config :pleroma, :chat, enabled: true
280 config :phoenix, :format_encoders, json: Jason
282 config :pleroma, :gopher,
287 config :pleroma, Pleroma.Web.Metadata, providers: [], unfurl_nsfw: false
289 config :pleroma, :suggestions,
292 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
295 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
297 config :pleroma, :http_security,
300 sts_max_age: 31_536_000,
301 ct_max_age: 2_592_000,
302 referrer_policy: "same-origin"
306 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
311 "X-RateLimit-Remaining",
316 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
318 config :pleroma, Pleroma.User,
319 restricted_nicknames: [
350 config :pleroma, Pleroma.Web.Federator.RetryQueue,
356 config :pleroma_job_queue, :queues,
357 federator_incoming: 50,
358 federator_outgoing: 50,
361 config :pleroma, :fetch_initial_posts,
375 config :pleroma, :ldap,
376 enabled: System.get_env("LDAP_ENABLED") == "true",
377 host: System.get_env("LDAP_HOST") || "localhost",
378 port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
379 ssl: System.get_env("LDAP_SSL") == "true",
381 tls: System.get_env("LDAP_TLS") == "true",
383 base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
384 uid: System.get_env("LDAP_UID") || "cn"
386 config :pleroma, Pleroma.Mailer, adapter: Swoosh.Adapters.Sendmail
388 config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, path: "/api/pleroma/app_metrics"
390 # Import environment specific config. This must remain at the bottom
391 # of this file so it overrides the configuration defined above.
392 import_config "#{Mix.env()}.exs"