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,
58 shortcode_globs: ["/emoji/custom/**/*.png"],
60 # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md`
61 Finmoji: "/finmoji/128px/*-128.png",
62 Custom: ["/emoji/*.png", "/emoji/custom/*.png"]
65 config :pleroma, :uri_schemes,
86 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
87 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
94 # Configures the endpoint
95 config :pleroma, Pleroma.Web.Endpoint,
96 url: [host: "localhost"],
101 {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
102 {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
103 {Phoenix.Transports.WebSocket,
104 {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
105 {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
110 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
111 signing_salt: "CqaoopA2",
112 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
113 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
114 secure_cookie_flag: true
116 # Configures Elixir's Logger
117 config :logger, :console,
118 format: "$time $metadata[$level] $message\n",
119 metadata: [:request_id]
121 config :logger, :ex_syslogger,
124 format: "$metadata[$level] $message",
125 metadata: [:request_id]
127 config :mime, :types, %{
128 "application/xml" => ["xml"],
129 "application/xrd+xml" => ["xrd+xml"],
130 "application/jrd+json" => ["jrd+json"],
131 "application/activity+json" => ["activity+json"],
132 "application/ld+json" => ["activity+json"]
135 config :pleroma, :websub, Pleroma.Web.Websub
136 config :pleroma, :ostatus, Pleroma.Web.OStatus
137 config :pleroma, :httpoison, Pleroma.HTTP
138 config :tesla, adapter: Tesla.Adapter.Hackney
140 # Configures http settings, upstream proxy etc.
141 config :pleroma, :http,
145 # We don't support TLS v1.3 yet
146 versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
150 config :pleroma, :instance,
152 email: "example@example.com",
153 description: "A Pleroma instance, an alternative fediverse server",
155 remote_limit: 100_000,
156 upload_limit: 16_000_000,
157 avatar_upload_limit: 2_000_000,
158 background_upload_limit: 4_000_000,
159 banner_upload_limit: 4_000_000,
160 registrations_open: true,
162 federation_reachability_timeout_days: 7,
164 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
166 quarantined_instances: [],
167 managed_config: true,
168 static_dir: "instance/static/",
169 allowed_post_formats: [
174 finmoji_enabled: true,
175 mrf_transparency: true,
176 autofollowed_nicknames: [],
177 max_pinned_statuses: 1,
178 no_attachment_links: false,
179 welcome_user_nickname: nil,
180 welcome_message: nil,
181 max_report_comment_size: 1000,
182 safe_dm_mentions: false
184 config :pleroma, :markup,
185 # XXX - unfortunately, inline images must be enabled by default right now, because
186 # of custom emoji. Issue #275 discusses defanging that somehow.
187 allow_inline_images: true,
188 allow_headings: false,
192 Pleroma.HTML.Transform.MediaProxy,
193 Pleroma.HTML.Scrubber.Default
196 # Deprecated, will be gone in 1.0
197 config :pleroma, :fe,
198 theme: "pleroma-dark",
199 logo: "/static/logo.png",
201 logo_margin: "0.1em",
202 background: "/static/aurora_borealis.jpg",
203 redirect_root_no_login: "/main/all",
204 redirect_root_login: "/main/friends",
205 show_instance_panel: true,
206 scope_options_enabled: false,
207 formatting_options_enabled: false,
208 collapse_message_with_subject: false,
209 hide_post_stats: false,
210 hide_user_stats: false,
212 subject_line_behavior: "email",
213 always_show_subject_input: true
215 config :pleroma, :frontend_configurations,
217 theme: "pleroma-dark",
218 logo: "/static/logo.png",
219 background: "/images/city.jpg",
220 redirectRootNoLogin: "/main/all",
221 redirectRootLogin: "/main/friends",
222 showInstanceSpecificPanel: true,
223 scopeOptionsEnabled: false,
224 formattingOptionsEnabled: false,
225 collapseMessageWithSubject: false,
226 hidePostStats: false,
227 hideUserStats: false,
229 subjectLineBehavior: "email",
230 alwaysShowSubjectInput: true
233 showInstanceSpecificPanel: true
236 config :pleroma, :activitypub,
238 unfollow_blocked: true,
239 outgoing_blocks: true,
240 follow_handshake_timeout: 500
242 config :pleroma, :user, deny_follow_blocked: true
244 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
246 config :pleroma, :mrf_rejectnonpublic,
247 allow_followersonly: false,
250 config :pleroma, :mrf_hellthread,
251 delist_threshold: 10,
254 config :pleroma, :mrf_simple,
257 federated_timeline_removal: [],
261 config :pleroma, :mrf_keyword,
263 federated_timeline_removal: [],
266 config :pleroma, :rich_media, enabled: true
268 config :pleroma, :media_proxy,
271 redirect_on_failure: false,
272 max_body_length: 25 * 1_048_576,
274 follow_redirect: true,
279 config :pleroma, :chat, enabled: true
281 config :phoenix, :format_encoders, json: Jason
283 config :pleroma, :gopher,
288 config :pleroma, Pleroma.Web.Metadata, providers: [], unfurl_nsfw: false
290 config :pleroma, :suggestions,
293 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
296 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
298 config :pleroma, :http_security,
301 sts_max_age: 31_536_000,
302 ct_max_age: 2_592_000,
303 referrer_policy: "same-origin"
307 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
312 "X-RateLimit-Remaining",
317 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
319 config :pleroma, Pleroma.User,
320 restricted_nicknames: [
351 config :pleroma, Pleroma.Web.Federator.RetryQueue,
357 config :pleroma_job_queue, :queues,
358 federator_incoming: 50,
359 federator_outgoing: 50,
362 config :pleroma, :fetch_initial_posts,
376 config :pleroma, :ldap,
377 enabled: System.get_env("LDAP_ENABLED") == "true",
378 host: System.get_env("LDAP_HOST") || "localhost",
379 port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
380 ssl: System.get_env("LDAP_SSL") == "true",
382 tls: System.get_env("LDAP_TLS") == "true",
384 base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
385 uid: System.get_env("LDAP_UID") || "cn"
387 # Import environment specific config. This must remain at the bottom
388 # of this file so it overrides the configuration defined above.
389 import_config "#{Mix.env()}.exs"