From fc9b4410c4182747fbcbc2cbe2b94090c887b96f Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Tue, 14 May 2019 20:27:40 +0700 Subject: Add documentation --- docs/api/differences_in_mastoapi_responses.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index 36b47608e..946e0e885 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -69,6 +69,7 @@ Additional parameters can be added to the JSON body/Form data: - `preview`: boolean, if set to `true` the post won't be actually posted, but the status entitiy would still be rendered back. This could be useful for previewing rich text/custom emoji, for example. - `content_type`: string, contain the MIME type of the status, it is transformed into HTML by the backend. You can get the list of the supported MIME types with the nodeinfo endpoint. +- `visibility`: string, besides standard MastoAPI values (`direct`, `private`, `unlisted` or `public`) it can be used to address a List by setting it to `list:LIST_ID`. ## PATCH `/api/v1/update_credentials` -- cgit v1.2.3 From 76a7429befb2e9a819b653ff8328cc42a565c29d Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 21 May 2019 09:13:10 +0300 Subject: Add poll limits to /api/v1/instance and initial state --- docs/config.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 450d73fda..f9903332c 100644 --- a/docs/config.md +++ b/docs/config.md @@ -71,6 +71,11 @@ config :pleroma, Pleroma.Emails.Mailer, * `avatar_upload_limit`: File size limit of user’s profile avatars * `background_upload_limit`: File size limit of user’s profile backgrounds * `banner_upload_limit`: File size limit of user’s profile banners +* `poll_limits`: A map with poll limits for **local** polls + * `max_options`: Maximum number of options + * `max_option_chars`: Maximum number of characters per option + * `min_expiration`: Minimum expiration time (in seconds) + * `max_expiration`: Maximum expiration time (in seconds) * `registrations_open`: Enable registrations for anyone, invitations can be enabled when false. * `invites_enabled`: Enable user invitations for admins (depends on `registrations_open: false`). * `account_activation_required`: Require users to confirm their emails before signing in. -- cgit v1.2.3 From 75a37a68d4080a3781256cbe17b1e1b6c9944b18 Mon Sep 17 00:00:00 2001 From: feld Date: Thu, 30 May 2019 21:30:42 +0000 Subject: Install docs should clone from master branch --- docs/installation/alpine_linux_en.md | 2 +- docs/installation/arch_linux_en.md | 2 +- docs/installation/centos7_en.md | 2 +- docs/installation/debian_based_en.md | 2 +- docs/installation/debian_based_jp.md | 2 +- docs/installation/gentoo_en.md | 2 +- docs/installation/netbsd_en.md | 2 +- docs/installation/openbsd_en.md | 2 +- docs/installation/openbsd_fi.md | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) (limited to 'docs') diff --git a/docs/installation/alpine_linux_en.md b/docs/installation/alpine_linux_en.md index c493816d6..e1d69c873 100644 --- a/docs/installation/alpine_linux_en.md +++ b/docs/installation/alpine_linux_en.md @@ -87,7 +87,7 @@ sudo adduser -S -s /bin/false -h /opt/pleroma -H pleroma ```shell sudo mkdir -p /opt/pleroma sudo chown -R pleroma:pleroma /opt/pleroma -sudo -Hu pleroma git clone https://git.pleroma.social/pleroma/pleroma /opt/pleroma +sudo -Hu pleroma git clone -b master https://git.pleroma.social/pleroma/pleroma /opt/pleroma ``` * Change to the new directory: diff --git a/docs/installation/arch_linux_en.md b/docs/installation/arch_linux_en.md index 2b040cfbc..26e1ab86a 100644 --- a/docs/installation/arch_linux_en.md +++ b/docs/installation/arch_linux_en.md @@ -66,7 +66,7 @@ sudo useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma ```shell sudo mkdir -p /opt/pleroma sudo chown -R pleroma:pleroma /opt/pleroma -sudo -Hu pleroma git clone https://git.pleroma.social/pleroma/pleroma /opt/pleroma +sudo -Hu pleroma git clone -b master https://git.pleroma.social/pleroma/pleroma /opt/pleroma ``` * Change to the new directory: diff --git a/docs/installation/centos7_en.md b/docs/installation/centos7_en.md index 76de21ed8..19bff7461 100644 --- a/docs/installation/centos7_en.md +++ b/docs/installation/centos7_en.md @@ -143,7 +143,7 @@ sudo useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma ```shell sudo mkdir -p /opt/pleroma sudo chown -R pleroma:pleroma /opt/pleroma -sudo -Hu pleroma git clone https://git.pleroma.social/pleroma/pleroma /opt/pleroma +sudo -Hu pleroma git clone -b master https://git.pleroma.social/pleroma/pleroma /opt/pleroma ``` * Change to the new directory: diff --git a/docs/installation/debian_based_en.md b/docs/installation/debian_based_en.md index 9c0ef92d4..7d39ca5f9 100644 --- a/docs/installation/debian_based_en.md +++ b/docs/installation/debian_based_en.md @@ -68,7 +68,7 @@ sudo useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma ```shell sudo mkdir -p /opt/pleroma sudo chown -R pleroma:pleroma /opt/pleroma -sudo -Hu pleroma git clone https://git.pleroma.social/pleroma/pleroma /opt/pleroma +sudo -Hu pleroma git clone -b master https://git.pleroma.social/pleroma/pleroma /opt/pleroma ``` * Change to the new directory: diff --git a/docs/installation/debian_based_jp.md b/docs/installation/debian_based_jp.md index 41cce6792..7b4c1bd86 100644 --- a/docs/installation/debian_based_jp.md +++ b/docs/installation/debian_based_jp.md @@ -69,7 +69,7 @@ cd ~ * Gitリポジトリをクローンします。 ``` -git clone https://git.pleroma.social/pleroma/pleroma + git clone -b master https://git.pleroma.social/pleroma/pleroma ``` * 新しいディレクトリに移動します。 diff --git a/docs/installation/gentoo_en.md b/docs/installation/gentoo_en.md index fccaad378..b7c42a477 100644 --- a/docs/installation/gentoo_en.md +++ b/docs/installation/gentoo_en.md @@ -106,7 +106,7 @@ It is highly recommended you use your own fork for the `https://path/to/repo` pa ```shell pleroma$ cd ~ - pleroma$ git clone https://path/to/repo + pleroma$ git clone -b master https://path/to/repo ``` * Change to the new directory: diff --git a/docs/installation/netbsd_en.md b/docs/installation/netbsd_en.md index e0ac98359..a096d5354 100644 --- a/docs/installation/netbsd_en.md +++ b/docs/installation/netbsd_en.md @@ -58,7 +58,7 @@ Clone the repository: ``` $ cd /home/pleroma -$ git clone https://git.pleroma.social/pleroma/pleroma.git +$ git clone -b master https://git.pleroma.social/pleroma/pleroma.git ``` Configure Pleroma. Note that you need a domain name at this point: diff --git a/docs/installation/openbsd_en.md b/docs/installation/openbsd_en.md index 633b08e6c..46e7feffe 100644 --- a/docs/installation/openbsd_en.md +++ b/docs/installation/openbsd_en.md @@ -29,7 +29,7 @@ This creates a "pleroma" login class and sets higher values than default for dat Create the \_pleroma user, assign it the pleroma login class and create its home directory (/home/\_pleroma/): `useradd -m -L pleroma _pleroma` #### Clone pleroma's directory -Enter a shell as the \_pleroma user. As root, run `su _pleroma -;cd`. Then clone the repository with `git clone https://git.pleroma.social/pleroma/pleroma.git`. Pleroma is now installed in /home/\_pleroma/pleroma/, it will be configured and started at the end of this guide. +Enter a shell as the \_pleroma user. As root, run `su _pleroma -;cd`. Then clone the repository with ` git clone -b master https://git.pleroma.social/pleroma/pleroma.git`. Pleroma is now installed in /home/\_pleroma/pleroma/, it will be configured and started at the end of this guide. #### Postgresql Start a shell as the \_postgresql user (as root run `su _postgresql -` then run the `initdb` command to initialize postgresql: diff --git a/docs/installation/openbsd_fi.md b/docs/installation/openbsd_fi.md index fa6faa62d..39819a8c8 100644 --- a/docs/installation/openbsd_fi.md +++ b/docs/installation/openbsd_fi.md @@ -44,7 +44,7 @@ Vaihda pleroma-käyttäjään ja mene kotihakemistoosi: Lataa pleroman lähdekoodi: -`$ git clone https://git.pleroma.social/pleroma/pleroma.git` +`$ git clone -b master https://git.pleroma.social/pleroma/pleroma.git` `$ cd pleroma` -- cgit v1.2.3 From 88414151b41e6e060caf7c90be3341a986351395 Mon Sep 17 00:00:00 2001 From: feld Date: Thu, 30 May 2019 21:35:31 +0000 Subject: Formatting --- docs/installation/debian_based_jp.md | 2 +- docs/installation/openbsd_en.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/installation/debian_based_jp.md b/docs/installation/debian_based_jp.md index 7b4c1bd86..84b9666c8 100644 --- a/docs/installation/debian_based_jp.md +++ b/docs/installation/debian_based_jp.md @@ -69,7 +69,7 @@ cd ~ * Gitリポジトリをクローンします。 ``` - git clone -b master https://git.pleroma.social/pleroma/pleroma +git clone -b master https://git.pleroma.social/pleroma/pleroma ``` * 新しいディレクトリに移動します。 diff --git a/docs/installation/openbsd_en.md b/docs/installation/openbsd_en.md index 46e7feffe..fcba38b2c 100644 --- a/docs/installation/openbsd_en.md +++ b/docs/installation/openbsd_en.md @@ -29,7 +29,7 @@ This creates a "pleroma" login class and sets higher values than default for dat Create the \_pleroma user, assign it the pleroma login class and create its home directory (/home/\_pleroma/): `useradd -m -L pleroma _pleroma` #### Clone pleroma's directory -Enter a shell as the \_pleroma user. As root, run `su _pleroma -;cd`. Then clone the repository with ` git clone -b master https://git.pleroma.social/pleroma/pleroma.git`. Pleroma is now installed in /home/\_pleroma/pleroma/, it will be configured and started at the end of this guide. +Enter a shell as the \_pleroma user. As root, run `su _pleroma -;cd`. Then clone the repository with `git clone -b master https://git.pleroma.social/pleroma/pleroma.git`. Pleroma is now installed in /home/\_pleroma/pleroma/, it will be configured and started at the end of this guide. #### Postgresql Start a shell as the \_postgresql user (as root run `su _postgresql -` then run the `initdb` command to initialize postgresql: -- cgit v1.2.3 From 10fe02acefca47e6013c4b0f70e4077a6d59d488 Mon Sep 17 00:00:00 2001 From: lain Date: Fri, 31 May 2019 14:58:28 +0200 Subject: Documentation: Document Settings store mechanism. --- docs/api/differences_in_mastoapi_responses.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs') diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index 36b47608e..21c1b76e5 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -43,6 +43,7 @@ Has these additional fields under the `pleroma` object: - `confirmation_pending`: boolean, true if a new user account is waiting on email confirmation to be activated - `hide_followers`: boolean, true when the user has follower hiding enabled - `hide_follows`: boolean, true when the user has follow hiding enabled +- `settings_store`: A generic map of settings for frontends. Opaque to the backend. Only returned in `verify_credentials` and `update_credentials` ### Source @@ -80,6 +81,14 @@ Additional parameters can be added to the JSON body/Form data: - `hide_favorites` - if true, user's favorites timeline will be hidden - `show_role` - if true, user's role (e.g admin, moderator) will be exposed to anyone in the API - `default_scope` - the scope returned under `privacy` key in Source subentity +- `pleroma_settings_store` - Opaque user settings to be saved on the backend. + +### Pleroma Settings Store +Pleroma has mechanism that allows frontends to save blobs of json for each user on the backend. This can be used to save frontend-specific settings for a user that the backend does not need to know about. + +The parameter should have a form of `{frontend_name: {...}}`, with `frontend_name` identifying your type of client, e.g. `pleroma_fe`. It will overwrite everything under this property, but will not overwrite other frontend's settings. + +This information is returned in the `verify_credentials` endpoint. ## Authentication -- cgit v1.2.3 From 5d3ece2861b619c101d6860fbc1a80bfd8630ba7 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 1 Jun 2019 01:42:46 +0200 Subject: Remove now useless flavours switching --- docs/api/pleroma_api.md | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'docs') diff --git a/docs/api/pleroma_api.md b/docs/api/pleroma_api.md index 4d99a2d2b..edc62727a 100644 --- a/docs/api/pleroma_api.md +++ b/docs/api/pleroma_api.md @@ -126,20 +126,6 @@ Request parameters can be passed via [query strings](https://en.wikipedia.org/wi ## `/api/pleroma/admin/`… See [Admin-API](Admin-API.md) -## `/api/v1/pleroma/flavour/:flavour` -* Method `POST` -* Authentication: required -* Response: JSON string. Returns the user flavour or the default one on success, otherwise returns `{"error": "error_msg"}` -* Example response: "glitch" -* Note: This is intended to be used only by mastofe - -## `/api/v1/pleroma/flavour` -* Method `GET` -* Authentication: required -* Response: JSON string. Returns the user flavour or the default one. -* Example response: "glitch" -* Note: This is intended to be used only by mastofe - ## `/api/pleroma/notifications/read` ### Mark a single notification as read * Method `POST` -- cgit v1.2.3 From c724d8df9831409df7990dfea3fd07ffb627a156 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sun, 2 Jun 2019 10:14:56 +0000 Subject: docs: document mrf_subchain --- docs/config.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 67b062fe9..5d9de647c 100644 --- a/docs/config.md +++ b/docs/config.md @@ -81,6 +81,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`: Doesn’t modify activities (default) * `Pleroma.Web.ActivityPub.MRF.DropPolicy`: Drops all activities. It generally doesn’t makes sense to use in production * `Pleroma.Web.ActivityPub.MRF.SimplePolicy`: Restrict the visibility of activities from certains instances (See ``:mrf_simple`` section) + * `Pleroma.Web.ActivityPub.MRF.SubchainPolicy`: Selectively runs other MRF policies when messages match (see ``:mrf_subchain`` section) * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`: Drops posts with non-public visibility settings (See ``:mrf_rejectnonpublic`` section) * `Pleroma.Web.ActivityPub.MRF.EnsureRePrepended`: Rewrites posts to ensure that replies to posts with subjects do not have an identical subject and instead begin with re:. * `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. @@ -224,6 +225,21 @@ relates to mascots on the mastodon frontend * `avatar_removal`: List of instances to strip avatars from * `banner_removal`: List of instances to strip banners from +## :mrf_subchain +This policy processes messages through an alternate pipeline when a given message matches certain criteria. +All criteria are configured as a map of regular expressions to lists of policy modules. + +* `match_actor`: Matches a series of regular expressions against the actor field. + +Example: + +``` +config :pleroma, :mrf_subchain, + match_actor: %{ + ~r/https:\/\/example.com/s => [Pleroma.Web.ActivityPub.MRF.DropPolicy] + } +``` + ## :mrf_rejectnonpublic * `allow_followersonly`: whether to allow followers-only posts * `allow_direct`: whether to allow direct messages -- cgit v1.2.3 From 83663caa81f1ccca37fe3898feb4ec2d829ad893 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Sun, 2 Jun 2019 17:45:32 +0300 Subject: Ueberauth: extended format of OAUTH_CONSUMER_STRATEGIES to allow explicit dependency specification. --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 67b062fe9..08088f269 100644 --- a/docs/config.md +++ b/docs/config.md @@ -492,7 +492,7 @@ Authentication / authorization settings. * `auth_template`: authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.eex`. * `oauth_consumer_template`: OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`. -* `oauth_consumer_strategies`: the list of enabled OAuth consumer strategies; by default it's set by OAUTH_CONSUMER_STRATEGIES environment variable. +* `oauth_consumer_strategies`: the list of enabled OAuth consumer strategies; by default it's set by OAUTH_CONSUMER_STRATEGIES environment variable. Each entry in this space-delimited string should be of format `` or `:` (e.g. `twitter` or `keycloak:ueberauth_keycloak_strategy` in case dependency is named differently than `ueberauth_`). ## OAuth consumer mode -- cgit v1.2.3 From 080e1aa70e4af4e9cdc0589f28648468bf116d6b Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Mon, 3 Jun 2019 16:04:39 +0300 Subject: add option skip_thread_containment --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 67b062fe9..fbb9079e6 100644 --- a/docs/config.md +++ b/docs/config.md @@ -105,6 +105,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). (Default: `false`) * `healthcheck`: if set to true, system data will be shown on ``/api/pleroma/healthcheck``. * `remote_post_retention_days`: the default amount of days to retain remote posts when pruning the database +* `skip_thread_containment`: Skip filter out broken threads. the default is `false`. ## :app_account_creation REST API for creating an account settings -- cgit v1.2.3 From f13d6c7f78cfae4005b351248ce3e9069abf93e2 Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Mon, 3 Jun 2019 21:02:02 +0300 Subject: update api to set skip_thread_containment --- docs/api/differences_in_mastoapi_responses.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index 36b47608e..ed156836d 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -80,6 +80,7 @@ Additional parameters can be added to the JSON body/Form data: - `hide_favorites` - if true, user's favorites timeline will be hidden - `show_role` - if true, user's role (e.g admin, moderator) will be exposed to anyone in the API - `default_scope` - the scope returned under `privacy` key in Source subentity +- `skip_thread_containment` - if true, skip filtering out broken threads ## Authentication -- cgit v1.2.3 From 25198d48f7e799ff350c8c7c57518b6ee49e6f8d Mon Sep 17 00:00:00 2001 From: lain Date: Tue, 4 Jun 2019 10:49:57 +0200 Subject: Docs: Add Explicit addressing to Readme and changelog. --- docs/api/differences_in_mastoapi_responses.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index 36b47608e..e8629e9ef 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -69,6 +69,7 @@ Additional parameters can be added to the JSON body/Form data: - `preview`: boolean, if set to `true` the post won't be actually posted, but the status entitiy would still be rendered back. This could be useful for previewing rich text/custom emoji, for example. - `content_type`: string, contain the MIME type of the status, it is transformed into HTML by the backend. You can get the list of the supported MIME types with the nodeinfo endpoint. +- `to`: A list of nicknames (like `lain@soykaf.club` or `lain` on the local server) that will be used to determine who is going to be addressed by this post. Using this will disable the implicit addressing by mentioned names in the `status` body, only the people in the `to` list will be addressed. The normal rules for for post visibility are not affected by this and will still apply. ## PATCH `/api/v1/update_credentials` -- cgit v1.2.3 From 96121315f3e9aebc57d36a669fc4003905cd0ba6 Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Tue, 4 Jun 2019 12:41:24 +0300 Subject: fix merge --- docs/api/differences_in_mastoapi_responses.md | 1 - 1 file changed, 1 deletion(-) (limited to 'docs') diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index 88a43de38..623d4fbf5 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -90,7 +90,6 @@ Pleroma has mechanism that allows frontends to save blobs of json for each user The parameter should have a form of `{frontend_name: {...}}`, with `frontend_name` identifying your type of client, e.g. `pleroma_fe`. It will overwrite everything under this property, but will not overwrite other frontend's settings. This information is returned in the `verify_credentials` endpoint. ->>>>>>> develop ## Authentication -- cgit v1.2.3 From 3eefb274f45e57ad855246cb930a6a094eeffe0e Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Wed, 5 Jun 2019 13:02:13 +0300 Subject: OAuth consumer: tests fix, comments, Keycloak config notes. --- docs/config.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index f4a1868fd..93ede6464 100644 --- a/docs/config.md +++ b/docs/config.md @@ -514,7 +514,7 @@ Authentication / authorization settings. * `auth_template`: authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.eex`. * `oauth_consumer_template`: OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`. -* `oauth_consumer_strategies`: the list of enabled OAuth consumer strategies; by default it's set by OAUTH_CONSUMER_STRATEGIES environment variable. Each entry in this space-delimited string should be of format `` or `:` (e.g. `twitter` or `keycloak:ueberauth_keycloak_strategy` in case dependency is named differently than `ueberauth_`). +* `oauth_consumer_strategies`: the list of enabled OAuth consumer strategies; by default it's set by `OAUTH_CONSUMER_STRATEGIES` environment variable. Each entry in this space-delimited string should be of format `` or `:` (e.g. `twitter` or `keycloak:ueberauth_keycloak_strategy` in case dependency is named differently than `ueberauth_`). ## OAuth consumer mode @@ -567,6 +567,24 @@ config :ueberauth, Ueberauth, providers: [ microsoft: {Ueberauth.Strategy.Microsoft, [callback_params: []]} ] + +# Keycloak +# Note: make sure to add `keycloak:ueberauth_keycloak_strategy` entry to `OAUTH_CONSUMER_STRATEGIES` environment variable +keycloak_url = "https://publicly-reachable-keycloak-instance.org:8080" + +config :ueberauth, Ueberauth.Strategy.Keycloak.OAuth, + client_id: System.get_env("KEYCLOAK_CLIENT_ID"), + client_secret: System.get_env("KEYCLOAK_CLIENT_SECRET"), + site: keycloak_url, + authorize_url: "#{keycloak_url}/auth/realms/master/protocol/openid-connect/auth", + token_url: "#{keycloak_url}/auth/realms/master/protocol/openid-connect/token", + userinfo_url: "#{keycloak_url}/auth/realms/master/protocol/openid-connect/userinfo", + token_method: :post + +config :ueberauth, Ueberauth, + providers: [ + keycloak: {Ueberauth.Strategy.Keycloak, [uid_field: :email]} + ] ``` ## OAuth 2.0 provider - :oauth2 -- cgit v1.2.3 From f82382de22c860c4a67a69e579e2d1fd2b186a87 Mon Sep 17 00:00:00 2001 From: Egor Date: Thu, 6 Jun 2019 12:17:49 +0000 Subject: [#943] Make the unauthenticated users limitation optional --- docs/config.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 93ede6464..c61a5d8a3 100644 --- a/docs/config.md +++ b/docs/config.md @@ -108,10 +108,11 @@ config :pleroma, Pleroma.Emails.Mailer, * `welcome_message`: A message that will be send to a newly registered users as a direct message. * `welcome_user_nickname`: The nickname of the local user that sends the welcome message. * `max_report_comment_size`: The maximum size of the report comment (Default: `1000`) -* `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). (Default: `false`) -* `healthcheck`: if set to true, system data will be shown on ``/api/pleroma/healthcheck``. -* `remote_post_retention_days`: the default amount of days to retain remote posts when pruning the database -* `skip_thread_containment`: Skip filter out broken threads. the default is `false`. +* `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). Default: `false`. +* `healthcheck`: If set to true, system data will be shown on ``/api/pleroma/healthcheck``. +* `remote_post_retention_days`: The default amount of days to retain remote posts when pruning the database. +* `skip_thread_containment`: Skip filter out broken threads. The default is `false`. +* `limit_unauthenticated_to_local_content`: Limit unauthenticated users to search for local statutes and users only. The default is `true`. ## :app_account_creation REST API for creating an account settings -- cgit v1.2.3 From 2e5affce61a9255602d3a5d4c5caced9f09b1f5a Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Tue, 11 Jun 2019 14:27:41 +0700 Subject: Add RateLimiter --- docs/config.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index c61a5d8a3..e31e2b90f 100644 --- a/docs/config.md +++ b/docs/config.md @@ -616,3 +616,14 @@ To enable them, both the `rum_enabled` flag has to be set and the following spec `mix ecto.migrate --migrations-path priv/repo/optional_migrations/rum_indexing/` This will probably take a long time. + +## :rate_limit + +A keyword list of rate limiters where a key is a limiter name and value is the limiter configuration. The basic configuration is a tuple where: + +* The first element: `scale` (Integer). The time scale in milliseconds. +* The second element: `limit` (Integer). How many requests to limit in the time scale provided. + +It is also possible to have different limits for unauthenticated and authenticated users: the keyword value must be a list of two tuples where the first one is a config for unauthenticated users and the second one is for authenticated. + +See [`Pleroma.Plugs.RateLimiter`](Pleroma.Plugs.RateLimiter.html) documentation for examples. -- cgit v1.2.3 From ad04d12de63d559cc6398c58296afd04321adfbc Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Tue, 11 Jun 2019 16:06:03 +0700 Subject: Replace `MastodonAPIController.account_register/2` rate limiter --- docs/config.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index e31e2b90f..b62b80490 100644 --- a/docs/config.md +++ b/docs/config.md @@ -114,12 +114,6 @@ config :pleroma, Pleroma.Emails.Mailer, * `skip_thread_containment`: Skip filter out broken threads. The default is `false`. * `limit_unauthenticated_to_local_content`: Limit unauthenticated users to search for local statutes and users only. The default is `true`. -## :app_account_creation -REST API for creating an account settings -* `enabled`: Enable/disable registration -* `max_requests`: Number of requests allowed for creating accounts -* `interval`: Interval for restricting requests for one ip (seconds) - ## :logger * `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog, and `Quack.Logger` to log to Slack @@ -568,7 +562,7 @@ config :ueberauth, Ueberauth, providers: [ microsoft: {Ueberauth.Strategy.Microsoft, [callback_params: []]} ] - + # Keycloak # Note: make sure to add `keycloak:ueberauth_keycloak_strategy` entry to `OAUTH_CONSUMER_STRATEGIES` environment variable keycloak_url = "https://publicly-reachable-keycloak-instance.org:8080" -- cgit v1.2.3 From 5d5a9a3a35cb06c7cbd9c29fdbf7cc0b866785fa Mon Sep 17 00:00:00 2001 From: Hakaba Hitoyo Date: Tue, 11 Jun 2019 11:34:22 +0000 Subject: Better default parameters for suggestion --- docs/config/howto_user_recomendation.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/config/howto_user_recomendation.md b/docs/config/howto_user_recomendation.md index 27c0760dd..c4d749d0c 100644 --- a/docs/config/howto_user_recomendation.md +++ b/docs/config/howto_user_recomendation.md @@ -9,8 +9,8 @@ config :pleroma, :suggestions, third_party_engine: "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}", timeout: 300_000, - limit: 23, - web: "https://vinayaka.distsn.org/?{{host}}+{{user}}" + limit: 40, + web: "https://vinayaka.distsn.org" ``` @@ -26,6 +26,6 @@ config :pleroma, :suggestions, third_party_engine: "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-new-suggestions-api.cgi?{{host}}+{{user}}", timeout: 60_000, - limit: 23, + limit: 40, web: "https://vinayaka.distsn.org/user-new.html" ``` -- cgit v1.2.3 From 6f29865d43f30303bc05bfb10aa28fe3ebef1bfd Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Tue, 11 Jun 2019 21:25:53 +0700 Subject: Add option to restrict all users to local content --- docs/config.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index b62b80490..9e877fb51 100644 --- a/docs/config.md +++ b/docs/config.md @@ -112,7 +112,8 @@ config :pleroma, Pleroma.Emails.Mailer, * `healthcheck`: If set to true, system data will be shown on ``/api/pleroma/healthcheck``. * `remote_post_retention_days`: The default amount of days to retain remote posts when pruning the database. * `skip_thread_containment`: Skip filter out broken threads. The default is `false`. -* `limit_unauthenticated_to_local_content`: Limit unauthenticated users to search for local statutes and users only. The default is `true`. +* `limit_to_local_content`: Limit unauthenticated users to search for local statutes and users only. Possible values: `:unauthenticated`, `:all` and `false`. The default is `:unauthenticated`. + ## :logger * `backends`: `:console` is used to send logs to stdout, `{ExSyslogger, :ex_syslogger}` to log to syslog, and `Quack.Logger` to log to Slack -- cgit v1.2.3 From ced59be1ae8deb4dd505215062d45be3e262710e Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 11 Jun 2019 22:15:28 +0300 Subject: Document TagPolicy in `rewrite_policy` section --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index b62b80490..54632fbda 100644 --- a/docs/config.md +++ b/docs/config.md @@ -86,6 +86,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`: Doesn’t modify activities (default) * `Pleroma.Web.ActivityPub.MRF.DropPolicy`: Drops all activities. It generally doesn’t makes sense to use in production * `Pleroma.Web.ActivityPub.MRF.SimplePolicy`: Restrict the visibility of activities from certains instances (See ``:mrf_simple`` section) + * `Pleroma.Web.ActivityPub.MRF.TagPolicy`: Applies policies to individual users based on tags, which can be set using pleroma-fe/admin-fe/any other app that supports Pleroma Admin API. For example it allows marking posts from individual users nsfw (sensitive) * `Pleroma.Web.ActivityPub.MRF.SubchainPolicy`: Selectively runs other MRF policies when messages match (see ``:mrf_subchain`` section) * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`: Drops posts with non-public visibility settings (See ``:mrf_rejectnonpublic`` section) * `Pleroma.Web.ActivityPub.MRF.EnsureRePrepended`: Rewrites posts to ensure that replies to posts with subjects do not have an identical subject and instead begin with re:. -- cgit v1.2.3 From 774637a2f4505d62a2afb243b04ba283030047dc Mon Sep 17 00:00:00 2001 From: lain Date: Fri, 14 Jun 2019 11:24:09 +0200 Subject: Mastodon API: Document changes. --- docs/api/differences_in_mastoapi_responses.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index f5766c2d9..a336799dc 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -84,6 +84,7 @@ Additional parameters can be added to the JSON body/Form data: - `default_scope` - the scope returned under `privacy` key in Source subentity - `pleroma_settings_store` - Opaque user settings to be saved on the backend. - `skip_thread_containment` - if true, skip filtering out broken threads +- `pleroma_background_image` - sets the background image of the user. ### Pleroma Settings Store Pleroma has mechanism that allows frontends to save blobs of json for each user on the backend. This can be used to save frontend-specific settings for a user that the backend does not need to know about. -- cgit v1.2.3 From c2ca1f22a25d22d6d863406ed05b08c643e5824c Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Fri, 14 Jun 2019 15:45:05 +0000 Subject: it is changed in compile time we can't change module attributes and endpoint settings in runtime --- docs/api/admin_api.md | 108 +++++++++++++++++++++++++++++++++++++++++++------- docs/config.md | 1 + 2 files changed, 95 insertions(+), 14 deletions(-) (limited to 'docs') diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md index b45c5e285..5dcc8d059 100644 --- a/docs/api/admin_api.md +++ b/docs/api/admin_api.md @@ -289,7 +289,7 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret - `limit`: optional, the number of records to retrieve - `since_id`: optional, returns results that are more recent than the specified id - `max_id`: optional, returns results that are older than the specified id -- Response: +- Response: - On failure: 403 Forbidden error `{"error": "error_msg"}` when requested by anonymous or non-admin - On success: JSON, returns a list of reports, where: - `account`: the user who has been reported @@ -443,7 +443,7 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret - Params: - `id` - Response: - - On failure: + - On failure: - 403 Forbidden `{"error": "error_msg"}` - 404 Not Found `"Not found"` - On success: JSON, Report object (see above) @@ -454,8 +454,8 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret - Params: - `id` - `state`: required, the new state. Valid values are `open`, `closed` and `resolved` -- Response: - - On failure: +- Response: + - On failure: - 400 Bad Request `"Unsupported state"` - 403 Forbidden `{"error": "error_msg"}` - 404 Not Found `"Not found"` @@ -467,10 +467,10 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret - Params: - `id` - `status`: required, the message -- Response: - - On failure: - - 400 Bad Request `"Invalid parameters"` when `status` is missing - - 403 Forbidden `{"error": "error_msg"}` +- Response: + - On failure: + - 400 Bad Request `"Invalid parameters"` when `status` is missing + - 403 Forbidden `{"error": "error_msg"}` - 404 Not Found `"Not found"` - On success: JSON, created Mastodon Status entity @@ -540,10 +540,10 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret - `id` - `sensitive`: optional, valid values are `true` or `false` - `visibility`: optional, valid values are `public`, `private` and `unlisted` -- Response: - - On failure: +- Response: + - On failure: - 400 Bad Request `"Unsupported visibility"` - - 403 Forbidden `{"error": "error_msg"}` + - 403 Forbidden `{"error": "error_msg"}` - 404 Not Found `"Not found"` - On success: JSON, Mastodon Status entity @@ -552,8 +552,88 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret - Method `DELETE` - Params: - `id` -- Response: - - On failure: - - 403 Forbidden `{"error": "error_msg"}` +- Response: + - On failure: + - 403 Forbidden `{"error": "error_msg"}` - 404 Not Found `"Not found"` - On success: 200 OK `{}` + +## `/api/pleroma/admin/config` +### List config settings +- Method `GET` +- Params: none +- Response: + +```json +{ + configs: [ + { + "key": string, + "value": string or {} or [] + } + ] +} +``` + +## `/api/pleroma/admin/config` +### Update config settings +Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`. +Atom or boolean value can be passed with `:` in the beginning, e.g. `":true"`, `":upload"`. +Integer with `i:`, e.g. `"i:150"`. + +Compile time settings (need instance reboot): +- all settings by this keys: + - `:hackney_pools` + - `:chat` + - `Pleroma.Web.Endpoint` + - `Pleroma.Repo` +- part settings: + - `Pleroma.Captcha` -> `:seconds_valid` + - `Pleroma.Upload` -> `:proxy_remote` + - `:instance` -> `:upload_limit` + +- Method `POST` +- Params: + - `configs` => [ + - `key` (string) + - `value` (string, [], {}) + - `delete` = true (optional, if parameter must be deleted) + ] + +- Request (example): + +```json +{ + configs: [ + { + "key": "Pleroma.Upload", + "value": { + "uploader": "Pleroma.Uploaders.Local", + "filters": ["Pleroma.Upload.Filter.Dedupe"], + "link_name": ":true", + "proxy_remote": ":false", + "proxy_opts": { + "redirect_on_failure": ":false", + "max_body_length": "i:1048576", + "http": { + "follow_redirect": ":true", + "pool": ":upload" + } + } + } + } + ] +} + +- Response: + +```json +{ + configs: [ + { + "key": string, + "value": string or {} or [] + } + ] +} +``` diff --git a/docs/config.md b/docs/config.md index 2b0f5726b..ed8e465c6 100644 --- a/docs/config.md +++ b/docs/config.md @@ -114,6 +114,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `remote_post_retention_days`: The default amount of days to retain remote posts when pruning the database. * `skip_thread_containment`: Skip filter out broken threads. The default is `false`. * `limit_to_local_content`: Limit unauthenticated users to search for local statutes and users only. Possible values: `:unauthenticated`, `:all` and `false`. The default is `:unauthenticated`. +* `dynamic_configuration`: Allow transferring configuration to DB with the subsequent customization from Admin api. ## :logger -- cgit v1.2.3 From 6745bc951cf1d5fd8ef80391967bd3f3fd2b75fe Mon Sep 17 00:00:00 2001 From: lain Date: Sat, 15 Jun 2019 11:11:45 +0200 Subject: Documentation: Document chat token response. --- docs/api/differences_in_mastoapi_responses.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index a336799dc..3ee7115cf 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -44,6 +44,7 @@ Has these additional fields under the `pleroma` object: - `hide_followers`: boolean, true when the user has follower hiding enabled - `hide_follows`: boolean, true when the user has follow hiding enabled - `settings_store`: A generic map of settings for frontends. Opaque to the backend. Only returned in `verify_credentials` and `update_credentials` +- `chat_token`: The token needed for Pleroma chat. Only returned in `verify_credentials` ### Source -- cgit v1.2.3 From 736d8ad6be1ccb1514a189ccf2384e9699ea107e Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 19 Jun 2019 15:57:44 +0000 Subject: implement anti link spam MRF --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index ed8e465c6..4e9697afc 100644 --- a/docs/config.md +++ b/docs/config.md @@ -90,6 +90,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `Pleroma.Web.ActivityPub.MRF.SubchainPolicy`: Selectively runs other MRF policies when messages match (see ``:mrf_subchain`` section) * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`: Drops posts with non-public visibility settings (See ``:mrf_rejectnonpublic`` section) * `Pleroma.Web.ActivityPub.MRF.EnsureRePrepended`: Rewrites posts to ensure that replies to posts with subjects do not have an identical subject and instead begin with re:. + * `Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy`: Rejects posts from likely spambots using naive heuristics. * `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. * `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. * `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` -- cgit v1.2.3 From 630ac6a921bc80a93f5f994731c1085fd1b9d3e8 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 20 Jun 2019 03:01:03 +0000 Subject: docs: better description for mrf anti link spam --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 4e9697afc..b75193545 100644 --- a/docs/config.md +++ b/docs/config.md @@ -90,7 +90,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `Pleroma.Web.ActivityPub.MRF.SubchainPolicy`: Selectively runs other MRF policies when messages match (see ``:mrf_subchain`` section) * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`: Drops posts with non-public visibility settings (See ``:mrf_rejectnonpublic`` section) * `Pleroma.Web.ActivityPub.MRF.EnsureRePrepended`: Rewrites posts to ensure that replies to posts with subjects do not have an identical subject and instead begin with re:. - * `Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy`: Rejects posts from likely spambots using naive heuristics. + * `Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy`: Rejects posts from likely spambots by rejecting posts from new users that contain links. * `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. * `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. * `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` -- cgit v1.2.3 From dd238887743cba24b8fa1971ae0a4f806a212f13 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 05:48:13 +0300 Subject: OTP release install guide sceleton --- docs/installation/releases_en.md | 188 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 docs/installation/releases_en.md (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md new file mode 100644 index 000000000..c0eafa75a --- /dev/null +++ b/docs/installation/releases_en.md @@ -0,0 +1,188 @@ +# Installing on Linux using OTP releases + +## Pre-requisites +* A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below +* A (sub)domain pointed to the machine + +You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`. + +While in theory OTP releases are possbile to install on any compatible machine, for the sake of simplicity this guide focuses only on Debian/Ubuntu/Alpine. + +### Detecting flavour + +Paste the following into the shell: +```sh +arch="$(arch)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;exit 1;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;exit 1;fi;echo "$arch$libc_postfix" +``` + +If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try the regular install. + +### Installing the required packages + +Other than things bundled in the OTP release Pleroma depends on: +* curl (to download the release build) +* unzip (needed to unpack release builds) +* ncurses (ERTS won't run without it) +* PostgreSQL (also utilizes extensions in postgresql-contrib) +* nginx (could be swapped with another webserver but this guide covers only it) +* certbot (for Let's Encrypt certificates, could be swapped with another ACME client, but this guide covers only it) + +Debian/Ubuntu: +```sh +apt install curl unzip ncurses postgresql posqtgresql-contrib nginx certbot +``` +Alpine: +```sh +apk add curl unzip ncurses postgresql posqtgresql-contrib nginx certbot +``` + +## Setup +### Configuring PostgreSQL +#### (Optional) Installing RUM indexes +RUM indexes are an alternative indexing scheme that is not included in PostgreSQL by default. You can read more about them on the [Configuration page](config.html#rum-indexing-for-full-text-search). They are completely optional and most of the time are not worth it, especially if you are running a single user instance (unless you absolutely need ordered search results). + +Debian/Ubuntu: +```sh +apt install postgresql-rum +``` +Alpine: +```sh +apk install gcc make +git clone https://github.com/postgrespro/rum /tmp/rum +cd /tmp/rum +make USE_PGXS=1 +make USE_PGXS=1 install +make USE_PGXS=1 installcheck +cd +rm -r /tmp/rum +``` +#### (Optional) Performance configuration +For optimal performance, you may use [PGTune](https://pgtune.leopard.in.ua), don't forget to restart postgresql after editing the configuration + +Debian/Ubuntu: +```sh +systemctl restart postgresql +``` +Alpine: +```sh +rc-service postgresql restart +``` +### Installing Pleroma +```sh +# Create the Pleroma user +adduser -S -s /bin/false -h /opt/pleroma -H pleroma + +# Set the flavour environment variable to the string you got in Detecting flavour section. +# For example if the flavour is `arm64-musl` the command will be +export FLAVOUR="arm64-musl" + +# Clone the release build into a temporary directory and unpack it +su pleroma -s $SHELL -lc " +echo '$FLAVOUR' +curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/master/download?job=$FLAVOUR' -o /tmp/pleroma.zip +unzip /tmp/pleroma.zip -d /tmp/ +" + +# Move the release to the home directory and delete temporary files +su pleroma -s $SHELL -lc " +mv /tmp/release/* /opt/pleroma +rmdir /tmp/release +rm /tmp/pleroma.zip +" +# Create uploads directory and set proper permissions (skip if planning to use a remote uploader) +# Note: It does not have to be `/var/lib/pleroma/uploads`, the config generator will ask about the upload directory later + +mkdir -p /var/lib/pleroma/uploads +chown -R pleroma:pleroma /var/lib/pleroma + +# Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.) +# Note: It does not have to be `/var/lib/pleroma/static`, the config generator will ask about the custom public files directory later +mkdir -p /var/lib/pleroma/static +chown -R pleroma:pleroma /var/lib/pleroma + +# Create a config directory +mkdir -p /etc/pleroma +chown -R pleroma:pleroma /etc/pleroma + +# Run the config generator +su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql" + +# Create the postgres database +psql -U postgres -d postgres -f /tmp/setup_db.psql + +# Create the database schema +./bin/pleroma_ctl create +./bin/pleroma_ctl migrate + +# Start the instance to verify that everything is working as expected +./bin/pleroma daemon + +# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly +sleep 20 && curl http://localhost:4000/api/v1/instance + +# Stop the instance +./bin/pleroma stop +``` + +### Setting up nginx and getting Let's Encrypt SSL certificaties + +```sh +# Get a Let's Encrypt certificate +certbot certonly --standalone --preferred-challenges http -d yourinstance.tld + +# Copy the Pleroma nginx configuration to the nginx folder +# The location of nginx configs is dependent on the distro + +# For Debian/Ubuntu: +cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx +ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx +# For Alpine +cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.conf +# If your distro does not have either of those you can append +# `include /etc/nginx/pleroma.conf` to the end of the http section in /etc/nginx/nginx.conf and +cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/pleroma.conf + +# Edit the nginx config replacing example.tld with your (sub)domain +$EDITOR path-to-the-config + +# Verify that the config is valid +nginx -t + +# Start nginx +# For Debian/Ubuntu: +systemctl start nginx +# For Alpine +rc-service nginx start +``` + +At this point if you open your (sub)domain in a browser you should see a 502 error, that's because pleroma is not started yet. + +### Setting up a system service +Debian/Ubuntu: +```sh +# Copy the service into a proper directory +cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service + +# Start pleroma and enable it on boot +systemctl start pleroma +systemctl enable pleroma +``` +Alpine: +```sh +# Copy the service into a proper directory +cp /opt/pleroma/installation/init.d/pleroma /etc/init.d/pleroma + +# Start pleroma and enable it on boot +rc-service pleroma start +rc-update add pleroma +``` + +If everything worked, you should see Pleroma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Pleroma in the foreground and seeing if there are any errrors. + +Still doesn't work? Feel free to contact us on [#pleroma on freenode](https://webchat.freenode.net/?channels=%23pleroma) or via matrix at , you can also [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma/issues/new) + +## Post installation + +### Setting up auto-renew Let's Encrypt certificate +### Running Mix tasks +### Updating -- cgit v1.2.3 From d3d98beaad9127517c7ad8d027f052a23807772b Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 06:04:39 +0300 Subject: Correct package names for Debian --- docs/installation/releases_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index c0eafa75a..4645f7aff 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -29,7 +29,7 @@ Other than things bundled in the OTP release Pleroma depends on: Debian/Ubuntu: ```sh -apt install curl unzip ncurses postgresql posqtgresql-contrib nginx certbot +apt install curl unzip libncurses5 postgresql postgresql-contrib nginx certbot ``` Alpine: ```sh -- cgit v1.2.3 From f9515a36112c8f6a8a40dbda234aaa6bb5de3827 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 06:14:02 +0300 Subject: Add a note about RUM indexes package on Debian/Ubuntu --- docs/installation/releases_en.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 4645f7aff..39749b40b 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -41,9 +41,9 @@ apk add curl unzip ncurses postgresql posqtgresql-contrib nginx certbot #### (Optional) Installing RUM indexes RUM indexes are an alternative indexing scheme that is not included in PostgreSQL by default. You can read more about them on the [Configuration page](config.html#rum-indexing-for-full-text-search). They are completely optional and most of the time are not worth it, especially if you are running a single user instance (unless you absolutely need ordered search results). -Debian/Ubuntu: +Debian/Ubuntu (available only on Buster/19.04): ```sh -apt install postgresql-rum +apt install postgresql-11-rum ``` Alpine: ```sh -- cgit v1.2.3 From 4669a56aa37bf02aa6564ef53758879e3a58a6b2 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 06:22:34 +0300 Subject: Add notes on RUM indexes --- docs/installation/releases_en.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 39749b40b..918ae83e1 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -110,10 +110,17 @@ su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/c # Create the postgres database psql -U postgres -d postgres -f /tmp/setup_db.psql +# If you have installed RUM indexes add +# `config :pleroma, :database, rum_enabled: true` +# to the end of /etc/pleroma/config.exs before proceeding + # Create the database schema ./bin/pleroma_ctl create ./bin/pleroma_ctl migrate +# If you have installed RUM indexes also run +./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/ + # Start the instance to verify that everything is working as expected ./bin/pleroma daemon -- cgit v1.2.3 From 16e9304cecc420b9dbdb17f0db13a9a0010ad6cf Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 06:32:34 +0300 Subject: Change to long adduser options because the short ones only work on busybox --- docs/installation/releases_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 918ae83e1..df1b02231 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -70,7 +70,7 @@ rc-service postgresql restart ### Installing Pleroma ```sh # Create the Pleroma user -adduser -S -s /bin/false -h /opt/pleroma -H pleroma +adduser --system --shell /bin/false --home /opt/pleroma pleroma # Set the flavour environment variable to the string you got in Detecting flavour section. # For example if the flavour is `arm64-musl` the command will be -- cgit v1.2.3 From e824025c52bec84a44bc4307407071daa99e805f Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 06:37:38 +0300 Subject: Remove a useless echo --- docs/installation/releases_en.md | 1 - 1 file changed, 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index df1b02231..e1a2e97e6 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -78,7 +78,6 @@ export FLAVOUR="arm64-musl" # Clone the release build into a temporary directory and unpack it su pleroma -s $SHELL -lc " -echo '$FLAVOUR' curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/master/download?job=$FLAVOUR' -o /tmp/pleroma.zip unzip /tmp/pleroma.zip -d /tmp/ " -- cgit v1.2.3 From 4bec121798218f8abf8d2915fa7c26ccb23a4f4a Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 06:39:03 +0300 Subject: Do not set ownership group in chown commands --- docs/installation/releases_en.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index e1a2e97e6..9fbb4b26e 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -92,16 +92,16 @@ rm /tmp/pleroma.zip # Note: It does not have to be `/var/lib/pleroma/uploads`, the config generator will ask about the upload directory later mkdir -p /var/lib/pleroma/uploads -chown -R pleroma:pleroma /var/lib/pleroma +chown -R pleroma /var/lib/pleroma # Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.) # Note: It does not have to be `/var/lib/pleroma/static`, the config generator will ask about the custom public files directory later mkdir -p /var/lib/pleroma/static -chown -R pleroma:pleroma /var/lib/pleroma +chown -R pleroma /var/lib/pleroma # Create a config directory mkdir -p /etc/pleroma -chown -R pleroma:pleroma /etc/pleroma +chown -R pleroma /etc/pleroma # Run the config generator su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql" -- cgit v1.2.3 From 8b170b96c7c9ae727bdfe2d6856375b183f56180 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 16:59:48 +0000 Subject: Apply suggestion to docs/installation/releases_en.md --- docs/installation/releases_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 9fbb4b26e..352dc3dfc 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -118,7 +118,7 @@ psql -U postgres -d postgres -f /tmp/setup_db.psql ./bin/pleroma_ctl migrate # If you have installed RUM indexes also run -./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/ +# ./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/ # Start the instance to verify that everything is working as expected ./bin/pleroma daemon -- cgit v1.2.3 From de77d7621a781cf409663a8d5e931227e3b2cf82 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 16:59:56 +0000 Subject: Apply suggestion to docs/installation/releases_en.md --- docs/installation/releases_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 352dc3dfc..48fffa6e2 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -24,7 +24,7 @@ Other than things bundled in the OTP release Pleroma depends on: * unzip (needed to unpack release builds) * ncurses (ERTS won't run without it) * PostgreSQL (also utilizes extensions in postgresql-contrib) -* nginx (could be swapped with another webserver but this guide covers only it) +* nginx (could be swapped with another reverse proxy but this guide covers only it) * certbot (for Let's Encrypt certificates, could be swapped with another ACME client, but this guide covers only it) Debian/Ubuntu: -- cgit v1.2.3 From 743bd648832eb1fd6033c3484059c08f88af40f3 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 21 Jun 2019 17:00:12 +0000 Subject: Apply suggestion to docs/installation/releases_en.md --- docs/installation/releases_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 48fffa6e2..c682a8d61 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -15,7 +15,7 @@ Paste the following into the shell: arch="$(arch)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;exit 1;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;exit 1;fi;echo "$arch$libc_postfix" ``` -If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try the regular install. +If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source. ### Installing the required packages -- cgit v1.2.3 From d1d648b0ecfb0924d7921796d7edef9512e030b0 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 22 Jun 2019 02:09:45 +0300 Subject: Correct the psql command --- docs/installation/releases_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index c682a8d61..10d8879af 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -107,7 +107,7 @@ chown -R pleroma /etc/pleroma su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql" # Create the postgres database -psql -U postgres -d postgres -f /tmp/setup_db.psql +su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql" # If you have installed RUM indexes add # `config :pleroma, :database, rum_enabled: true` -- cgit v1.2.3 From 23608149bc72d740e6259e460e43ff276583516d Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 22 Jun 2019 02:20:55 +0300 Subject: Execute migration commands as the pleroma user and add a note about the need to uncomment the RUM command --- docs/installation/releases_en.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 10d8879af..31e3ac30d 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -114,20 +114,20 @@ su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql" # to the end of /etc/pleroma/config.exs before proceeding # Create the database schema -./bin/pleroma_ctl create -./bin/pleroma_ctl migrate +su pleroma -s $SHELL -lc "./bin/pleroma_ctl create" +su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate" -# If you have installed RUM indexes also run -# ./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/ +# If you have installed RUM indexes uncommend and run +# su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/" # Start the instance to verify that everything is working as expected -./bin/pleroma daemon +su pleroma -s $SHELL -lc "./bin/pleroma daemon" # Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly sleep 20 && curl http://localhost:4000/api/v1/instance # Stop the instance -./bin/pleroma stop +su pleroma -s $SHELL -lc "./bin/pleroma stop" ``` ### Setting up nginx and getting Let's Encrypt SSL certificaties -- cgit v1.2.3 From 120f84c83dcebb9b46cb158b9e1f4af9cf0aee28 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 22 Jun 2019 04:35:17 +0300 Subject: Executing create is unnecessary after the postgres script is executed --- docs/installation/releases_en.md | 1 - 1 file changed, 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 31e3ac30d..5ccd50c47 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -114,7 +114,6 @@ su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql" # to the end of /etc/pleroma/config.exs before proceeding # Create the database schema -su pleroma -s $SHELL -lc "./bin/pleroma_ctl create" su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate" # If you have installed RUM indexes uncommend and run -- cgit v1.2.3 From 1d2332ce79c374f4958b5d554ea96d382e9806fb Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 22 Jun 2019 05:20:36 +0300 Subject: Use uname -m instead of arch for more portability --- docs/installation/releases_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 5ccd50c47..7dde26771 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -12,7 +12,7 @@ While in theory OTP releases are possbile to install on any compatible machine, Paste the following into the shell: ```sh -arch="$(arch)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;exit 1;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;exit 1;fi;echo "$arch$libc_postfix" +arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;exit 1;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;exit 1;fi;echo "$arch$libc_postfix" ``` If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source. -- cgit v1.2.3 From dd05dc65d31d5d54662e7c5d81ed393ae25d14dd Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 22 Jun 2019 08:30:32 +0300 Subject: Do not exit on fail in the one-liner because it closes ssh connection and fix dependencies for alpine --- docs/installation/releases_en.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 7dde26771..31b639d32 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -12,7 +12,7 @@ While in theory OTP releases are possbile to install on any compatible machine, Paste the following into the shell: ```sh -arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;exit 1;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;exit 1;fi;echo "$arch$libc_postfix" +arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;fi;echo "$arch$libc_postfix" ``` If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source. @@ -33,7 +33,9 @@ apt install curl unzip libncurses5 postgresql postgresql-contrib nginx certbot ``` Alpine: ```sh -apk add curl unzip ncurses postgresql posqtgresql-contrib nginx certbot +echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories +apk update +apk add curl unzip ncurses postgresql postgresql-contrib nginx certbot ``` ## Setup -- cgit v1.2.3 From 50e3cf9d5e4c957f4a979bbeed29787209bdfa13 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 22 Jun 2019 08:31:02 +0300 Subject: Correct a typo in the apk command --- docs/installation/releases_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 31b639d32..9c108c4ff 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -49,7 +49,7 @@ apt install postgresql-11-rum ``` Alpine: ```sh -apk install gcc make +apk add gcc make git clone https://github.com/postgrespro/rum /tmp/rum cd /tmp/rum make USE_PGXS=1 -- cgit v1.2.3 From 177faf15c24453fc67bb5bedc6189055e686e2a3 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 22 Jun 2019 08:36:36 +0300 Subject: Correct dependencies for RUM on alpine and remove installcheck --- docs/installation/releases_en.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 9c108c4ff..ce46d0d29 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -49,12 +49,11 @@ apt install postgresql-11-rum ``` Alpine: ```sh -apk add gcc make +apk add gcc make git postgresql-dev musl-dev git clone https://github.com/postgrespro/rum /tmp/rum cd /tmp/rum make USE_PGXS=1 make USE_PGXS=1 install -make USE_PGXS=1 installcheck cd rm -r /tmp/rum ``` -- cgit v1.2.3 From e00e4c0e7a43aaa5c4be43e105712101167f4cbd Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 22 Jun 2019 13:40:37 +0300 Subject: Add a warning about OTP releases on Alpine 3.10 --- docs/installation/releases_en.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index ce46d0d29..e8bdf007d 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -32,8 +32,10 @@ Debian/Ubuntu: apt install curl unzip libncurses5 postgresql postgresql-contrib nginx certbot ``` Alpine: + +**Warning:** There has been some changes to musl on Alpine 3.10 which need an Elixir rebuild. Since the build machines are running Alpine 3.9 running the builds on 3.10 will likely fail with "dlsym: Resource temporarily unavailable". If you have not updated yet, replace `latest-stable` with `v3.9` in `/etc/apk/repositories`. If you have, try downgrading `musl` to `1.1.20-r3` ```sh -echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories +echo "http://nl.alpinelinux.org/alpine/v3.9/community" >> /etc/apk/repositories apk update apk add curl unzip ncurses postgresql postgresql-contrib nginx certbot ``` @@ -149,7 +151,7 @@ cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.conf cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/pleroma.conf # Edit the nginx config replacing example.tld with your (sub)domain -$EDITOR path-to-the-config +$EDITOR path-to-nginx-config # Verify that the config is valid nginx -t -- cgit v1.2.3 From 410add1c30d230e86c22de4e54bb9999de980b16 Mon Sep 17 00:00:00 2001 From: Alex S Date: Sat, 22 Jun 2019 17:30:53 +0300 Subject: support for tuples with more than 2 values --- docs/api/admin_api.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md index 5dcc8d059..63af33821 100644 --- a/docs/api/admin_api.md +++ b/docs/api/admin_api.md @@ -580,6 +580,8 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`. Atom or boolean value can be passed with `:` in the beginning, e.g. `":true"`, `":upload"`. Integer with `i:`, e.g. `"i:150"`. +Tuple with more than 2 values with `{"tuple": ["first_val", Pleroma.Module, []]}`. +`{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`. Compile time settings (need instance reboot): - all settings by this keys: @@ -619,6 +621,9 @@ Compile time settings (need instance reboot): "follow_redirect": ":true", "pool": ":upload" } + }, + "dispatch": { + "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []] } } } @@ -632,7 +637,7 @@ Compile time settings (need instance reboot): configs: [ { "key": string, - "value": string or {} or [] + "value": string or {} or [] or {"tuple": []} } ] } -- cgit v1.2.3 From ab79a18b7765da0032de7f6bea43875764573e80 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sat, 22 Jun 2019 19:24:21 +0200 Subject: docs/clients.md: Remove tootdon Of course a proprietary client would send the messages home :D --- docs/clients.md | 7 ------- 1 file changed, 7 deletions(-) (limited to 'docs') diff --git a/docs/clients.md b/docs/clients.md index dc3e83bcc..30358c210 100644 --- a/docs/clients.md +++ b/docs/clients.md @@ -49,13 +49,6 @@ Feel free to contact us to be added to this list! - Platforms: iOS, Android - Features: No Streaming -### Tootdon -- Homepage: , -- Source Code: ??? -- Contact: [@tootdon@mstdn.jp](https://mstdn.jp/users/tootdon) -- Platforms: Android, iOS -- Features: No Streaming - ### Tusky - Homepage: - Source Code: -- cgit v1.2.3 From 7a4c4518b8cdff5684f3287f373e3e6acf72293c Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 22 Jun 2019 21:18:34 +0300 Subject: Remove a note about needing to add RUM to config manually, as it is now in the config generator --- docs/installation/releases_en.md | 4 ---- 1 file changed, 4 deletions(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index e8bdf007d..7f53aedb8 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -112,10 +112,6 @@ su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/c # Create the postgres database su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql" -# If you have installed RUM indexes add -# `config :pleroma, :database, rum_enabled: true` -# to the end of /etc/pleroma/config.exs before proceeding - # Create the database schema su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate" -- cgit v1.2.3 From 9d487ba57949a4102aa2eb67b26842f1c0ef418c Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sun, 23 Jun 2019 02:42:47 +0300 Subject: Add docs about SSL certificate auto-renew --- docs/installation/releases_en.md | 52 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 7f53aedb8..30fbf5177 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -140,7 +140,7 @@ certbot certonly --standalone --preferred-challenges http -d yourinstance.tld # For Debian/Ubuntu: cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx -# For Alpine +# For Alpine: cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.conf # If your distro does not have either of those you can append # `include /etc/nginx/pleroma.conf` to the end of the http section in /etc/nginx/nginx.conf and @@ -155,7 +155,7 @@ nginx -t # Start nginx # For Debian/Ubuntu: systemctl start nginx -# For Alpine +# For Alpine: rc-service nginx start ``` @@ -188,5 +188,53 @@ Still doesn't work? Feel free to contact us on [#pleroma on freenode](https://we ## Post installation ### Setting up auto-renew Let's Encrypt certificate +```sh +# Create the directory for webroot challenges +mkdir -p /var/lib/letsencrypt + +# Uncomment the webroot method +$EDITOR path-to-nginx-config + +# Verify that the config is valid +nginx -t +``` +Debian/Ubuntu: +```sh +# Restart nginx +systemctl restart nginx + +# Ensure the webroot menthod and post hook is working +certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook 'systemctl nginx reload' + +# Add it to the daily cron +echo '#!/bin/sh +certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook "systemctl reload nginx" +' > /etc/cron.daily/renew-pleroma-cert +chmod +x /etc/cron.daily/renew-pleroma-cert + +# If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert +run-parts --test /etc/cron.daily +``` +Alpine: +```sh +# Restart nginx +rc-service nginx restart + +# Start the cron daemon and make it start on boot +rc-service crond start +rc-update add crond + +# Ensure the webroot menthod and post hook is working +certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook 'rc-service nginx reload' + +# Add it to the daily cron +echo '#!/bin/sh +certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook "rc-service nginx reload" +' > /etc/periodic/daily/renew-pleroma-cert +chmod +x /etc/periodic/daily/renew-pleroma-cert + +# If everything worked this should output /etc/periodic/daily/renew-pleroma-cert +run-parts --test /etc/periodic/daily +``` ### Running Mix tasks ### Updating -- cgit v1.2.3 From 18eabca9789cdb96c77279aa4cff5b34e558c803 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sun, 23 Jun 2019 02:55:43 +0300 Subject: Add a section about updating --- docs/installation/releases_en.md | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 30fbf5177..6c05f4cd9 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -238,3 +238,12 @@ run-parts --test /etc/periodic/daily ``` ### Running Mix tasks ### Updating +Generally, doing the following is enough: +```sh +# Download the new release +su pleroma -s $SHELL -lc "./bin/pleroma_ctl update" + +# Migrate the database, you are advised to stop the instance before doing that +su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate" +``` +But you should **always check the release notes/changelog** in case there are config deprecations, special update steps, etc. -- cgit v1.2.3 From 299cefa2bdbbde171501c5fa516e37b5e9733953 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sun, 23 Jun 2019 03:05:02 +0300 Subject: Add a section on executing mix tasks --- docs/installation/releases_en.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index 6c05f4cd9..b9ac1b955 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -236,7 +236,13 @@ chmod +x /etc/periodic/daily/renew-pleroma-cert # If everything worked this should output /etc/periodic/daily/renew-pleroma-cert run-parts --test /etc/periodic/daily ``` -### Running Mix tasks +### Running mix tasks +Throughout the wiki and guides there is a lot of references to mix tasks. Since `mix` is a build tool, you can't just call `mix pleroma.task`, instead you should call `pleroma_ctl` stripping pleroma/ecto namespace. + +So for example, if the task is `mix pleroma.user set admin --admin`, you should run it like this: +```sh +su pleroma -s $SHELL -lc "./bin/pleroma_ctl user set admin --admin" +``` ### Updating Generally, doing the following is enough: ```sh -- cgit v1.2.3 From 66e92dc0ca9fe50dad5a758cf2b16543bff03c2e Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sun, 23 Jun 2019 07:43:45 +0300 Subject: Add a Further Reading section to the OTP install guide --- docs/installation/releases_en.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md index b9ac1b955..e9d913604 100644 --- a/docs/installation/releases_en.md +++ b/docs/installation/releases_en.md @@ -253,3 +253,10 @@ su pleroma -s $SHELL -lc "./bin/pleroma_ctl update" su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate" ``` But you should **always check the release notes/changelog** in case there are config deprecations, special update steps, etc. + +## Further reading +* [Configuration](config.html) +* [Pleroma's base config.exs](https://git.pleroma.social/pleroma/pleroma/blob/master/config/config.exs) +* [Hardening your instance](hardening.html) +* [Pleroma Clients](clients.html) +* [Emoji pack manager](Mix.Tasks.Pleroma.Emoji.html) -- cgit v1.2.3 From 1d3c5e434df83ce2da1b1c67090192b115b4e905 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sun, 23 Jun 2019 07:44:10 +0300 Subject: releases_en.md -> otp_en.md --- docs/installation/otp_en.md | 262 +++++++++++++++++++++++++++++++++++++++ docs/installation/releases_en.md | 262 --------------------------------------- 2 files changed, 262 insertions(+), 262 deletions(-) create mode 100644 docs/installation/otp_en.md delete mode 100644 docs/installation/releases_en.md (limited to 'docs') diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md new file mode 100644 index 000000000..e9d913604 --- /dev/null +++ b/docs/installation/otp_en.md @@ -0,0 +1,262 @@ +# Installing on Linux using OTP releases + +## Pre-requisites +* A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below +* A (sub)domain pointed to the machine + +You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`. + +While in theory OTP releases are possbile to install on any compatible machine, for the sake of simplicity this guide focuses only on Debian/Ubuntu/Alpine. + +### Detecting flavour + +Paste the following into the shell: +```sh +arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;fi;echo "$arch$libc_postfix" +``` + +If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source. + +### Installing the required packages + +Other than things bundled in the OTP release Pleroma depends on: +* curl (to download the release build) +* unzip (needed to unpack release builds) +* ncurses (ERTS won't run without it) +* PostgreSQL (also utilizes extensions in postgresql-contrib) +* nginx (could be swapped with another reverse proxy but this guide covers only it) +* certbot (for Let's Encrypt certificates, could be swapped with another ACME client, but this guide covers only it) + +Debian/Ubuntu: +```sh +apt install curl unzip libncurses5 postgresql postgresql-contrib nginx certbot +``` +Alpine: + +**Warning:** There has been some changes to musl on Alpine 3.10 which need an Elixir rebuild. Since the build machines are running Alpine 3.9 running the builds on 3.10 will likely fail with "dlsym: Resource temporarily unavailable". If you have not updated yet, replace `latest-stable` with `v3.9` in `/etc/apk/repositories`. If you have, try downgrading `musl` to `1.1.20-r3` +```sh +echo "http://nl.alpinelinux.org/alpine/v3.9/community" >> /etc/apk/repositories +apk update +apk add curl unzip ncurses postgresql postgresql-contrib nginx certbot +``` + +## Setup +### Configuring PostgreSQL +#### (Optional) Installing RUM indexes +RUM indexes are an alternative indexing scheme that is not included in PostgreSQL by default. You can read more about them on the [Configuration page](config.html#rum-indexing-for-full-text-search). They are completely optional and most of the time are not worth it, especially if you are running a single user instance (unless you absolutely need ordered search results). + +Debian/Ubuntu (available only on Buster/19.04): +```sh +apt install postgresql-11-rum +``` +Alpine: +```sh +apk add gcc make git postgresql-dev musl-dev +git clone https://github.com/postgrespro/rum /tmp/rum +cd /tmp/rum +make USE_PGXS=1 +make USE_PGXS=1 install +cd +rm -r /tmp/rum +``` +#### (Optional) Performance configuration +For optimal performance, you may use [PGTune](https://pgtune.leopard.in.ua), don't forget to restart postgresql after editing the configuration + +Debian/Ubuntu: +```sh +systemctl restart postgresql +``` +Alpine: +```sh +rc-service postgresql restart +``` +### Installing Pleroma +```sh +# Create the Pleroma user +adduser --system --shell /bin/false --home /opt/pleroma pleroma + +# Set the flavour environment variable to the string you got in Detecting flavour section. +# For example if the flavour is `arm64-musl` the command will be +export FLAVOUR="arm64-musl" + +# Clone the release build into a temporary directory and unpack it +su pleroma -s $SHELL -lc " +curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/master/download?job=$FLAVOUR' -o /tmp/pleroma.zip +unzip /tmp/pleroma.zip -d /tmp/ +" + +# Move the release to the home directory and delete temporary files +su pleroma -s $SHELL -lc " +mv /tmp/release/* /opt/pleroma +rmdir /tmp/release +rm /tmp/pleroma.zip +" +# Create uploads directory and set proper permissions (skip if planning to use a remote uploader) +# Note: It does not have to be `/var/lib/pleroma/uploads`, the config generator will ask about the upload directory later + +mkdir -p /var/lib/pleroma/uploads +chown -R pleroma /var/lib/pleroma + +# Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.) +# Note: It does not have to be `/var/lib/pleroma/static`, the config generator will ask about the custom public files directory later +mkdir -p /var/lib/pleroma/static +chown -R pleroma /var/lib/pleroma + +# Create a config directory +mkdir -p /etc/pleroma +chown -R pleroma /etc/pleroma + +# Run the config generator +su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql" + +# Create the postgres database +su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql" + +# Create the database schema +su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate" + +# If you have installed RUM indexes uncommend and run +# su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/" + +# Start the instance to verify that everything is working as expected +su pleroma -s $SHELL -lc "./bin/pleroma daemon" + +# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly +sleep 20 && curl http://localhost:4000/api/v1/instance + +# Stop the instance +su pleroma -s $SHELL -lc "./bin/pleroma stop" +``` + +### Setting up nginx and getting Let's Encrypt SSL certificaties + +```sh +# Get a Let's Encrypt certificate +certbot certonly --standalone --preferred-challenges http -d yourinstance.tld + +# Copy the Pleroma nginx configuration to the nginx folder +# The location of nginx configs is dependent on the distro + +# For Debian/Ubuntu: +cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx +ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx +# For Alpine: +cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.conf +# If your distro does not have either of those you can append +# `include /etc/nginx/pleroma.conf` to the end of the http section in /etc/nginx/nginx.conf and +cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/pleroma.conf + +# Edit the nginx config replacing example.tld with your (sub)domain +$EDITOR path-to-nginx-config + +# Verify that the config is valid +nginx -t + +# Start nginx +# For Debian/Ubuntu: +systemctl start nginx +# For Alpine: +rc-service nginx start +``` + +At this point if you open your (sub)domain in a browser you should see a 502 error, that's because pleroma is not started yet. + +### Setting up a system service +Debian/Ubuntu: +```sh +# Copy the service into a proper directory +cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service + +# Start pleroma and enable it on boot +systemctl start pleroma +systemctl enable pleroma +``` +Alpine: +```sh +# Copy the service into a proper directory +cp /opt/pleroma/installation/init.d/pleroma /etc/init.d/pleroma + +# Start pleroma and enable it on boot +rc-service pleroma start +rc-update add pleroma +``` + +If everything worked, you should see Pleroma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Pleroma in the foreground and seeing if there are any errrors. + +Still doesn't work? Feel free to contact us on [#pleroma on freenode](https://webchat.freenode.net/?channels=%23pleroma) or via matrix at , you can also [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma/issues/new) + +## Post installation + +### Setting up auto-renew Let's Encrypt certificate +```sh +# Create the directory for webroot challenges +mkdir -p /var/lib/letsencrypt + +# Uncomment the webroot method +$EDITOR path-to-nginx-config + +# Verify that the config is valid +nginx -t +``` +Debian/Ubuntu: +```sh +# Restart nginx +systemctl restart nginx + +# Ensure the webroot menthod and post hook is working +certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook 'systemctl nginx reload' + +# Add it to the daily cron +echo '#!/bin/sh +certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook "systemctl reload nginx" +' > /etc/cron.daily/renew-pleroma-cert +chmod +x /etc/cron.daily/renew-pleroma-cert + +# If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert +run-parts --test /etc/cron.daily +``` +Alpine: +```sh +# Restart nginx +rc-service nginx restart + +# Start the cron daemon and make it start on boot +rc-service crond start +rc-update add crond + +# Ensure the webroot menthod and post hook is working +certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook 'rc-service nginx reload' + +# Add it to the daily cron +echo '#!/bin/sh +certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook "rc-service nginx reload" +' > /etc/periodic/daily/renew-pleroma-cert +chmod +x /etc/periodic/daily/renew-pleroma-cert + +# If everything worked this should output /etc/periodic/daily/renew-pleroma-cert +run-parts --test /etc/periodic/daily +``` +### Running mix tasks +Throughout the wiki and guides there is a lot of references to mix tasks. Since `mix` is a build tool, you can't just call `mix pleroma.task`, instead you should call `pleroma_ctl` stripping pleroma/ecto namespace. + +So for example, if the task is `mix pleroma.user set admin --admin`, you should run it like this: +```sh +su pleroma -s $SHELL -lc "./bin/pleroma_ctl user set admin --admin" +``` +### Updating +Generally, doing the following is enough: +```sh +# Download the new release +su pleroma -s $SHELL -lc "./bin/pleroma_ctl update" + +# Migrate the database, you are advised to stop the instance before doing that +su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate" +``` +But you should **always check the release notes/changelog** in case there are config deprecations, special update steps, etc. + +## Further reading +* [Configuration](config.html) +* [Pleroma's base config.exs](https://git.pleroma.social/pleroma/pleroma/blob/master/config/config.exs) +* [Hardening your instance](hardening.html) +* [Pleroma Clients](clients.html) +* [Emoji pack manager](Mix.Tasks.Pleroma.Emoji.html) diff --git a/docs/installation/releases_en.md b/docs/installation/releases_en.md deleted file mode 100644 index e9d913604..000000000 --- a/docs/installation/releases_en.md +++ /dev/null @@ -1,262 +0,0 @@ -# Installing on Linux using OTP releases - -## Pre-requisites -* A machine running Linux with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPU, you have root access to. If you are not sure if it's compatible see [Detecting flavour section](#detecting-flavour) below -* A (sub)domain pointed to the machine - -You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`. - -While in theory OTP releases are possbile to install on any compatible machine, for the sake of simplicity this guide focuses only on Debian/Ubuntu/Alpine. - -### Detecting flavour - -Paste the following into the shell: -```sh -arch="$(uname -m)";if [ "$arch" = "x86_64" ];then arch="amd64";elif [ "$arch" = "armv7l" ];then arch="arm";elif [ "$arch" = "aarch64" ];then arch="arm64";else echo "Unsupported arch: $arch">&2;fi;if getconf GNU_LIBC_VERSION>/dev/null;then libc_postfix="";elif [ "$(ldd 2>&1|head -c 9)" = "musl libc" ];then libc_postfix="-musl";elif [ "$(find /lib/libc.musl*|wc -l)" ];then libc_postfix="-musl";else echo "Unsupported libc">&2;fi;echo "$arch$libc_postfix" -``` - -If your platform is supported the output will contain the flavour string, you will need it later. If not, this just means that we don't build releases for your platform, you can still try installing from source. - -### Installing the required packages - -Other than things bundled in the OTP release Pleroma depends on: -* curl (to download the release build) -* unzip (needed to unpack release builds) -* ncurses (ERTS won't run without it) -* PostgreSQL (also utilizes extensions in postgresql-contrib) -* nginx (could be swapped with another reverse proxy but this guide covers only it) -* certbot (for Let's Encrypt certificates, could be swapped with another ACME client, but this guide covers only it) - -Debian/Ubuntu: -```sh -apt install curl unzip libncurses5 postgresql postgresql-contrib nginx certbot -``` -Alpine: - -**Warning:** There has been some changes to musl on Alpine 3.10 which need an Elixir rebuild. Since the build machines are running Alpine 3.9 running the builds on 3.10 will likely fail with "dlsym: Resource temporarily unavailable". If you have not updated yet, replace `latest-stable` with `v3.9` in `/etc/apk/repositories`. If you have, try downgrading `musl` to `1.1.20-r3` -```sh -echo "http://nl.alpinelinux.org/alpine/v3.9/community" >> /etc/apk/repositories -apk update -apk add curl unzip ncurses postgresql postgresql-contrib nginx certbot -``` - -## Setup -### Configuring PostgreSQL -#### (Optional) Installing RUM indexes -RUM indexes are an alternative indexing scheme that is not included in PostgreSQL by default. You can read more about them on the [Configuration page](config.html#rum-indexing-for-full-text-search). They are completely optional and most of the time are not worth it, especially if you are running a single user instance (unless you absolutely need ordered search results). - -Debian/Ubuntu (available only on Buster/19.04): -```sh -apt install postgresql-11-rum -``` -Alpine: -```sh -apk add gcc make git postgresql-dev musl-dev -git clone https://github.com/postgrespro/rum /tmp/rum -cd /tmp/rum -make USE_PGXS=1 -make USE_PGXS=1 install -cd -rm -r /tmp/rum -``` -#### (Optional) Performance configuration -For optimal performance, you may use [PGTune](https://pgtune.leopard.in.ua), don't forget to restart postgresql after editing the configuration - -Debian/Ubuntu: -```sh -systemctl restart postgresql -``` -Alpine: -```sh -rc-service postgresql restart -``` -### Installing Pleroma -```sh -# Create the Pleroma user -adduser --system --shell /bin/false --home /opt/pleroma pleroma - -# Set the flavour environment variable to the string you got in Detecting flavour section. -# For example if the flavour is `arm64-musl` the command will be -export FLAVOUR="arm64-musl" - -# Clone the release build into a temporary directory and unpack it -su pleroma -s $SHELL -lc " -curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/master/download?job=$FLAVOUR' -o /tmp/pleroma.zip -unzip /tmp/pleroma.zip -d /tmp/ -" - -# Move the release to the home directory and delete temporary files -su pleroma -s $SHELL -lc " -mv /tmp/release/* /opt/pleroma -rmdir /tmp/release -rm /tmp/pleroma.zip -" -# Create uploads directory and set proper permissions (skip if planning to use a remote uploader) -# Note: It does not have to be `/var/lib/pleroma/uploads`, the config generator will ask about the upload directory later - -mkdir -p /var/lib/pleroma/uploads -chown -R pleroma /var/lib/pleroma - -# Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.) -# Note: It does not have to be `/var/lib/pleroma/static`, the config generator will ask about the custom public files directory later -mkdir -p /var/lib/pleroma/static -chown -R pleroma /var/lib/pleroma - -# Create a config directory -mkdir -p /etc/pleroma -chown -R pleroma /etc/pleroma - -# Run the config generator -su pleroma -s $SHELL -lc "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql" - -# Create the postgres database -su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql" - -# Create the database schema -su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate" - -# If you have installed RUM indexes uncommend and run -# su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/" - -# Start the instance to verify that everything is working as expected -su pleroma -s $SHELL -lc "./bin/pleroma daemon" - -# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly -sleep 20 && curl http://localhost:4000/api/v1/instance - -# Stop the instance -su pleroma -s $SHELL -lc "./bin/pleroma stop" -``` - -### Setting up nginx and getting Let's Encrypt SSL certificaties - -```sh -# Get a Let's Encrypt certificate -certbot certonly --standalone --preferred-challenges http -d yourinstance.tld - -# Copy the Pleroma nginx configuration to the nginx folder -# The location of nginx configs is dependent on the distro - -# For Debian/Ubuntu: -cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.nginx -ln -s /etc/nginx/sites-available/pleroma.nginx /etc/nginx/sites-enabled/pleroma.nginx -# For Alpine: -cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.conf -# If your distro does not have either of those you can append -# `include /etc/nginx/pleroma.conf` to the end of the http section in /etc/nginx/nginx.conf and -cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/pleroma.conf - -# Edit the nginx config replacing example.tld with your (sub)domain -$EDITOR path-to-nginx-config - -# Verify that the config is valid -nginx -t - -# Start nginx -# For Debian/Ubuntu: -systemctl start nginx -# For Alpine: -rc-service nginx start -``` - -At this point if you open your (sub)domain in a browser you should see a 502 error, that's because pleroma is not started yet. - -### Setting up a system service -Debian/Ubuntu: -```sh -# Copy the service into a proper directory -cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service - -# Start pleroma and enable it on boot -systemctl start pleroma -systemctl enable pleroma -``` -Alpine: -```sh -# Copy the service into a proper directory -cp /opt/pleroma/installation/init.d/pleroma /etc/init.d/pleroma - -# Start pleroma and enable it on boot -rc-service pleroma start -rc-update add pleroma -``` - -If everything worked, you should see Pleroma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Pleroma in the foreground and seeing if there are any errrors. - -Still doesn't work? Feel free to contact us on [#pleroma on freenode](https://webchat.freenode.net/?channels=%23pleroma) or via matrix at , you can also [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma/issues/new) - -## Post installation - -### Setting up auto-renew Let's Encrypt certificate -```sh -# Create the directory for webroot challenges -mkdir -p /var/lib/letsencrypt - -# Uncomment the webroot method -$EDITOR path-to-nginx-config - -# Verify that the config is valid -nginx -t -``` -Debian/Ubuntu: -```sh -# Restart nginx -systemctl restart nginx - -# Ensure the webroot menthod and post hook is working -certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook 'systemctl nginx reload' - -# Add it to the daily cron -echo '#!/bin/sh -certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook "systemctl reload nginx" -' > /etc/cron.daily/renew-pleroma-cert -chmod +x /etc/cron.daily/renew-pleroma-cert - -# If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert -run-parts --test /etc/cron.daily -``` -Alpine: -```sh -# Restart nginx -rc-service nginx restart - -# Start the cron daemon and make it start on boot -rc-service crond start -rc-update add crond - -# Ensure the webroot menthod and post hook is working -certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook 'rc-service nginx reload' - -# Add it to the daily cron -echo '#!/bin/sh -certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook "rc-service nginx reload" -' > /etc/periodic/daily/renew-pleroma-cert -chmod +x /etc/periodic/daily/renew-pleroma-cert - -# If everything worked this should output /etc/periodic/daily/renew-pleroma-cert -run-parts --test /etc/periodic/daily -``` -### Running mix tasks -Throughout the wiki and guides there is a lot of references to mix tasks. Since `mix` is a build tool, you can't just call `mix pleroma.task`, instead you should call `pleroma_ctl` stripping pleroma/ecto namespace. - -So for example, if the task is `mix pleroma.user set admin --admin`, you should run it like this: -```sh -su pleroma -s $SHELL -lc "./bin/pleroma_ctl user set admin --admin" -``` -### Updating -Generally, doing the following is enough: -```sh -# Download the new release -su pleroma -s $SHELL -lc "./bin/pleroma_ctl update" - -# Migrate the database, you are advised to stop the instance before doing that -su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate" -``` -But you should **always check the release notes/changelog** in case there are config deprecations, special update steps, etc. - -## Further reading -* [Configuration](config.html) -* [Pleroma's base config.exs](https://git.pleroma.social/pleroma/pleroma/blob/master/config/config.exs) -* [Hardening your instance](hardening.html) -* [Pleroma Clients](clients.html) -* [Emoji pack manager](Mix.Tasks.Pleroma.Emoji.html) -- cgit v1.2.3 From 982cad0268898851ff87187eaf0d0b7011b1c96a Mon Sep 17 00:00:00 2001 From: Alex S Date: Sun, 23 Jun 2019 08:16:16 +0300 Subject: support for config groups --- docs/api/admin_api.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md index 63af33821..c05a353d7 100644 --- a/docs/api/admin_api.md +++ b/docs/api/admin_api.md @@ -568,8 +568,9 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret { configs: [ { + "group": string, "key": string, - "value": string or {} or [] + "value": string or {} or [] or {"tuple": []} } ] } @@ -597,8 +598,9 @@ Compile time settings (need instance reboot): - Method `POST` - Params: - `configs` => [ + - `group` (string) - `key` (string) - - `value` (string, [], {}) + - `value` (string, [], {} or {"tuple": []}) - `delete` = true (optional, if parameter must be deleted) ] @@ -608,6 +610,7 @@ Compile time settings (need instance reboot): { configs: [ { + "group": "pleroma", "key": "Pleroma.Upload", "value": { "uploader": "Pleroma.Uploaders.Local", @@ -636,6 +639,7 @@ Compile time settings (need instance reboot): { configs: [ { + "group": string, "key": string, "value": string or {} or [] or {"tuple": []} } -- cgit v1.2.3 From 40a62839ffeb5358e600d3bbc5fab4843afdc1af Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sun, 23 Jun 2019 08:35:35 +0300 Subject: Use build-base instead of individual packages --- docs/installation/otp_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md index e9d913604..667d3cef7 100644 --- a/docs/installation/otp_en.md +++ b/docs/installation/otp_en.md @@ -51,7 +51,7 @@ apt install postgresql-11-rum ``` Alpine: ```sh -apk add gcc make git postgresql-dev musl-dev +apk add git build-base postgresql-dev git clone https://github.com/postgrespro/rum /tmp/rum cd /tmp/rum make USE_PGXS=1 -- cgit v1.2.3 From 4bac13966bb73d9c0eb517feb42ccaf809e5404c Mon Sep 17 00:00:00 2001 From: aries Date: Mon, 24 Jun 2019 01:10:55 +0900 Subject: modify config.md for S3 --- docs/config.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index b75193545..506be32a1 100644 --- a/docs/config.md +++ b/docs/config.md @@ -16,6 +16,13 @@ Note: `strip_exif` has been replaced by `Pleroma.Upload.Filter.Mogrify`. ## Pleroma.Uploaders.Local * `uploads`: Which directory to store the user-uploads in, relative to pleroma’s working directory +## Pleroma.Uploaders.S3 +* `bucket`: S3 bucket name +* `public_endpoint`: S3 endpoint that the user finally accesses(ex. "https://s3.dualstack.\.amazonaws.com") +* `truncated_namespace`: If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or "" etc. +For example, when using CDN to S3 virtual host format, set "". +At this time, write CNAME to CDN in public_endpoint. + ## Pleroma.Upload.Filter.Mogrify * `args`: List of actions for the `mogrify` command like `"strip"` or `["strip", "auto-orient", {"impode", "1"}]`. -- cgit v1.2.3 From 7daaaf84f1ec2f50319bddf9e3fad631b31b6df6 Mon Sep 17 00:00:00 2001 From: aries Date: Mon, 24 Jun 2019 01:28:01 +0900 Subject: Fix markdown mistakes --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 506be32a1..04841a3ad 100644 --- a/docs/config.md +++ b/docs/config.md @@ -18,7 +18,7 @@ Note: `strip_exif` has been replaced by `Pleroma.Upload.Filter.Mogrify`. ## Pleroma.Uploaders.S3 * `bucket`: S3 bucket name -* `public_endpoint`: S3 endpoint that the user finally accesses(ex. "https://s3.dualstack.\.amazonaws.com") +* `public_endpoint`: S3 endpoint that the user finally accesses(ex. "https://s3.dualstack.ap-northeast-1.amazonaws.com) * `truncated_namespace`: If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or "" etc. For example, when using CDN to S3 virtual host format, set "". At this time, write CNAME to CDN in public_endpoint. -- cgit v1.2.3 From 7fc226e0fe6d446b0e6614f9a531f6747b1bb34c Mon Sep 17 00:00:00 2001 From: rinpatch Date: Mon, 24 Jun 2019 02:50:28 +0300 Subject: Remove the warning about alpine as the issue is now solved --- docs/installation/otp_en.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md index 667d3cef7..fa71f23e1 100644 --- a/docs/installation/otp_en.md +++ b/docs/installation/otp_en.md @@ -33,9 +33,8 @@ apt install curl unzip libncurses5 postgresql postgresql-contrib nginx certbot ``` Alpine: -**Warning:** There has been some changes to musl on Alpine 3.10 which need an Elixir rebuild. Since the build machines are running Alpine 3.9 running the builds on 3.10 will likely fail with "dlsym: Resource temporarily unavailable". If you have not updated yet, replace `latest-stable` with `v3.9` in `/etc/apk/repositories`. If you have, try downgrading `musl` to `1.1.20-r3` ```sh -echo "http://nl.alpinelinux.org/alpine/v3.9/community" >> /etc/apk/repositories +echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories apk update apk add curl unzip ncurses postgresql postgresql-contrib nginx certbot ``` -- cgit v1.2.3 From 550302c041139de43052022c0f73cba2b30a3080 Mon Sep 17 00:00:00 2001 From: aries Date: Mon, 24 Jun 2019 01:09:28 +0000 Subject: Apply suggestion to docs/config.md --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 04841a3ad..b08c37e84 100644 --- a/docs/config.md +++ b/docs/config.md @@ -18,7 +18,7 @@ Note: `strip_exif` has been replaced by `Pleroma.Upload.Filter.Mogrify`. ## Pleroma.Uploaders.S3 * `bucket`: S3 bucket name -* `public_endpoint`: S3 endpoint that the user finally accesses(ex. "https://s3.dualstack.ap-northeast-1.amazonaws.com) +* `public_endpoint`: S3 endpoint that the user finally accesses(ex. "https://s3.dualstack.ap-northeast-1.amazonaws.com") * `truncated_namespace`: If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or "" etc. For example, when using CDN to S3 virtual host format, set "". At this time, write CNAME to CDN in public_endpoint. -- cgit v1.2.3 From 687f0aee51ad5ed4483317febe47be3f0685992c Mon Sep 17 00:00:00 2001 From: rinpatch Date: Mon, 24 Jun 2019 11:51:02 +0300 Subject: Basic skeleton of "Switching a from-source install to OTP releases" --- docs/installation/migrating_from_source_otp_en.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/installation/migrating_from_source_otp_en.md (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md new file mode 100644 index 000000000..2f7a450d6 --- /dev/null +++ b/docs/installation/migrating_from_source_otp_en.md @@ -0,0 +1,18 @@ +# Switching a from-source install to OTP releases +## Why would one want to switch? +Benefits of OTP releases over from-source installs include: +* Less space used. OTP releases come without source code, build tools, have docs and debug symbols stripped from the compiled bytecode and do not cointain tests (100mb because of all the fixtures) and docs. +* Minimal system dependencies. Excluding the database and reverse proxy, all you need to download and run a release is `curl`, `unzip` and `ncurses`. Because Erlang runtime and Elixir are shipped with Pleroma, one can use the latest BEAM optimizations and Pleroma features, without having to worry about outdated system repos or a missing `erlang-*` package. +* Potentially less bugs and better performance. This extends on the previous point, because we have control over exactly what gets shipped, we can tweak the VM arguments and forget about weird bugs due to Erlang/Elixir version mismatches. +* Faster and less bug-prone mix tasks. On a from-source install one has to wait untill a new Pleroma node is started for each mix task and they execute outside of the instance context (for example if you deleted a user via a mix task, the instance will have no knowledge of that and continue to display status count and follows before the cache expires). Mix tasks in OTP releases are executed by calling into a running instance via RPC, which solves both of these problems. + +### Sounds great, how do I switch? +Currently we support Linux machines with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPUs. If you are unsure you can check the [Detecting flavour](otp_en.html#detecting-flavour) section in OTP install guide. If your platform is supported, proceed with the guide, if not check the [My platform is not supported](#my-platform-is-not-supported) section. +### I don't think it is worth the effort, can I stay on a from-source install? +Yes, currently there are no plans to deprecate them. +### My platform is not supported +If you believe your platform is a popular choice for running Pleroma instances, or has the potential to become one you can [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma/issues/new). If not, guides on how to build and update releases by yourself will be available soon. +## Moving uploads/instance static directory +## Moving emoji +## Moving the config +## Installing the release -- cgit v1.2.3 From 57d18b06ab2b763922a7894aece982adf97c139e Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 25 Jun 2019 04:55:41 +0300 Subject: Remove the useless specification of test size and make the main points bold --- docs/installation/migrating_from_source_otp_en.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index 2f7a450d6..ab140767e 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -1,10 +1,10 @@ # Switching a from-source install to OTP releases ## Why would one want to switch? Benefits of OTP releases over from-source installs include: -* Less space used. OTP releases come without source code, build tools, have docs and debug symbols stripped from the compiled bytecode and do not cointain tests (100mb because of all the fixtures) and docs. -* Minimal system dependencies. Excluding the database and reverse proxy, all you need to download and run a release is `curl`, `unzip` and `ncurses`. Because Erlang runtime and Elixir are shipped with Pleroma, one can use the latest BEAM optimizations and Pleroma features, without having to worry about outdated system repos or a missing `erlang-*` package. -* Potentially less bugs and better performance. This extends on the previous point, because we have control over exactly what gets shipped, we can tweak the VM arguments and forget about weird bugs due to Erlang/Elixir version mismatches. -* Faster and less bug-prone mix tasks. On a from-source install one has to wait untill a new Pleroma node is started for each mix task and they execute outside of the instance context (for example if you deleted a user via a mix task, the instance will have no knowledge of that and continue to display status count and follows before the cache expires). Mix tasks in OTP releases are executed by calling into a running instance via RPC, which solves both of these problems. +* **Less space used.** OTP releases come without source code, build tools, have docs and debug symbols stripped from the compiled bytecode and do not cointain tests and docs. +* **Minimal system dependencies.** Excluding the database and reverse proxy, all you need to download and run a release is `curl`, `unzip` and `ncurses`. Because Erlang runtime and Elixir are shipped with Pleroma, one can use the latest BEAM optimizations and Pleroma features, without having to worry about outdated system repos or a missing `erlang-*` package. +* **Potentially less bugs and better performance.** This extends on the previous point, because we have control over exactly what gets shipped, we can tweak the VM arguments and forget about weird bugs due to Erlang/Elixir version mismatches. +* **Faster and less bug-prone mix tasks.** On a from-source install one has to wait untill a new Pleroma node is started for each mix task and they execute outside of the instance context (for example if you deleted a user via a mix task, the instance will have no knowledge of that and continue to display status count and follows before the cache expires). Mix tasks in OTP releases are executed by calling into a running instance via RPC, which solves both of these problems. ### Sounds great, how do I switch? Currently we support Linux machines with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPUs. If you are unsure you can check the [Detecting flavour](otp_en.html#detecting-flavour) section in OTP install guide. If your platform is supported, proceed with the guide, if not check the [My platform is not supported](#my-platform-is-not-supported) section. -- cgit v1.2.3 From 44aa895b78f7b37372df4b2ec2e4ba1177516a28 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 25 Jun 2019 05:50:25 +0300 Subject: Add a note that OTP releases don't contain revision history --- docs/installation/migrating_from_source_otp_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index ab140767e..33e1eaaf0 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -1,7 +1,7 @@ # Switching a from-source install to OTP releases ## Why would one want to switch? Benefits of OTP releases over from-source installs include: -* **Less space used.** OTP releases come without source code, build tools, have docs and debug symbols stripped from the compiled bytecode and do not cointain tests and docs. +* **Less space used.** OTP releases come without source code, build tools, have docs and debug symbols stripped from the compiled bytecode and do not cointain tests, docs, revision history. * **Minimal system dependencies.** Excluding the database and reverse proxy, all you need to download and run a release is `curl`, `unzip` and `ncurses`. Because Erlang runtime and Elixir are shipped with Pleroma, one can use the latest BEAM optimizations and Pleroma features, without having to worry about outdated system repos or a missing `erlang-*` package. * **Potentially less bugs and better performance.** This extends on the previous point, because we have control over exactly what gets shipped, we can tweak the VM arguments and forget about weird bugs due to Erlang/Elixir version mismatches. * **Faster and less bug-prone mix tasks.** On a from-source install one has to wait untill a new Pleroma node is started for each mix task and they execute outside of the instance context (for example if you deleted a user via a mix task, the instance will have no knowledge of that and continue to display status count and follows before the cache expires). Mix tasks in OTP releases are executed by calling into a running instance via RPC, which solves both of these problems. -- cgit v1.2.3 From 4ad15ad2a90ca1ac370c8a79f796adc603a90479 Mon Sep 17 00:00:00 2001 From: Maksim Pechnikov Date: Tue, 25 Jun 2019 22:25:37 +0300 Subject: add ignore hosts and TLDs for rich_media --- docs/config.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index b08c37e84..8c98f5c05 100644 --- a/docs/config.md +++ b/docs/config.md @@ -417,6 +417,8 @@ This config contains two queues: `federator_incoming` and `federator_outgoing`. ## :rich_media * `enabled`: if enabled the instance will parse metadata from attached links to generate link previews +* `ignore_hosts`: list host which will ignore for parse metadata. default is []. +* `ignore_tld`: list TLDs (top-level domains) which will ignore for parse metadata. default is ["local", "localdomain", "lan"] ## :fetch_initial_posts * `enabled`: if enabled, when a new user is federated with, fetch some of their latest posts -- cgit v1.2.3 From ec01b7c934560e5d60d29c8278e99b004b88ac61 Mon Sep 17 00:00:00 2001 From: Maksim Date: Wed, 26 Jun 2019 03:23:26 +0000 Subject: Apply suggestion to docs/config.md --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 8c98f5c05..3490d943c 100644 --- a/docs/config.md +++ b/docs/config.md @@ -417,7 +417,7 @@ This config contains two queues: `federator_incoming` and `federator_outgoing`. ## :rich_media * `enabled`: if enabled the instance will parse metadata from attached links to generate link previews -* `ignore_hosts`: list host which will ignore for parse metadata. default is []. +* `ignore_hosts`: list of hosts which will be ignored by the metadata parser. For example `["accounts.google.com", "xss.website"]`, defaults to `[]`. * `ignore_tld`: list TLDs (top-level domains) which will ignore for parse metadata. default is ["local", "localdomain", "lan"] ## :fetch_initial_posts -- cgit v1.2.3 From 41e4752950079b80e3d5a06d9806686bd3216dff Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 26 Jun 2019 06:48:59 +0300 Subject: Make default pack extensions configurable and default to png and gif --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index b08c37e84..836c9f934 100644 --- a/docs/config.md +++ b/docs/config.md @@ -604,6 +604,7 @@ Configure OAuth 2 provider capabilities: ## :emoji * `shortcode_globs`: Location of custom emoji files. `*` can be used as a wildcard. Example `["/emoji/custom/**/*.png"]` +* `pack_extensions`: A list of file extensions for emojis, when no emoji.txt for a pack is present. Example `[".png", ".gif"]` * `groups`: Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the groupname and the value the location or array of locations. `*` can be used as a wildcard. Example `[Custom: ["/emoji/*.png", "/emoji/custom/*.png"]]` * `default_manifest`: Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download. Currently only one manifest can be added (no arrays). -- cgit v1.2.3 From e404335af8fc214b84f9fe633830ba549bd322f7 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 26 Jun 2019 11:34:58 +0300 Subject: Add all the remaining sections to Switching to OTP releases --- docs/installation/migrating_from_source_otp_en.md | 137 ++++++++++++++++++++-- 1 file changed, 130 insertions(+), 7 deletions(-) (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index 33e1eaaf0..0f790b4df 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -2,17 +2,140 @@ ## Why would one want to switch? Benefits of OTP releases over from-source installs include: * **Less space used.** OTP releases come without source code, build tools, have docs and debug symbols stripped from the compiled bytecode and do not cointain tests, docs, revision history. -* **Minimal system dependencies.** Excluding the database and reverse proxy, all you need to download and run a release is `curl`, `unzip` and `ncurses`. Because Erlang runtime and Elixir are shipped with Pleroma, one can use the latest BEAM optimizations and Pleroma features, without having to worry about outdated system repos or a missing `erlang-*` package. +* **Minimal system dependencies.** Excluding the database and reverse proxy, only `curl`, `unzip` and `ncurses` are needed to download and run the release. Because Erlang runtime and Elixir are shipped with Pleroma, one can use the latest BEAM optimizations and Pleroma features, without having to worry about outdated system repos or a missing `erlang-*` package. * **Potentially less bugs and better performance.** This extends on the previous point, because we have control over exactly what gets shipped, we can tweak the VM arguments and forget about weird bugs due to Erlang/Elixir version mismatches. -* **Faster and less bug-prone mix tasks.** On a from-source install one has to wait untill a new Pleroma node is started for each mix task and they execute outside of the instance context (for example if you deleted a user via a mix task, the instance will have no knowledge of that and continue to display status count and follows before the cache expires). Mix tasks in OTP releases are executed by calling into a running instance via RPC, which solves both of these problems. +* **Faster and less bug-prone mix tasks.** On a from-source install one has to wait untill a new Pleroma node is started for each mix task and they execute outside of the instance context (for example if a user was deleted via a mix task, the instance will have no knowledge of that and continue to display status count and follows before the cache expires). Mix tasks in OTP releases are executed by calling into a running instance via RPC, which solves both of these problems. ### Sounds great, how do I switch? -Currently we support Linux machines with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPUs. If you are unsure you can check the [Detecting flavour](otp_en.html#detecting-flavour) section in OTP install guide. If your platform is supported, proceed with the guide, if not check the [My platform is not supported](#my-platform-is-not-supported) section. +Currently we support Linux machines with GNU (e.g. Debian, Ubuntu) or musl (e.g. Alpine) libc and `x86_64`, `aarch64` or `armv7l` CPUs. If you are unsure, check the [Detecting flavour](otp_en.html#detecting-flavour) section in OTP install guide. If your platform is supported, proceed with the guide, if not check the [My platform is not supported](#my-platform-is-not-supported) section. ### I don't think it is worth the effort, can I stay on a from-source install? Yes, currently there are no plans to deprecate them. + ### My platform is not supported -If you believe your platform is a popular choice for running Pleroma instances, or has the potential to become one you can [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma/issues/new). If not, guides on how to build and update releases by yourself will be available soon. -## Moving uploads/instance static directory -## Moving emoji -## Moving the config +If you think your platform is a popular choice for running Pleroma instances, or has the potential to become one, you can [file an issue on our Gitlab](https://git.pleroma.social/pleroma/pleroma/issues/new). If not, guides on how to build and update releases by yourself will be available soon. +## Pre-requisites +You will be running commands as root. If you aren't root already, please elevate your priviledges by executing `sudo su`/`su`. + +The system needs to have `curl` and `unzip` installed for downloading and unpacking release builds. + +Debian/Ubuntu: +```sh +apt install curl unzip +``` +Alpine: +``` +apk add curl unzip + +``` +## Moving content out of the application directory +When using OTP releases the application directory changes with every version so it would be a bother to keep content there (and also dangerous unless `--no-rm` option is used when updating). Fortunately almost all paths in Pleroma are configurable, so it is possible to move them out of there. + +Pleroma should be stopped before proceeding. + +### Moving uploads/custom public files directory +```sh +# Create uploads directory and set proper permissions (skip if using a remote uploader) +# Note: It does not have to be `/var/lib/pleroma/uploads`, you can configure it to be something else later +mkdir -p /var/lib/pleroma/uploads +chown -R pleroma /var/lib/pleroma + +# Create custom public files directory +# Note: It does not have to be `/var/lib/pleroma/static`, you can configure it to be something else later +mkdir -p /var/lib/pleroma/static +chown -R pleroma /var/lib/pleroma + +# If you use the local uploader with default settings your uploads should be located in `~pleroma/uploads` +mv ~pleroma/uploads /var/lib/pleroma/uploads + +# If you have created the custom public files directory with default settings it should be located in `~pleroma/instance/static` +mv ~pleroma/instance/static /var/lib/pleroma/static +``` + +### Moving emoji +Assuming you have all emojis in subdirectories of `priv/static/emoji` moving them can be done with +```sh +mkdir /var/lib/pleroma/static/emoji +ls -d ~pleroma/priv/static/emoji/*/ | xargs -i sh -c 'mv "{}" "/var/lib/pleroma/static/emoji/$(basename {})"' +``` + +But, if for some reason you have custom emojis in the root directory you should copy the whole directory instead. +```sh +mv ~pleroma/priv/static/emoji /var/lib/pleroma/static/emoji +``` +and then copy custom emojis to `/var/lib/pleroma/static/emoji/custom`. + +This is needed because storing custom emojis in the root directory is deprecated, but if you just move them to `/var/lib/pleroma/static/emoji/custom` it will break emoji urls on old posts. + +Note that globs have been replaced with `pack_extensions`, so if your emojis are not in png/gif you should [modify the default value](config.html#emoji). + +### Moving the config +```sh +# Create the config directory +# The default path for Pleroma config is /etc/pleroma/config.exs +# but it can be set via PLEROMA_CONFIG_PATH environment variable +mkdir -p /etc/pleroma + +# Move the config file +mv ~pleroma/config/prod.secret.exs /etc/pleroma/config.exs + +# Change `use Mix.Config` at the top to `import Config` +$EDITOR /etc/pleroma/config.exs +``` ## Installing the release +```sh +# Delete all files in pleroma user's directory +rm -r ~pleroma/* + +# Clone the release build into a temporary directory and unpack it +su pleroma -s $SHELL -lc " +curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/master/download?job=$FLAVOUR' -o /tmp/pleroma.zip +unzip /tmp/pleroma.zip -d /tmp/ +" + +# Move the release to the home directory and delete temporary files +su pleroma -s $SHELL -lc " +mv /tmp/release/* /opt/pleroma +rmdir /tmp/release +rm /tmp/pleroma.zip +" + +# Start the instance to verify that everything is working as expected +su pleroma -s $SHELL -lc "./bin/pleroma daemon" + +# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly +sleep 20 && curl http://localhost:4000/api/v1/instance + +# Stop the instance +su pleroma -s $SHELL -lc "./bin/pleroma stop" +``` + +## Setting up a system service +OTP releases have different service files than from-source installs so they need to be copied over again. + +Debian/Ubuntu: +```sh +# Copy the service into a proper directory +cp ~pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service + +# Reload service files +systemctl reload-daemon + +# Reenable pleroma to start on boot +systemctl reenable pleroma + +# Start pleroma +systemctl start pleroma +``` + +Alpine: +```sh +# Copy the service into a proper directory +cp -f ~pleroma/installation/init.d/pleroma /etc/init.d/pleroma + +# Start pleroma +rc-service pleroma start +``` +## Running mix tasks +Refer to [Running mix tasks](otp_en.html#running-mix-tasks) section from OTP release installation guide. +## Updating +Refer to [Updating](otp_en.html#updating) section from OTP release installation guide. -- cgit v1.2.3 From 877f91c0c489a7c33a6078dab4d00ceffc4af659 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 26 Jun 2019 15:20:22 +0300 Subject: Do not assume ~pleroma == /opt/pleroma --- docs/installation/migrating_from_source_otp_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index 0f790b4df..add71d6af 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -94,7 +94,7 @@ unzip /tmp/pleroma.zip -d /tmp/ # Move the release to the home directory and delete temporary files su pleroma -s $SHELL -lc " -mv /tmp/release/* /opt/pleroma +mv /tmp/release/* ~pleroma/ rmdir /tmp/release rm /tmp/pleroma.zip " -- cgit v1.2.3 From f5f1bb35c3736dd591f6689813c7fe95650e4bba Mon Sep 17 00:00:00 2001 From: rinpatch Date: Wed, 26 Jun 2019 15:24:06 +0300 Subject: Instructions on getting the flavour --- docs/installation/migrating_from_source_otp_en.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index add71d6af..46dc7b53b 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -82,10 +82,15 @@ mv ~pleroma/config/prod.secret.exs /etc/pleroma/config.exs $EDITOR /etc/pleroma/config.exs ``` ## Installing the release +Before proceeding, get the flavour from [Detecting flavour](otp_en.html#detecting-flavour) section in OTP installation guide. ```sh # Delete all files in pleroma user's directory rm -r ~pleroma/* +# Set the flavour environment variable to the string you got in Detecting flavour section. +# For example if the flavour is `arm64-musl` the command will be +export FLAVOUR="arm64-musl" + # Clone the release build into a temporary directory and unpack it su pleroma -s $SHELL -lc " curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/master/download?job=$FLAVOUR' -o /tmp/pleroma.zip -- cgit v1.2.3 From c6705144a2758c76943ad7967da412572efcbc2d Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Thu, 27 Jun 2019 04:19:44 +0000 Subject: don't delete config settings on admin update --- docs/api/admin_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md index c05a353d7..4be0ab0f8 100644 --- a/docs/api/admin_api.md +++ b/docs/api/admin_api.md @@ -579,7 +579,7 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret ## `/api/pleroma/admin/config` ### Update config settings Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`. -Atom or boolean value can be passed with `:` in the beginning, e.g. `":true"`, `":upload"`. +Atom or boolean value can be passed with `:` in the beginning, e.g. `":true"`, `":upload"`. For keys it is not needed. Integer with `i:`, e.g. `"i:150"`. Tuple with more than 2 values with `{"tuple": ["first_val", Pleroma.Module, []]}`. `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`. -- cgit v1.2.3 From 4f44732100a23475a645d9e7070ca0a17934ee49 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Thu, 27 Jun 2019 09:45:13 +0300 Subject: Add a note on what OTP releases are --- docs/installation/migrating_from_source_otp_en.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index 46dc7b53b..4d6f20ee0 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -1,4 +1,6 @@ # Switching a from-source install to OTP releases +## What are OTP releases? +OTP releases are as close as you can get to binary releases with Erlang/Elixir. The release is self-contained, and provides everything needed to boot it, it is easily administered via the provided shell script to open up a remote console, start/stop/restart the release, start in the background, send remote commands, and more. ## Why would one want to switch? Benefits of OTP releases over from-source installs include: * **Less space used.** OTP releases come without source code, build tools, have docs and debug symbols stripped from the compiled bytecode and do not cointain tests, docs, revision history. -- cgit v1.2.3 From eeb419e3a0e8ad97b0061f5da9938bbf4f52c5c9 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Fri, 28 Jun 2019 09:41:34 +0300 Subject: Add a note about the develop branch --- docs/installation/migrating_from_source_otp_en.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index 4d6f20ee0..0b41d0c0e 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -1,6 +1,8 @@ # Switching a from-source install to OTP releases ## What are OTP releases? OTP releases are as close as you can get to binary releases with Erlang/Elixir. The release is self-contained, and provides everything needed to boot it, it is easily administered via the provided shell script to open up a remote console, start/stop/restart the release, start in the background, send remote commands, and more. +### Can I still run the develop branch if I decide to use them? +Yes, we produce builds for every commit in `develop`. However `develop` is considered unstable, please don't use it in production because of faster access to new features, unless you need them as an app developer. ## Why would one want to switch? Benefits of OTP releases over from-source installs include: * **Less space used.** OTP releases come without source code, build tools, have docs and debug symbols stripped from the compiled bytecode and do not cointain tests, docs, revision history. @@ -94,6 +96,7 @@ rm -r ~pleroma/* export FLAVOUR="arm64-musl" # Clone the release build into a temporary directory and unpack it +# Replace `master` with `develop` if you want to run the develop branch su pleroma -s $SHELL -lc " curl 'https://git.pleroma.social/api/v4/projects/2/jobs/artifacts/master/download?job=$FLAVOUR' -o /tmp/pleroma.zip unzip /tmp/pleroma.zip -d /tmp/ -- cgit v1.2.3 From e556c9666115c026541227f5dafc8b995330c66e Mon Sep 17 00:00:00 2001 From: Julien Wehmschulte Date: Fri, 28 Jun 2019 18:25:21 +0000 Subject: Update docs/installation/arch_linux_en.md, docs/installation/centos7_en.md, docs/installation/debian_based_en.md, docs/installation/debian_based_jp.md, docs/installation/gentoo_en.md files --- docs/installation/alpine_linux_en.md | 12 ++++++------ docs/installation/arch_linux_en.md | 12 ++++++------ docs/installation/centos7_en.md | 12 ++++++------ docs/installation/debian_based_en.md | 12 ++++++------ docs/installation/debian_based_jp.md | 8 ++++++-- docs/installation/gentoo_en.md | 12 ++++++------ 6 files changed, 36 insertions(+), 32 deletions(-) (limited to 'docs') diff --git a/docs/installation/alpine_linux_en.md b/docs/installation/alpine_linux_en.md index e1d69c873..a9b5afd33 100644 --- a/docs/installation/alpine_linux_en.md +++ b/docs/installation/alpine_linux_en.md @@ -203,12 +203,12 @@ sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new Date: Thu, 27 Jun 2019 21:34:27 +0000 Subject: docs: add documentation for MediaProxyWarmingPolicy --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 7a53364ef..7d5be3980 100644 --- a/docs/config.md +++ b/docs/config.md @@ -98,6 +98,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`: Drops posts with non-public visibility settings (See ``:mrf_rejectnonpublic`` section) * `Pleroma.Web.ActivityPub.MRF.EnsureRePrepended`: Rewrites posts to ensure that replies to posts with subjects do not have an identical subject and instead begin with re:. * `Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy`: Rejects posts from likely spambots by rejecting posts from new users that contain links. + * `Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy`: Crawls attachments using their MediaProxy URLs so that the MediaProxy cache is primed. * `public`: Makes the client API in authentificated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. * `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send. * `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` -- cgit v1.2.3 From b2548e65dbfeb4ec20ff8fdc4230f7aedbb452f0 Mon Sep 17 00:00:00 2001 From: Yuji Nakao Date: Sat, 29 Jun 2019 04:17:49 +0000 Subject: Update migrating_from_source_otp_en.md: Replace `reload-daemon` with `daemon-reload`. --- docs/installation/migrating_from_source_otp_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index 0b41d0c0e..df3e2f4a0 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -128,7 +128,7 @@ Debian/Ubuntu: cp ~pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service # Reload service files -systemctl reload-daemon +systemctl daemon-reload # Reenable pleroma to start on boot systemctl reenable pleroma -- cgit v1.2.3 From ab6de9b478bf9c2b46603c2761fd99b6506f8b08 Mon Sep 17 00:00:00 2001 From: Yuji Nakao Date: Sat, 29 Jun 2019 04:24:44 +0000 Subject: Move all upload contents despite upload folder itself. --- docs/installation/migrating_from_source_otp_en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index 0b41d0c0e..5264790f3 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -49,7 +49,7 @@ mkdir -p /var/lib/pleroma/static chown -R pleroma /var/lib/pleroma # If you use the local uploader with default settings your uploads should be located in `~pleroma/uploads` -mv ~pleroma/uploads /var/lib/pleroma/uploads +mv ~pleroma/uploads/* /var/lib/pleroma/uploads # If you have created the custom public files directory with default settings it should be located in `~pleroma/instance/static` mv ~pleroma/instance/static /var/lib/pleroma/static -- cgit v1.2.3 From eddcebf8ae699edd9e503dd7a3c51112ca063a21 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sat, 29 Jun 2019 11:35:42 +0300 Subject: Add a warning about service files assuming installation paths --- docs/installation/migrating_from_source_otp_en.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docs') diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md index d07a0f622..b779be8cc 100644 --- a/docs/installation/migrating_from_source_otp_en.md +++ b/docs/installation/migrating_from_source_otp_en.md @@ -122,6 +122,8 @@ su pleroma -s $SHELL -lc "./bin/pleroma stop" ## Setting up a system service OTP releases have different service files than from-source installs so they need to be copied over again. +**Warning:** The service files assume pleroma user's home directory is `/opt/pleroma`, please make sure all paths fit your installation. + Debian/Ubuntu: ```sh # Copy the service into a proper directory -- cgit v1.2.3 From 4c40ada7a5f5067f26135de5fcd97b2d97f90441 Mon Sep 17 00:00:00 2001 From: deorsum Date: Sat, 29 Jun 2019 20:39:03 +1000 Subject: Add a caveat for docker deployment in the config docs --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 7d5be3980..feef43ba9 100644 --- a/docs/config.md +++ b/docs/config.md @@ -280,7 +280,7 @@ config :pleroma, :mrf_subchain, ## Pleroma.Web.Endpoint `Phoenix` endpoint configuration, all configuration options can be viewed [here](https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#module-dynamic-configuration), only common options are listed here -* `http` - a list containing http protocol configuration, all configuration options can be viewed [here](https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html#module-options), only common options are listed here +* `http` - a list containing http protocol configuration, all configuration options can be viewed [here](https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html#module-options), only common options are listed here. For deployment using docker, you need to set this to `[ip: {0,0,0,0}, port: 4000]` to make pleroma accessible from other containers (such as your nginx server). - `ip` - a tuple consisting of 4 integers - `port` * `url` - a list containing the configuration for generating urls, accepts -- cgit v1.2.3 From acd20f166b696254c6a632101d693d03416ad68d Mon Sep 17 00:00:00 2001 From: Maksim Date: Sun, 30 Jun 2019 07:28:35 +0000 Subject: [#1026] Filter.AnonymizeFilename added ability to retain file extension with custom text --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index feef43ba9..8afccb228 100644 --- a/docs/config.md +++ b/docs/config.md @@ -36,7 +36,7 @@ No specific configuration. This filter replaces the filename (not the path) of an upload. For complete obfuscation, add `Pleroma.Upload.Filter.Dedupe` before AnonymizeFilename. -* `text`: Text to replace filenames in links. If empty, `{random}.extension` will be used. +* `text`: Text to replace filenames in links. If empty, `{random}.extension` will be used. You can get the original filename extension by using `{extension}`, for example `custom-file-name.{extension}`. ## Pleroma.Emails.Mailer * `adapter`: one of the mail adapters listed in [Swoosh readme](https://github.com/swoosh/swoosh#adapters), or `Swoosh.Adapters.Local` for in-memory mailbox. -- cgit v1.2.3 From 044eb039c22f0cdececee85922b0c194f0944f42 Mon Sep 17 00:00:00 2001 From: rinpatch Date: Sun, 30 Jun 2019 13:06:10 +0300 Subject: OTP Release install docs: Remove --dry-run in cron certbot command --- docs/installation/otp_en.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md index fa71f23e1..9b851e395 100644 --- a/docs/installation/otp_en.md +++ b/docs/installation/otp_en.md @@ -207,7 +207,7 @@ certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ -- # Add it to the daily cron echo '#!/bin/sh -certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook "systemctl reload nginx" +certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --post-hook "systemctl reload nginx" ' > /etc/cron.daily/renew-pleroma-cert chmod +x /etc/cron.daily/renew-pleroma-cert @@ -228,7 +228,7 @@ certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ -- # Add it to the daily cron echo '#!/bin/sh -certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --dry-run --post-hook "rc-service nginx reload" +certbot renew --cert-name yourinstance.tld --webroot -w /var/lib/letsencrypt/ --post-hook "rc-service nginx reload" ' > /etc/periodic/daily/renew-pleroma-cert chmod +x /etc/periodic/daily/renew-pleroma-cert -- cgit v1.2.3 From 2b9d914089755297f6ac24ffbb81934cf3c70cdd Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Sun, 30 Jun 2019 15:58:50 +0300 Subject: [#161] Refactoring, documentation. --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index feef43ba9..b40147481 100644 --- a/docs/config.md +++ b/docs/config.md @@ -87,6 +87,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `invites_enabled`: Enable user invitations for admins (depends on `registrations_open: false`). * `account_activation_required`: Require users to confirm their emails before signing in. * `federating`: Enable federation with other instances +* `federation_incoming_replies_max_depth`: Max. depth of reply-to activities fetching on incoming federation (to prevent memory leakage on extremely nested incoming threads). If set to `nil`, threads of any depth will be fetched. * `federation_reachability_timeout_days`: Timeout (in days) of each external federation target being unreachable prior to pausing federating to it. * `allow_relay`: Enable Pleroma’s Relay, which makes it possible to follow a whole instance * `rewrite_policy`: Message Rewrite Policy, either one or a list. Here are the ones available by default: -- cgit v1.2.3 From 611f6665ac8c9553ceeb3cb731f6a3f0482af829 Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Mon, 1 Jul 2019 03:36:42 +0300 Subject: Update changelog and admin API docs with tags, display_name, avatar additions --- docs/api/admin_api.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md index 4be0ab0f8..74bde3ece 100644 --- a/docs/api/admin_api.md +++ b/docs/api/admin_api.md @@ -38,7 +38,9 @@ Authentication is required and the user must be an admin. "moderator": bool }, "local": bool, - "tags": array + "tags": array, + "avatar": string, + "display_name": string }, ... ] @@ -331,6 +333,7 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret "pleroma": {}, "sensitive": false }, + "tags": ["force_unlisted"], "statuses_count": 3, "url": "https://pleroma.example.org/users/user", "username": "user" @@ -366,6 +369,7 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret "pleroma": {}, "sensitive": false }, + "tags": ["force_unlisted"], "statuses_count": 1, "url": "https://pleroma.example.org/users/lain", "username": "lain" -- cgit v1.2.3 From 6c50fbcd14b56665979199150659635575fd1b25 Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Fri, 5 Jul 2019 19:33:53 +0300 Subject: Admin API: Allow querying user by ID --- docs/api/admin_api.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs') diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md index 74bde3ece..02baa09ed 100644 --- a/docs/api/admin_api.md +++ b/docs/api/admin_api.md @@ -187,6 +187,17 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret - On failure: `Not found` - On success: JSON of the user +## `/api/pleroma/admin/users/:id` + +### Retrive the details of a user + +- Method: `GET` +- Params: + - `id` +- Response: + - On failure: `Not found` + - On success: JSON of the user + ## `/api/pleroma/admin/relay` ### Follow a Relay -- cgit v1.2.3 From 9f235028569968871ef9ea933459c6e9369e737a Mon Sep 17 00:00:00 2001 From: Maxim Filippov Date: Sat, 6 Jul 2019 15:16:56 +0300 Subject: Fix docs --- docs/api/admin_api.md | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'docs') diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md index 02baa09ed..bce5e399b 100644 --- a/docs/api/admin_api.md +++ b/docs/api/admin_api.md @@ -176,24 +176,13 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret - `nickname` - `status` BOOLEAN field, false value means deactivation. -## `/api/pleroma/admin/users/:nickname` +## `/api/pleroma/admin/users/:nickname_or_id` ### Retrive the details of a user - Method: `GET` - Params: - - `nickname` -- Response: - - On failure: `Not found` - - On success: JSON of the user - -## `/api/pleroma/admin/users/:id` - -### Retrive the details of a user - -- Method: `GET` -- Params: - - `id` + - `nickname` or `id` - Response: - On failure: `Not found` - On success: JSON of the user -- cgit v1.2.3 From dd5a41e2a4312a3dc7a1083d3d0ac5b356afafa8 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Tue, 9 Jul 2019 10:39:36 +0000 Subject: Apply suggestion to docs/config.md --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 6cbbb6ce9..822c34c51 100644 --- a/docs/config.md +++ b/docs/config.md @@ -87,7 +87,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `invites_enabled`: Enable user invitations for admins (depends on `registrations_open: false`). * `account_activation_required`: Require users to confirm their emails before signing in. * `federating`: Enable federation with other instances -* `federation_incoming_replies_max_depth`: Max. depth of reply-to activities fetching on incoming federation (to prevent memory leakage on extremely nested incoming threads). If set to `nil`, threads of any depth will be fetched. +* `federation_incoming_replies_max_depth`: Max. depth of reply-to activities fetching on incoming federation, to prevent out-of-memory situations while fetching very long threads. If set to `nil`, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes. * `federation_reachability_timeout_days`: Timeout (in days) of each external federation target being unreachable prior to pausing federating to it. * `allow_relay`: Enable Pleroma’s Relay, which makes it possible to follow a whole instance * `rewrite_policy`: Message Rewrite Policy, either one or a list. Here are the ones available by default: -- cgit v1.2.3 From d6b0fce6e944e8a3dd05091ef2388c610362f824 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Tue, 9 Jul 2019 17:36:35 +0000 Subject: Fix/1019 correct count remote users --- docs/config.md | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 822c34c51..931155fe9 100644 --- a/docs/config.md +++ b/docs/config.md @@ -125,6 +125,12 @@ config :pleroma, Pleroma.Emails.Mailer, * `skip_thread_containment`: Skip filter out broken threads. The default is `false`. * `limit_to_local_content`: Limit unauthenticated users to search for local statutes and users only. Possible values: `:unauthenticated`, `:all` and `false`. The default is `:unauthenticated`. * `dynamic_configuration`: Allow transferring configuration to DB with the subsequent customization from Admin api. +* `external_user_synchronization`: Following/followers counters synchronization settings. + * `enabled`: Enables synchronization + * `interval`: Interval between synchronization. + * `max_retries`: Max rettries for host. After exceeding the limit, the check will not be carried out for users from this host. + * `limit`: Users batch size for processing in one time. + ## :logger -- cgit v1.2.3 From c91b5c87ffee82fcfe8e088b76025857caed61b8 Mon Sep 17 00:00:00 2001 From: feld Date: Tue, 9 Jul 2019 18:20:36 +0000 Subject: Docs/more mastodon api --- docs/api/differences_in_mastoapi_responses.md | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs') diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index 3ee7115cf..2cbe1458d 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -46,6 +46,14 @@ Has these additional fields under the `pleroma` object: - `settings_store`: A generic map of settings for frontends. Opaque to the backend. Only returned in `verify_credentials` and `update_credentials` - `chat_token`: The token needed for Pleroma chat. Only returned in `verify_credentials` +### Extensions for PleromaFE + +These endpoints added for controlling PleromaFE features over the Mastodon API + +- PATCH `/api/v1/accounts/update_avatar`: Set/clear user avatar image +- PATCH `/api/v1/accounts/update_banner`: Set/clear user banner image +- PATCH `/api/v1/accounts/update_background`: Set/clear user background image + ### Source Has these additional fields under the `pleroma` object: -- cgit v1.2.3 From 12b1454245fc2efba22d5633f65539dac727ee3d Mon Sep 17 00:00:00 2001 From: Maksim Date: Wed, 10 Jul 2019 05:34:21 +0000 Subject: [#1062] added option to disable send email --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 931155fe9..01730ec16 100644 --- a/docs/config.md +++ b/docs/config.md @@ -41,6 +41,7 @@ This filter replaces the filename (not the path) of an upload. For complete obfu ## Pleroma.Emails.Mailer * `adapter`: one of the mail adapters listed in [Swoosh readme](https://github.com/swoosh/swoosh#adapters), or `Swoosh.Adapters.Local` for in-memory mailbox. * `api_key` / `password` and / or other adapter-specific settings, per the above documentation. +* `enabled`: Allows enable/disable send emails. Default: `false`. An example for Sendgrid adapter: -- cgit v1.2.3 From beba7bbc8550aca07874e105b784b7a3cbe89838 Mon Sep 17 00:00:00 2001 From: Alex S Date: Wed, 10 Jul 2019 17:39:07 +0300 Subject: removing synchronization worker --- docs/config.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 01730ec16..140789d87 100644 --- a/docs/config.md +++ b/docs/config.md @@ -126,11 +126,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `skip_thread_containment`: Skip filter out broken threads. The default is `false`. * `limit_to_local_content`: Limit unauthenticated users to search for local statutes and users only. Possible values: `:unauthenticated`, `:all` and `false`. The default is `:unauthenticated`. * `dynamic_configuration`: Allow transferring configuration to DB with the subsequent customization from Admin api. -* `external_user_synchronization`: Following/followers counters synchronization settings. - * `enabled`: Enables synchronization - * `interval`: Interval between synchronization. - * `max_retries`: Max rettries for host. After exceeding the limit, the check will not be carried out for users from this host. - * `limit`: Users batch size for processing in one time. +* `external_user_synchronization`: Enabling following/followers counters synchronization for external users. -- cgit v1.2.3 From 846ad9a463e7d6767170305f32eef7bbd09f8a6b Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Thu, 11 Jul 2019 13:02:13 +0000 Subject: admin api configure changes --- docs/api/admin_api.md | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) (limited to 'docs') diff --git a/docs/api/admin_api.md b/docs/api/admin_api.md index bce5e399b..c429da822 100644 --- a/docs/api/admin_api.md +++ b/docs/api/admin_api.md @@ -573,7 +573,7 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret configs: [ { "group": string, - "key": string, + "key": string or string with leading `:` for atoms, "value": string or {} or [] or {"tuple": []} } ] @@ -583,10 +583,11 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret ## `/api/pleroma/admin/config` ### Update config settings Module name can be passed as string, which starts with `Pleroma`, e.g. `"Pleroma.Upload"`. -Atom or boolean value can be passed with `:` in the beginning, e.g. `":true"`, `":upload"`. For keys it is not needed. -Integer with `i:`, e.g. `"i:150"`. -Tuple with more than 2 values with `{"tuple": ["first_val", Pleroma.Module, []]}`. +Atom keys and values can be passed with `:` in the beginning, e.g. `":upload"`. +Tuples can be passed as `{"tuple": ["first_val", Pleroma.Module, []]}`. `{"tuple": ["some_string", "Pleroma.Some.Module", []]}` will be converted to `{"some_string", Pleroma.Some.Module, []}`. +Keywords can be passed as lists with 2 child tuples, e.g. +`[{"tuple": ["first_val", Pleroma.Module]}, {"tuple": ["second_val", true]}]`. Compile time settings (need instance reboot): - all settings by this keys: @@ -603,7 +604,7 @@ Compile time settings (need instance reboot): - Params: - `configs` => [ - `group` (string) - - `key` (string) + - `key` (string or string with leading `:` for atoms) - `value` (string, [], {} or {"tuple": []}) - `delete` = true (optional, if parameter must be deleted) ] @@ -616,24 +617,25 @@ Compile time settings (need instance reboot): { "group": "pleroma", "key": "Pleroma.Upload", - "value": { - "uploader": "Pleroma.Uploaders.Local", - "filters": ["Pleroma.Upload.Filter.Dedupe"], - "link_name": ":true", - "proxy_remote": ":false", - "proxy_opts": { - "redirect_on_failure": ":false", - "max_body_length": "i:1048576", - "http": { - "follow_redirect": ":true", - "pool": ":upload" - } - }, - "dispatch": { + "value": [ + {"tuple": [":uploader", "Pleroma.Uploaders.Local"]}, + {"tuple": [":filters", ["Pleroma.Upload.Filter.Dedupe"]]}, + {"tuple": [":link_name", true]}, + {"tuple": [":proxy_remote", false]}, + {"tuple": [":proxy_opts", [ + {"tuple": [":redirect_on_failure", false]}, + {"tuple": [":max_body_length", 1048576]}, + {"tuple": [":http": [ + {"tuple": [":follow_redirect", true]}, + {"tuple": [":pool", ":upload"]}, + ]]} + ] + ]}, + {"tuple": [":dispatch", { "tuple": ["/api/v1/streaming", "Pleroma.Web.MastodonAPI.WebsocketHandler", []] - } - } - } + }]} + ] + } ] } @@ -644,7 +646,7 @@ Compile time settings (need instance reboot): configs: [ { "group": string, - "key": string, + "key": string or string with leading `:` for atoms, "value": string or {} or [] or {"tuple": []} } ] -- cgit v1.2.3 From 360e4cdaa2708d54903765c61afbc5ea5f1b2cdb Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Fri, 12 Jul 2019 11:25:58 -0500 Subject: Move these to pleroma namespace in Mastodon API --- docs/api/differences_in_mastoapi_responses.md | 8 -------- docs/api/pleroma_api.md | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index 2cbe1458d..3ee7115cf 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -46,14 +46,6 @@ Has these additional fields under the `pleroma` object: - `settings_store`: A generic map of settings for frontends. Opaque to the backend. Only returned in `verify_credentials` and `update_credentials` - `chat_token`: The token needed for Pleroma chat. Only returned in `verify_credentials` -### Extensions for PleromaFE - -These endpoints added for controlling PleromaFE features over the Mastodon API - -- PATCH `/api/v1/accounts/update_avatar`: Set/clear user avatar image -- PATCH `/api/v1/accounts/update_banner`: Set/clear user banner image -- PATCH `/api/v1/accounts/update_background`: Set/clear user background image - ### Source Has these additional fields under the `pleroma` object: diff --git a/docs/api/pleroma_api.md b/docs/api/pleroma_api.md index edc62727a..d83ebd734 100644 --- a/docs/api/pleroma_api.md +++ b/docs/api/pleroma_api.md @@ -238,6 +238,13 @@ See [Admin-API](Admin-API.md) ] ``` +## `/api/v1/pleroma/accounts/update_*` +### Set and clear account avatar, banner, and background + +- PATCH `/api/v1/pleroma/accounts/update_avatar`: Set/clear user avatar image +- PATCH `/api/v1/pleroma/accounts/update_banner`: Set/clear user banner image +- PATCH `/api/v1/pleroma/accounts/update_background`: Set/clear user background image + ## `/api/v1/pleroma/mascot` ### Gets user mascot image * Method `GET` -- cgit v1.2.3 From b74d11e20ab214d533f746bee81fde589d319f64 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Sat, 13 Jul 2019 15:13:26 +0300 Subject: [#1041] Added documentation on existing rate limiters. --- docs/config.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 140789d87..3ec13cff2 100644 --- a/docs/config.md +++ b/docs/config.md @@ -640,3 +640,10 @@ A keyword list of rate limiters where a key is a limiter name and value is the l It is also possible to have different limits for unauthenticated and authenticated users: the keyword value must be a list of two tuples where the first one is a config for unauthenticated users and the second one is for authenticated. See [`Pleroma.Plugs.RateLimiter`](Pleroma.Plugs.RateLimiter.html) documentation for examples. + +Supported rate limiters: + +* `:search` for the search requests (account & status search etc.) +* `:app_account_creation` for registering user accounts from the same IP address +* `:statuses_actions` for create / delete / fav / unfav / reblog / unreblog actions on any statuses +* `:status_id_action` for fav / unfav or reblog / unreblog actions on the same status by the same user -- cgit v1.2.3 From 80c46d6d8b84d77d86efc32c1d2af225c1eada33 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sat, 13 Jul 2019 18:30:45 +0000 Subject: nodeinfo: implement MRF transparency exclusions --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 3ec13cff2..639c5689c 100644 --- a/docs/config.md +++ b/docs/config.md @@ -106,6 +106,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` * `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML) * `mrf_transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo). +* `mrf_transparency_exclusions`: Exclude specific instance names from MRF transparency. * `scope_copy`: Copy the scope (private/unlisted/public) in replies to posts by default. * `subject_line_behavior`: Allows changing the default behaviour of subject lines in replies. Valid values: * "email": Copy and preprend re:, as in email. -- cgit v1.2.3 From 0cc638b96874312bce29e477a0ce6e46a92142bf Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sat, 13 Jul 2019 19:00:03 +0000 Subject: docs: note that exclusions usage will be included in the transparency metrics if used --- docs/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index 639c5689c..a65b7a560 100644 --- a/docs/config.md +++ b/docs/config.md @@ -106,7 +106,7 @@ config :pleroma, Pleroma.Emails.Mailer, * `managed_config`: Whenether the config for pleroma-fe is configured in this config or in ``static/config.json`` * `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML) * `mrf_transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo). -* `mrf_transparency_exclusions`: Exclude specific instance names from MRF transparency. +* `mrf_transparency_exclusions`: Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value. * `scope_copy`: Copy the scope (private/unlisted/public) in replies to posts by default. * `subject_line_behavior`: Allows changing the default behaviour of subject lines in replies. Valid values: * "email": Copy and preprend re:, as in email. -- cgit v1.2.3 From 7af27c143d6c6f288be1e7d2fd2e2e9a439ececf Mon Sep 17 00:00:00 2001 From: Alex S Date: Sun, 14 Jul 2019 09:20:54 +0300 Subject: changelog & docs --- docs/config.md | 1 + 1 file changed, 1 insertion(+) (limited to 'docs') diff --git a/docs/config.md b/docs/config.md index a65b7a560..9a64f0ed7 100644 --- a/docs/config.md +++ b/docs/config.md @@ -425,6 +425,7 @@ This config contains two queues: `federator_incoming` and `federator_outgoing`. * `enabled`: if enabled the instance will parse metadata from attached links to generate link previews * `ignore_hosts`: list of hosts which will be ignored by the metadata parser. For example `["accounts.google.com", "xss.website"]`, defaults to `[]`. * `ignore_tld`: list TLDs (top-level domains) which will ignore for parse metadata. default is ["local", "localdomain", "lan"] +* `parsers`: list of Rich Media parsers ## :fetch_initial_posts * `enabled`: if enabled, when a new user is federated with, fetch some of their latest posts -- cgit v1.2.3 From 0c66bb5857ca5c67630f07ff25878aaa70f3ce4b Mon Sep 17 00:00:00 2001 From: Egor Kislitsyn Date: Mon, 15 Jul 2019 14:27:56 +0700 Subject: Update documentation --- docs/api/differences_in_mastoapi_responses.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/api/differences_in_mastoapi_responses.md b/docs/api/differences_in_mastoapi_responses.md index 03917fffc..d2e9bcc4b 100644 --- a/docs/api/differences_in_mastoapi_responses.md +++ b/docs/api/differences_in_mastoapi_responses.md @@ -16,9 +16,11 @@ Adding the parameter `with_muted=true` to the timeline queries will also return ## Statuses +- `visibility`: has an additional possible value `list` + Has these additional fields under the `pleroma` object: -- `local`: true if the post was made on the local instance. +- `local`: true if the post was made on the local instance - `conversation_id`: the ID of the conversation the status is associated with (if any) - `in_reply_to_account_acct`: the `acct` property of User entity for replied user (if any) - `content`: a map consisting of alternate representations of the `content` property with the key being it's mimetype. Currently the only alternate representation supported is `text/plain` -- cgit v1.2.3 From 345a38778ee6861b36e7601e581eb14bebe31d82 Mon Sep 17 00:00:00 2001 From: Eugenij Date: Mon, 15 Jul 2019 21:43:04 +0000 Subject: Remove dead link from the installation docs --- docs/installation/alpine_linux_en.md | 1 - docs/installation/arch_linux_en.md | 1 - docs/installation/centos7_en.md | 1 - docs/installation/debian_based_en.md | 1 - docs/installation/debian_based_jp.md | 1 - docs/installation/gentoo_en.md | 1 - 6 files changed, 6 deletions(-) (limited to 'docs') diff --git a/docs/installation/alpine_linux_en.md b/docs/installation/alpine_linux_en.md index a9b5afd33..1f300f353 100644 --- a/docs/installation/alpine_linux_en.md +++ b/docs/installation/alpine_linux_en.md @@ -202,7 +202,6 @@ sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new