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, types: Pleroma.PostgresTypes
13 config :pleroma, Pleroma.Captcha,
16 method: Pleroma.Captcha.Kocaptcha
18 config :pleroma, :hackney_pools,
32 config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
34 # Upload configuration
35 config :pleroma, Pleroma.Upload,
36 uploader: Pleroma.Uploaders.Local,
40 redirect_on_failure: false,
41 max_body_length: 25 * 1_048_576,
43 follow_redirect: true,
48 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
50 config :pleroma, Pleroma.Uploaders.S3,
52 public_endpoint: "https://s3.amazonaws.com"
54 config :pleroma, Pleroma.Uploaders.MDII,
55 cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
56 files: "https://mdii.sakura.ne.jp"
58 config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
60 config :pleroma, :uri_schemes,
81 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
82 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
89 # Configures the endpoint
90 config :pleroma, Pleroma.Web.Endpoint,
91 url: [host: "localhost"],
96 {"/api/v1/streaming", Elixir.Pleroma.Web.MastodonAPI.WebsocketHandler, []},
97 {"/socket/websocket", Phoenix.Endpoint.CowboyWebSocket,
98 {nil, {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
99 {:_, Plug.Adapters.Cowboy.Handler, {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, proxy_url: nil
137 config :pleroma, :instance,
139 email: "example@example.com",
140 description: "A Pleroma instance, an alternative fediverse server",
142 remote_limit: 100_000,
143 upload_limit: 16_000_000,
144 avatar_upload_limit: 2_000_000,
145 background_upload_limit: 4_000_000,
146 banner_upload_limit: 4_000_000,
147 registrations_open: true,
149 federation_reachability_timeout_days: 7,
151 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
153 quarantined_instances: [],
154 managed_config: true,
155 static_dir: "instance/static/",
156 allowed_post_formats: [
161 finmoji_enabled: true,
162 mrf_transparency: true,
163 autofollowed_nicknames: [],
164 max_pinned_statuses: 1,
165 no_attachment_links: false,
166 welcome_user_nickname: nil,
169 config :pleroma, :markup,
170 # XXX - unfortunately, inline images must be enabled by default right now, because
171 # of custom emoji. Issue #275 discusses defanging that somehow.
172 allow_inline_images: true,
173 allow_headings: false,
177 Pleroma.HTML.Transform.MediaProxy,
178 Pleroma.HTML.Scrubber.Default
181 # Deprecated, will be gone in 1.0
182 config :pleroma, :fe,
183 theme: "pleroma-dark",
184 logo: "/static/logo.png",
186 logo_margin: "0.1em",
187 background: "/static/aurora_borealis.jpg",
188 redirect_root_no_login: "/main/all",
189 redirect_root_login: "/main/friends",
190 show_instance_panel: true,
191 scope_options_enabled: false,
192 formatting_options_enabled: false,
193 collapse_message_with_subject: false,
194 hide_post_stats: false,
195 hide_user_stats: false,
197 subject_line_behavior: "email",
198 always_show_subject_input: true
200 config :pleroma, :frontend_configurations,
202 theme: "pleroma-dark",
203 logo: "/static/logo.png",
204 background: "/images/city.jpg",
205 redirectRootNoLogin: "/main/all",
206 redirectRootLogin: "/main/friends",
207 showInstanceSpecificPanel: true,
208 scopeOptionsEnabled: false,
209 formattingOptionsEnabled: false,
210 collapseMessageWithSubject: false,
211 hidePostStats: false,
212 hideUserStats: false,
214 subjectLineBehavior: "email",
215 alwaysShowSubjectInput: true
218 config :pleroma, :activitypub,
220 unfollow_blocked: true,
221 outgoing_blocks: true,
222 follow_handshake_timeout: 500
224 config :pleroma, :user, deny_follow_blocked: true
226 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
228 config :pleroma, :mrf_rejectnonpublic,
229 allow_followersonly: false,
232 config :pleroma, :mrf_hellthread,
233 delist_threshold: 10,
236 config :pleroma, :mrf_simple,
239 federated_timeline_removal: [],
243 config :pleroma, :mrf_keyword,
245 federated_timeline_removal: [],
248 config :pleroma, :rich_media, enabled: true
250 config :pleroma, :media_proxy,
253 redirect_on_failure: false,
254 max_body_length: 25 * 1_048_576,
256 follow_redirect: true,
261 config :pleroma, :chat, enabled: true
263 config :ecto, json_library: Jason
265 config :phoenix, :format_encoders, json: Jason
267 config :pleroma, :gopher,
272 config :pleroma, Pleroma.Web.Metadata, providers: [], unfurl_nsfw: false
274 config :pleroma, :suggestions,
277 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
280 web: "https://vinayaka.distsn.org/?{{host}}+{{user}}"
282 config :pleroma, :http_security,
285 sts_max_age: 31_536_000,
286 ct_max_age: 2_592_000,
287 referrer_policy: "same-origin"
291 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
296 "X-RateLimit-Remaining",
301 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
303 config :pleroma, Pleroma.User,
304 restricted_nicknames: [
335 config :pleroma, Pleroma.Web.Federator.RetryQueue,
341 config :pleroma, Pleroma.Jobs,
342 federator_incoming: [max_jobs: 50],
343 federator_outgoing: [max_jobs: 50]
345 # Import environment specific config. This must remain at the bottom
346 # of this file so it overrides the configuration defined above.
347 import_config "#{Mix.env()}.exs"