Merge branch 'fix/mutes.json-emptyarray' into 'develop'
[akkoma] / CONFIGURATION.md
1 # Configuring Pleroma
2
3 In the `config/` directory, you will find the following relevant files:
4
5 * `config.exs`: default base configuration
6 * `dev.exs`: default additional configuration for `MIX_ENV=dev`
7 * `prod.exs`: default additional configuration for `MIX_ENV=prod`
8
9
10 Do not modify files in the list above.
11 Instead, overload the settings by editing the following files:
12
13 * `dev.secret.exs`: custom additional configuration for `MIX_ENV=dev`
14 * `prod.secret.exs`: custom additional configuration for `MIX_ENV=prod`
15
16 ## Block functionality
17
18 config :pleroma, :activitypub,
19 accept_blocks: true,
20 unfollow_blocked: true,
21 outgoing_blocks: true
22
23 config :pleroma, :user, deny_follow_blocked: true
24
25 * `accept_blocks`: whether to accept incoming block activities from
26 other instances
27 * `unfollow_blocked`: whether blocks result in people getting
28 unfollowed
29 * `outgoing_blocks`: whether to federate blocks to other instances
30 * `deny_follow_blocked`: whether to disallow following an account that
31 has blocked the user in question
32
33 ## Message Rewrite Filters (MRFs)
34
35 Modify incoming and outgoing posts.
36
37 config :pleroma, :instance,
38 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy
39
40 `rewrite_policy` specifies which MRF policies to apply.
41 It can either be a single policy or a list of policies.
42 Currently, MRFs availible by default are:
43
44 * `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`
45 * `Pleroma.Web.ActivityPub.MRF.DropPolicy`
46 * `Pleroma.Web.ActivityPub.MRF.SimplePolicy`
47 * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`
48
49 Some policies, such as SimplePolicy and RejectNonPublic,
50 can be additionally configured in their respective sections.
51
52 ### NoOpPolicy
53
54 Does not modify posts (this is the default `rewrite_policy`)
55
56 ### DropPolicy
57
58 Drops all posts.
59 It generally does not make sense to use this in production.
60
61 ### SimplePolicy
62
63 Restricts the visibility of posts from certain instances.
64
65 config :pleroma, :mrf_simple,
66 media_removal: [],
67 media_nsfw: [],
68 federated_timeline_removal: [],
69 reject: [],
70 accept: []
71
72 * `media_removal`: posts from these instances will have attachments
73 removed
74 * `media_nsfw`: posts from these instances will have attachments marked
75 as nsfw
76 * `federated_timeline_removal`: posts from these instances will be
77 marked as unlisted
78 * `reject`: posts from these instances will be dropped
79 * `accept`: if not empty, only posts from these instances will be accepted
80
81 ### RejectNonPublic
82
83 Drops posts with non-public visibility settings.
84
85 config :pleroma :mrf_rejectnonpublic
86 allow_followersonly: false,
87 allow_direct: false,
88
89 * `allow_followersonly`: whether to allow follower-only posts through
90 the filter
91 * `allow_direct`: whether to allow direct messages through the filter