CONFIGURATION.md 3.21 KB
Newer Older
1 2 3
# Configuring Pleroma

In the `config/` directory, you will find the following relevant files:
squidboi committed
4

5 6 7 8
* `config.exs`: default base configuration
* `dev.exs`: default additional configuration for `MIX_ENV=dev`
* `prod.exs`: default additional configuration for `MIX_ENV=prod`

9 10 11

Do not modify files in the list above.
Instead, overload the settings by editing the following files:
squidboi committed
12

squidboi committed
13 14
* `dev.secret.exs`: custom additional configuration for `MIX_ENV=dev`
* `prod.secret.exs`: custom additional configuration for `MIX_ENV=prod`
15

16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
## Uploads configuration

To configure where to upload files, and wether or not 
you want to remove automatically EXIF data from pictures
being uploaded.

    config :pleroma, Pleroma.Upload,
      uploads: "uploads",
      strip_exif: false

* `uploads`: where to put the uploaded files, relative to pleroma's main directory.
* `strip_exif`: whether or not to remove EXIF data from uploaded pics automatically. 
   This needs Imagemagick installed on the system ( apt install imagemagick ).


31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
## Block functionality

    config :pleroma, :activitypub,
      accept_blocks: true,
      unfollow_blocked: true,
      outgoing_blocks: true

    config :pleroma, :user, deny_follow_blocked: true

* `accept_blocks`: whether to accept incoming block activities from
   other instances
* `unfollow_blocked`: whether blocks result in people getting
   unfollowed
* `outgoing_blocks`: whether to federate blocks to other instances
* `deny_follow_blocked`: whether to disallow following an account that
   has blocked the user in question

48 49 50 51 52 53 54
## Message Rewrite Filters (MRFs)

Modify incoming and outgoing posts.

    config :pleroma, :instance,
      rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy

55 56
`rewrite_policy` specifies which MRF policies to apply.
It can either be a single policy or a list of policies.
57
Currently, MRFs availible by default are:
squidboi committed
58

59 60 61 62 63
* `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`
* `Pleroma.Web.ActivityPub.MRF.DropPolicy`
* `Pleroma.Web.ActivityPub.MRF.SimplePolicy`
* `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`

64 65
Some policies, such as SimplePolicy and RejectNonPublic,
can be additionally configured in their respective sections.
66 67 68 69 70 71 72

### NoOpPolicy

Does not modify posts (this is the default `rewrite_policy`)

### DropPolicy

73 74
Drops all posts.
It generally does not make sense to use this in production.
75 76 77

### SimplePolicy

squidboi committed
78
Restricts the visibility of posts from certain instances.
79 80 81 82 83

    config :pleroma, :mrf_simple,
      media_removal: [],
      media_nsfw: [],
      federated_timeline_removal: [],
kaniini committed
84 85
      reject: [],
      accept: []
86

87 88 89 90 91 92
* `media_removal`: posts from these instances will have attachments 
   removed
* `media_nsfw`: posts from these instances will have attachments marked
   as nsfw
* `federated_timeline_removal`: posts from these instances will be 
   marked as unlisted
93
* `reject`: posts from these instances will be dropped
kaniini committed
94
* `accept`: if not empty, only posts from these instances will be accepted
95 96 97 98 99 100 101 102 103

### RejectNonPublic

Drops posts with non-public visibility settings.

    config :pleroma :mrf_rejectnonpublic
      allow_followersonly: false,
      allow_direct: false,

104 105
* `allow_followersonly`: whether to allow follower-only posts through
   the filter
106
* `allow_direct`: whether to allow direct messages through the filter