aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/administration/CLI_tasks/email.md7
-rw-r--r--docs/administration/CLI_tasks/user.md4
-rw-r--r--docs/configuration/mrf.md23
-rw-r--r--docs/configuration/static_dir.md5
-rw-r--r--docs/development/API/admin_api.md (renamed from docs/API/admin_api.md)1
-rw-r--r--docs/development/API/chats.md (renamed from docs/API/chats.md)0
-rw-r--r--docs/development/API/differences_in_mastoapi_responses.md (renamed from docs/API/differences_in_mastoapi_responses.md)28
-rw-r--r--docs/development/API/pleroma_api.md (renamed from docs/API/pleroma_api.md)0
-rw-r--r--docs/development/API/prometheus.md (renamed from docs/API/prometheus.md)0
-rw-r--r--docs/development/ap_extensions.md (renamed from docs/ap_extensions.md)0
-rw-r--r--docs/development/authentication_authorization.md (renamed from docs/dev.md)31
-rw-r--r--docs/development/index.md1
-rw-r--r--docs/development/setting_up_pleroma_dev.md70
-rw-r--r--docs/installation/alpine_linux_en.md2
-rw-r--r--docs/installation/arch_linux_en.md2
-rw-r--r--docs/installation/debian_based_en.md2
-rw-r--r--docs/installation/debian_based_jp.md2
-rw-r--r--docs/installation/freebsd_en.md2
-rw-r--r--docs/installation/netbsd_en.md2
-rw-r--r--docs/installation/openbsd_en.md2
-rw-r--r--docs/installation/openbsd_fi.md2
21 files changed, 139 insertions, 47 deletions
diff --git a/docs/administration/CLI_tasks/email.md b/docs/administration/CLI_tasks/email.md
index d9aa0e71b..2bb57bea4 100644
--- a/docs/administration/CLI_tasks/email.md
+++ b/docs/administration/CLI_tasks/email.md
@@ -16,8 +16,7 @@
mix pleroma.email test [--to <destination email address>]
```
-
-Example:
+Example:
=== "OTP"
@@ -36,11 +35,11 @@ Example:
=== "OTP"
```sh
- ./bin/pleroma_ctl email send_confirmation_mails
+ ./bin/pleroma_ctl email resend_confirmation_emails
```
=== "From Source"
```sh
- mix pleroma.email send_confirmation_mails
+ mix pleroma.email resend_confirmation_emails
```
diff --git a/docs/administration/CLI_tasks/user.md b/docs/administration/CLI_tasks/user.md
index c64ed4f22..b57dce0e7 100644
--- a/docs/administration/CLI_tasks/user.md
+++ b/docs/administration/CLI_tasks/user.md
@@ -264,13 +264,13 @@
=== "OTP"
```sh
- ./bin/pleroma_ctl user toggle_confirmed <nickname>
+ ./bin/pleroma_ctl user confirm <nickname>
```
=== "From Source"
```sh
- mix pleroma.user toggle_confirmed <nickname>
+ mix pleroma.user confirm <nickname>
```
## Set confirmation status for all regular active users
diff --git a/docs/configuration/mrf.md b/docs/configuration/mrf.md
index 31c66e098..9e8c0a2d7 100644
--- a/docs/configuration/mrf.md
+++ b/docs/configuration/mrf.md
@@ -133,3 +133,26 @@ config :pleroma, :mrf,
```
Please note that the Pleroma developers consider custom MRF policy modules to fall under the purview of the AGPL. As such, you are obligated to release the sources to your custom MRF policy modules upon request.
+
+### MRF policies descriptions
+
+If MRF policy depends on config, it can be added into MRF tab to adminFE by adding `config_description/0` method, which returns a map with a specific structure. See existing MRF's like `lib/pleroma/web/activity_pub/mrf/activity_expiration_policy.ex` for examples. Note that more complex inputs, like tuples or maps, may need extra changes in the adminFE and just adding it to `config_description/0` may not be enough to get these inputs working from the adminFE.
+
+Example:
+
+```elixir
+%{
+ key: :mrf_activity_expiration,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy",
+ label: "MRF Activity Expiration Policy",
+ description: "Adds automatic expiration to all local activities",
+ children: [
+ %{
+ key: :days,
+ type: :integer,
+ description: "Default global expiration time for all local activities (in days)",
+ suggestions: [90, 365]
+ }
+ ]
+ }
+```
diff --git a/docs/configuration/static_dir.md b/docs/configuration/static_dir.md
index 8ac07b725..a294bb604 100644
--- a/docs/configuration/static_dir.md
+++ b/docs/configuration/static_dir.md
@@ -88,3 +88,8 @@ config :pleroma, :frontend_configurations,
Note the extra `static` folder for the terms-of-service.html
Terms of Service will be shown to all users on the registration page. It's the best place where to write down the rules for your instance. You can modify the rules by adding and changing `$static_dir/static/terms-of-service.html`.
+
+
+## Styling rendered pages
+
+To overwrite the CSS stylesheet of the OAuth form and other static pages, you can upload your own CSS file to `instance/static/static.css`. This will completely replace the CSS used by those pages, so it might be a good idea to copy the one from `priv/static/instance/static.css` and make your changes.
diff --git a/docs/API/admin_api.md b/docs/development/API/admin_api.md
index 266f8cef8..5253dc668 100644
--- a/docs/API/admin_api.md
+++ b/docs/development/API/admin_api.md
@@ -1123,6 +1123,7 @@ Loads json generated from `config/descriptions.exs`.
```json
[
{
+ "id": 1234,
"data": {
"actor": {
"id": 1,
diff --git a/docs/API/chats.md b/docs/development/API/chats.md
index f50144c86..f50144c86 100644
--- a/docs/API/chats.md
+++ b/docs/development/API/chats.md
diff --git a/docs/API/differences_in_mastoapi_responses.md b/docs/development/API/differences_in_mastoapi_responses.md
index 6b0ad85d1..84430408b 100644
--- a/docs/API/differences_in_mastoapi_responses.md
+++ b/docs/development/API/differences_in_mastoapi_responses.md
@@ -4,7 +4,7 @@ A Pleroma instance can be identified by "<Mastodon version> (compatible; Pleroma
## Flake IDs
-Pleroma uses 128-bit ids as opposed to Mastodon's 64 bits. However just like Mastodon's ids they are lexically sortable strings
+Pleroma uses 128-bit ids as opposed to Mastodon's 64 bits. However, just like Mastodon's ids, they are lexically sortable strings
## Timelines
@@ -26,8 +26,8 @@ Has these additional fields under the `pleroma` object:
- `conversation_id`: the ID of the AP context the status is associated with (if any)
- `direct_conversation_id`: the ID of the Mastodon direct message 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`
-- `spoiler_text`: a map consisting of alternate representations of the `spoiler_text` property with the key being it's mimetype. Currently the only alternate representation supported is `text/plain`
+- `content`: a map consisting of alternate representations of the `content` property with the key being its mimetype. Currently, the only alternate representation supported is `text/plain`
+- `spoiler_text`: a map consisting of alternate representations of the `spoiler_text` property with the key being its mimetype. Currently, the only alternate representation supported is `text/plain`
- `expires_at`: a datetime (iso8601) that states when the post will expire (be deleted automatically), or empty if the post won't expire
- `thread_muted`: true if the thread the post belongs to is muted
- `emoji_reactions`: A list with emoji / reaction maps. The format is `{name: "☕", count: 1, me: true}`. Contains no information about the reacting users, for that use the `/statuses/:id/reactions` endpoint.
@@ -170,9 +170,9 @@ Returns on success: 200 OK `{}`
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.
+- `preview`: boolean, if set to `true` the post won't be actually posted, but the status entity 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.
+- `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 post visibility are not affected by this and will still apply.
- `visibility`: string, besides standard MastoAPI values (`direct`, `private`, `unlisted`, `local` or `public`) it can be used to address a List by setting it to `list:LIST_ID`.
- `expires_in`: The number of seconds the posted activity should expire in. When a posted activity expires it will be deleted from the server, and a delete request for it will be federated. This needs to be longer than an hour.
- `in_reply_to_conversation_id`: Will reply to a given conversation, addressing only the people who are part of the recipient set of that conversation. Sets the visibility to `direct`.
@@ -206,6 +206,7 @@ Additional parameters can be added to the JSON body/Form data:
- `pleroma_settings_store` - Opaque user settings to be saved on the backend.
- `skip_thread_containment` - if true, skip filtering out broken threads
- `allow_following_move` - if true, allows automatically follow moved following accounts
+- `also_known_as` - array of ActivityPub IDs, needed for following move
- `pleroma_background_image` - sets the background image of the user. Can be set to "" (an empty string) to reset.
- `discoverable` - if true, external services (search bots) etc. are allowed to index / list the account (regardless of this setting, user will still appear in regular search results).
- `actor_type` - the type of this account.
@@ -279,10 +280,27 @@ Has these additional fields under the `pleroma` object:
## Streaming
+### Chats
+
There is an additional `user:pleroma_chat` stream. Incoming chat messages will make the current chat be sent to this `user` stream. The `event` of an incoming chat message is `pleroma:chat_update`. The payload is the updated chat with the incoming chat message in the `last_message` field.
+### Remote timelines
+
For viewing remote server timelines, there are `public:remote` and `public:remote:media` streams. Each of these accept a parameter like `?instance=lain.com`.
+### Follow relationships updates
+
+Pleroma streams follow relationships updates as `pleroma:follow_relationships_update` events to the `user` stream.
+
+The message payload consist of:
+
+- `state`: a relationship state, one of `follow_pending`, `follow_accept` or `follow_reject`.
+
+- `follower` and `following` maps with following fields:
+ - `id`: user ID
+ - `follower_count`: follower count
+ - `following_count`: following count
+
## User muting and thread muting
Both user muting and thread muting can be done for only a certain time by adding an `expires_in` parameter to the API calls and giving the expiration time in seconds.
diff --git a/docs/API/pleroma_api.md b/docs/development/API/pleroma_api.md
index d8790ca32..d8790ca32 100644
--- a/docs/API/pleroma_api.md
+++ b/docs/development/API/pleroma_api.md
diff --git a/docs/API/prometheus.md b/docs/development/API/prometheus.md
index a5158d905..a5158d905 100644
--- a/docs/API/prometheus.md
+++ b/docs/development/API/prometheus.md
diff --git a/docs/ap_extensions.md b/docs/development/ap_extensions.md
index 3d1caeb3e..3d1caeb3e 100644
--- a/docs/ap_extensions.md
+++ b/docs/development/ap_extensions.md
diff --git a/docs/dev.md b/docs/development/authentication_authorization.md
index aa89a941f..183bfc2c9 100644
--- a/docs/dev.md
+++ b/docs/development/authentication_authorization.md
@@ -1,5 +1,3 @@
-This document contains notes and guidelines for Pleroma developers.
-
# Authentication & Authorization
## OAuth token-based authentication & authorization
@@ -14,33 +12,10 @@ This document contains notes and guidelines for Pleroma developers.
For `:api` pipeline routes, it'll be verified whether `OAuthScopesPlug` was called or explicitly skipped, and if it was not then auth information will be dropped for request. Then `EnsurePublicOrAuthenticatedPlug` will be called to ensure that either the instance is not private or user is authenticated (unless explicitly skipped). Such automated checks help to prevent human errors and result in higher security / privacy for users.
-## [HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization)
+## Non-OAuth authentication
-* With HTTP Basic Auth, OAuth scopes check is _not_ performed for any action (since password is provided during the auth, requester is able to obtain a token with full permissions anyways). `Pleroma.Web.Plugs.AuthenticationPlug` and `Pleroma.Web.Plugs.LegacyAuthenticationPlug` both call `Pleroma.Web.Plugs.OAuthScopesPlug.skip_plug(conn)` when password is provided.
+* With non-OAuth authentication ([HTTP Basic Authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Authorization) or HTTP header- or params-provided auth), OAuth scopes check is _not_ performed for any action (since password is provided during the auth, requester is able to obtain a token with full permissions anyways); auth plugs invoke `Pleroma.Helpers.AuthHelper.skip_oauth(conn)` in this case.
## Auth-related configuration, OAuth consumer mode etc.
-See `Authentication` section of [the configuration cheatsheet](configuration/cheatsheet.md#authentication).
-
-## MRF policies descriptions
-
-If MRF policy depends on config, it can be added into MRF tab to adminFE by adding `config_description/0` method, which returns map with special structure.
-
-Example:
-
-```elixir
-%{
- key: :mrf_activity_expiration,
- related_policy: "Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy",
- label: "MRF Activity Expiration Policy",
- description: "Adds automatic expiration to all local activities",
- children: [
- %{
- key: :days,
- type: :integer,
- description: "Default global expiration time for all local activities (in days)",
- suggestions: [90, 365]
- }
- ]
- }
-```
+See `Authentication` section of [the configuration cheatsheet](../configuration/cheatsheet.md#authentication).
diff --git a/docs/development/index.md b/docs/development/index.md
new file mode 100644
index 000000000..01a617596
--- /dev/null
+++ b/docs/development/index.md
@@ -0,0 +1 @@
+This section contains notes and guidelines for developers.
diff --git a/docs/development/setting_up_pleroma_dev.md b/docs/development/setting_up_pleroma_dev.md
new file mode 100644
index 000000000..8da761d62
--- /dev/null
+++ b/docs/development/setting_up_pleroma_dev.md
@@ -0,0 +1,70 @@
+# Setting up a Pleroma development environment
+
+Pleroma requires some adjustments from the defaults for running the instance locally. The following should help you to get started.
+
+## Installing
+
+1. Install Pleroma as explained in [the docs](../installation/debian_based_en.md), with some exceptions:
+ * You can use your own fork of the repository and add pleroma as a remote `git remote add pleroma 'https://git.pleroma.social/pleroma/pleroma'`
+ * You can skip systemd and nginx and all that stuff
+ * No need to create a dedicated pleroma user, it's easier to just use your own user
+ * For the DB you can still choose a dedicated user, the mix tasks set it up for you so it's no extra work for you
+ * For domain you can use `localhost`
+ * instead of creating a `prod.secret.exs`, create `dev.secret.exs`
+ * No need to prefix with `MIX_ENV=prod`. We're using dev and that's the default MIX_ENV
+2. Change the dev.secret.exs
+ * Change the scheme in `config :pleroma, Pleroma.Web.Endpoint` to http (see examples below)
+ * If you want to change other settings, you can do that too
+3. You can now start the server `mix phx.server`. Once it's build and started, you can access the instance on `http://<host>:<port>` (e.g.http://localhost:4000 ) and should be able to do everything locally you normaly can.
+
+Example config to change the scheme to http. Change the port if you want to run on another port.
+```elixir
+ config :pleroma, Pleroma.Web.Endpoint,
+ url: [host: "localhost", scheme: "http", port: 4000],
+```
+
+Example config to disable captcha. This makes it a bit easier to create test-users.
+```elixir
+config :pleroma, Pleroma.Captcha,
+ enabled: false
+```
+
+Example config to change the log level to info
+```elixir
+config :logger, :console,
+ # :debug :info :warning :error
+ level: :info
+```
+
+## Testing
+
+1. Create a `test.secret.exs` file with the content as shown below
+2. Create the database user and test database.
+ 1. You can use the `config/setup_db.psql` as a template. Copy the file if you want and change the database name, user and password to the values for the test-database (e.g. 'pleroma_local_test' for database and user). Then run this file like you did during installation.
+ 2. The tests will try to create the Database, so we'll have to allow our test-database user to create databases, `sudo -Hu postgres psql -c "ALTER USER pleroma_local_test WITH CREATEDB;"`
+3. Run the tests with `mix test`. The tests should succeed.
+
+Example content for the `test.secret.exs` file. Feel free to use another user, database name or password, just make sure the database is dedicated for the testing environment.
+```elixir
+# Pleroma test configuration
+
+# NOTE: This file should not be committed to a repo or otherwise made public
+# without removing sensitive information.
+
+import Config
+
+config :pleroma, Pleroma.Repo,
+ username: "pleroma_local_test",
+ password: "mysuperduperpassword",
+ database: "pleroma_local_test",
+ hostname: "localhost"
+
+```
+
+## Updating
+
+Update Pleroma as explained in [the docs](../administration/updating.md). Just make sure you pull from upstream and not from your own fork.
+
+## Working on multiple branches
+
+If you develop on a separate branch, it's possible you did migrations that aren't merged into another branch you're working on. If you have multiple things you're working on, it's probably best to set up multiple pleroma's each with their own database. If you finished with a branch and want to switch back to develop to start a new branch from there, you can drop the database and recreate the database (e.g. by using `config/setup_db.psql`). The commands to drop and recreate the database can be found in [the docs](../administration/backup.md).
diff --git a/docs/installation/alpine_linux_en.md b/docs/installation/alpine_linux_en.md
index 62f2fb778..2f8520a78 100644
--- a/docs/installation/alpine_linux_en.md
+++ b/docs/installation/alpine_linux_en.md
@@ -80,7 +80,7 @@ sudo /etc/init.d/postgresql start
sudo rc-update add postgresql
```
-### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md))
+### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md))
```shell
sudo apk add ffmpeg imagemagick exiftool
diff --git a/docs/installation/arch_linux_en.md b/docs/installation/arch_linux_en.md
index 0eb6d2d5f..9cbd3f429 100644
--- a/docs/installation/arch_linux_en.md
+++ b/docs/installation/arch_linux_en.md
@@ -56,7 +56,7 @@ sudo -iu postgres initdb -D /var/lib/postgres/data
sudo systemctl enable --now postgresql.service
```
-### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md))
+### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md))
```shell
sudo pacman -S ffmpeg imagemagick perl-image-exiftool
diff --git a/docs/installation/debian_based_en.md b/docs/installation/debian_based_en.md
index 2b1c7406f..926a85367 100644
--- a/docs/installation/debian_based_en.md
+++ b/docs/installation/debian_based_en.md
@@ -54,7 +54,7 @@ sudo apt update
sudo apt install elixir erlang-dev erlang-nox
```
-### Optional packages: [`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md)
+### Optional packages: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
```shell
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
diff --git a/docs/installation/debian_based_jp.md b/docs/installation/debian_based_jp.md
index 94e22325c..2613a86d9 100644
--- a/docs/installation/debian_based_jp.md
+++ b/docs/installation/debian_based_jp.md
@@ -54,7 +54,7 @@ sudo apt update
sudo apt install elixir erlang-dev erlang-nox
```
-### オプションパッケージ: [`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md)
+### オプションパッケージ: [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md)
```shell
sudo apt install imagemagick ffmpeg libimage-exiftool-perl
diff --git a/docs/installation/freebsd_en.md b/docs/installation/freebsd_en.md
index fdcb06c53..2dc466eb8 100644
--- a/docs/installation/freebsd_en.md
+++ b/docs/installation/freebsd_en.md
@@ -26,7 +26,7 @@ Setup the required services to automatically start at boot, using `sysrc(8)`.
# service postgresql start
```
-### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md))
+### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md))
```shell
# pkg install imagemagick ffmpeg p5-Image-ExifTool
diff --git a/docs/installation/netbsd_en.md b/docs/installation/netbsd_en.md
index d5fa04fdf..233cf28b7 100644
--- a/docs/installation/netbsd_en.md
+++ b/docs/installation/netbsd_en.md
@@ -44,7 +44,7 @@ pgsql=YES
First, run `# /etc/rc.d/pgsql start`. Then, `$ sudo -Hu pgsql -g pgsql createdb`.
-### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md))
+### Install media / graphics packages (optional, see [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md))
`# pkgin install ImageMagick ffmpeg4 p5-Image-ExifTool`
diff --git a/docs/installation/openbsd_en.md b/docs/installation/openbsd_en.md
index 8092ac379..0e1269ca5 100644
--- a/docs/installation/openbsd_en.md
+++ b/docs/installation/openbsd_en.md
@@ -27,7 +27,7 @@ Pleroma requires a reverse proxy, OpenBSD has relayd in base (and is used in thi
#### Optional software
-Per [`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md):
+Per [`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md):
* ImageMagick
* ffmpeg
* exiftool
diff --git a/docs/installation/openbsd_fi.md b/docs/installation/openbsd_fi.md
index 01cf34ab4..a61434147 100644
--- a/docs/installation/openbsd_fi.md
+++ b/docs/installation/openbsd_fi.md
@@ -20,7 +20,7 @@ Asenna tarvittava ohjelmisto:
#### Optional software
-[`docs/installation/optional/media_graphics_packages.md`](docs/installation/optional/media_graphics_packages.md):
+[`docs/installation/optional/media_graphics_packages.md`](../installation/optional/media_graphics_packages.md):
* ImageMagick
* ffmpeg
* exiftool