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.Captcha,
14 method: Pleroma.Captcha.Kocaptcha
16 config :pleroma, :hackney_pools,
30 config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
32 # Upload configuration
33 config :pleroma, Pleroma.Upload,
34 uploader: Pleroma.Uploaders.Local,
35 filters: [Pleroma.Upload.Filter.Dedupe],
39 redirect_on_failure: false,
40 max_body_length: 25 * 1_048_576,
42 follow_redirect: true,
47 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
49 config :pleroma, Pleroma.Uploaders.S3,
51 public_endpoint: "https://s3.amazonaws.com"
53 config :pleroma, Pleroma.Uploaders.MDII,
54 cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
55 files: "https://mdii.sakura.ne.jp"
57 config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
59 config :pleroma, :uri_schemes,
80 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
81 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
88 # Configures the endpoint
89 config :pleroma, Pleroma.Web.Endpoint,
90 url: [host: "localhost"],
95 {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
96 {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
97 {Phoenix.Transports.WebSocket,
98 {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
99 {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
104 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
105 signing_salt: "CqaoopA2",
106 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
107 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
108 secure_cookie_flag: true
110 # Configures Elixir's Logger
111 config :logger, :console,
112 format: "$time $metadata[$level] $message\n",
113 metadata: [:request_id]
115 config :logger, :ex_syslogger,
118 format: "$metadata[$level] $message",
119 metadata: [:request_id]
121 config :mime, :types, %{
122 "application/xml" => ["xml"],
123 "application/xrd+xml" => ["xrd+xml"],
124 "application/jrd+json" => ["jrd+json"],
125 "application/activity+json" => ["activity+json"],
126 "application/ld+json" => ["activity+json"]
129 config :pleroma, :websub, Pleroma.Web.Websub
130 config :pleroma, :ostatus, Pleroma.Web.OStatus
131 config :pleroma, :httpoison, Pleroma.HTTP
132 config :tesla, adapter: Tesla.Adapter.Hackney
134 # Configures http settings, upstream proxy etc.
135 config :pleroma, :http,
139 # We don't support TLS v1.3 yet
140 versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
144 config :pleroma, :instance,
146 email: "example@example.com",
147 description: "A Pleroma instance, an alternative fediverse server",
149 remote_limit: 100_000,
150 upload_limit: 16_000_000,
151 avatar_upload_limit: 2_000_000,
152 background_upload_limit: 4_000_000,
153 banner_upload_limit: 4_000_000,
154 registrations_open: true,
156 federation_reachability_timeout_days: 7,
158 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
160 quarantined_instances: [],
161 managed_config: true,
162 static_dir: "instance/static/",
163 allowed_post_formats: [
168 finmoji_enabled: true,
169 mrf_transparency: true,
170 autofollowed_nicknames: [],
171 max_pinned_statuses: 1,
172 no_attachment_links: false,
173 welcome_user_nickname: nil,
174 welcome_message: nil,
175 max_report_comment_size: 1000,
176 safe_dm_mentions: false
178 config :pleroma, :markup,
179 # XXX - unfortunately, inline images must be enabled by default right now, because
180 # of custom emoji. Issue #275 discusses defanging that somehow.
181 allow_inline_images: true,
182 allow_headings: false,
186 Pleroma.HTML.Transform.MediaProxy,
187 Pleroma.HTML.Scrubber.Default
190 # Deprecated, will be gone in 1.0
191 config :pleroma, :fe,
192 theme: "pleroma-dark",
193 logo: "/static/logo.png",
195 logo_margin: "0.1em",
196 background: "/static/aurora_borealis.jpg",
197 redirect_root_no_login: "/main/all",
198 redirect_root_login: "/main/friends",
199 show_instance_panel: true,
200 scope_options_enabled: false,
201 formatting_options_enabled: false,
202 collapse_message_with_subject: false,
203 hide_post_stats: false,
204 hide_user_stats: false,
206 subject_line_behavior: "email",
207 always_show_subject_input: true
209 config :pleroma, :frontend_configurations,
211 theme: "pleroma-dark",
212 logo: "/static/logo.png",
213 background: "/images/city.jpg",
214 redirectRootNoLogin: "/main/all",
215 redirectRootLogin: "/main/friends",
216 showInstanceSpecificPanel: true,
217 scopeOptionsEnabled: false,
218 formattingOptionsEnabled: false,
219 collapseMessageWithSubject: false,
220 hidePostStats: false,
221 hideUserStats: false,
223 subjectLineBehavior: "email",
224 alwaysShowSubjectInput: true
227 showInstanceSpecificPanel: true
230 config :pleroma, :activitypub,
232 unfollow_blocked: true,
233 outgoing_blocks: true,
234 follow_handshake_timeout: 500
236 config :pleroma, :user, deny_follow_blocked: true
238 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
240 config :pleroma, :mrf_rejectnonpublic,
241 allow_followersonly: false,
244 config :pleroma, :mrf_hellthread,
245 delist_threshold: 10,
248 config :pleroma, :mrf_simple,
251 federated_timeline_removal: [],
255 config :pleroma, :mrf_keyword,
257 federated_timeline_removal: [],
260 config :pleroma, :rich_media, enabled: true
262 config :pleroma, :media_proxy,
265 redirect_on_failure: false,
266 max_body_length: 25 * 1_048_576,
268 follow_redirect: true,
273 config :pleroma, :chat, enabled: true
275 config :phoenix, :format_encoders, json: Jason
277 config :pleroma, :gopher,
282 config :pleroma, Pleroma.Web.Metadata, providers: [], unfurl_nsfw: false
284 config :pleroma, :suggestions,
287 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
290 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
292 config :pleroma, :http_security,
295 sts_max_age: 31_536_000,
296 ct_max_age: 2_592_000,
297 referrer_policy: "same-origin"
301 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
306 "X-RateLimit-Remaining",
311 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
313 config :pleroma, Pleroma.User,
314 restricted_nicknames: [
345 config :pleroma, Pleroma.Web.Federator.RetryQueue,
351 config :pleroma_job_queue, :queues,
352 federator_incoming: 50,
353 federator_outgoing: 50,
356 config :pleroma, :fetch_initial_posts,
370 config :pleroma, :ldap,
371 enabled: System.get_env("LDAP_ENABLED") == "true",
372 host: System.get_env("LDAP_HOST") || "localhost",
373 port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
374 ssl: System.get_env("LDAP_SSL") == "true",
376 tls: System.get_env("LDAP_TLS") == "true",
378 base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
379 uid: System.get_env("LDAP_UID") || "cn"
381 config :pleroma, Pleroma.Mailer, adapter: Swoosh.Adapters.Sendmail
383 # Import environment specific config. This must remain at the bottom
384 # of this file so it overrides the configuration defined above.
385 import_config "#{Mix.env()}.exs"