summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-08-25 11:44:51 +0200
committerlain <lain@soykaf.club>2020-08-25 11:44:51 +0200
commitc1d51944c71ff90650b1a631241daf0d8be5b861 (patch)
tree2e78efaeb892c4b09cac0439f268d6a60637b4dc /docs
parent199ad47c22e5d72741f5809eb015bac9b00cca03 (diff)
parent5722b0e2e5e7113f0422798a6ea8cc40d1953291 (diff)
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into frontend-bundles-downloads
Diffstat (limited to 'docs')
-rw-r--r--docs/API/admin_api.md65
-rw-r--r--docs/administration/CLI_tasks/config.md29
-rw-r--r--docs/administration/CLI_tasks/database.md127
-rw-r--r--docs/administration/CLI_tasks/digest.md32
-rw-r--r--docs/administration/CLI_tasks/email.md32
-rw-r--r--docs/administration/CLI_tasks/emoji.md49
-rw-r--r--docs/administration/CLI_tasks/instance.md16
-rw-r--r--docs/administration/CLI_tasks/oauth_app.md16
-rw-r--r--docs/administration/CLI_tasks/relay.md48
-rw-r--r--docs/administration/CLI_tasks/release_environments.md9
-rw-r--r--docs/administration/CLI_tasks/robots_txt.md21
-rw-r--r--docs/administration/CLI_tasks/uploads.md16
-rw-r--r--docs/administration/CLI_tasks/user.md288
-rw-r--r--docs/clients.md35
-rw-r--r--docs/configuration/cheatsheet.md16
-rw-r--r--docs/configuration/static_dir.md65
-rw-r--r--docs/installation/alpine_linux_en.md3
-rw-r--r--docs/installation/arch_linux_en.md3
-rw-r--r--docs/installation/debian_based_en.md3
-rw-r--r--docs/installation/debian_based_jp.md3
-rw-r--r--docs/installation/freebsd_en.md210
-rw-r--r--docs/installation/gentoo_en.md3
-rw-r--r--docs/installation/migrating_from_source_otp_en.md48
-rw-r--r--docs/installation/netbsd_en.md1
-rw-r--r--docs/installation/openbsd_en.md3
-rw-r--r--docs/installation/openbsd_fi.md2
-rw-r--r--docs/installation/otp_en.md191
27 files changed, 898 insertions, 436 deletions
diff --git a/docs/API/admin_api.md b/docs/API/admin_api.md
index 4b143e4ee..c0ea074f0 100644
--- a/docs/API/admin_api.md
+++ b/docs/API/admin_api.md
@@ -313,31 +313,53 @@ Note: Available `:permission_group` is currently moderator and admin. 404 is ret
- On failure: `Not found`
- On success: JSON array of user's latest statuses
+## `GET /api/pleroma/admin/relay`
+
+### List Relays
+
+Params: none
+Response:
+
+* On success: JSON array of relays
+
+```json
+[
+ {"actor": "https://example.com/relay", "followed_back": true},
+ {"actor": "https://example2.com/relay", "followed_back": false}
+]
+```
+
## `POST /api/pleroma/admin/relay`
### Follow a Relay
-- Params:
- - `relay_url`
-- Response:
- - On success: URL of the followed relay
+Params:
+
+* `relay_url`
+
+Response:
+
+* On success: relay json object
+
+```json
+{"actor": "https://example.com/relay", "followed_back": true}
+```
## `DELETE /api/pleroma/admin/relay`
### Unfollow a Relay
-- Params:
- - `relay_url`
-- Response:
- - On success: URL of the unfollowed relay
+Params:
-## `GET /api/pleroma/admin/relay`
+* `relay_url`
-### List Relays
+Response:
-- Params: none
-- Response:
- - On success: JSON array of relays
+* On success: URL of the unfollowed relay
+
+```json
+{"https://example.com/relay"}
+```
## `POST /api/pleroma/admin/users/invite_token`
@@ -1266,11 +1288,14 @@ Loads json generated from `config/descriptions.exs`.
- Params:
- *optional* `page`: **integer** page number
- *optional* `page_size`: **integer** number of log entries per page (default is `50`)
+- *optional* `query`: **string** search term
- Response:
``` json
{
+ "page_size": integer,
+ "count": integer,
"urls": [
"http://example.com/media/a688346.jpg",
"http://example.com/media/fb1f4d.jpg"
@@ -1290,12 +1315,7 @@ Loads json generated from `config/descriptions.exs`.
- Response:
``` json
-{
- "urls": [
- "http://example.com/media/a688346.jpg",
- "http://example.com/media/fb1f4d.jpg"
- ]
-}
+{ }
```
@@ -1311,11 +1331,6 @@ Loads json generated from `config/descriptions.exs`.
- Response:
``` json
-{
- "urls": [
- "http://example.com/media/a688346.jpg",
- "http://example.com/media/fb1f4d.jpg"
- ]
-}
+{ }
```
diff --git a/docs/administration/CLI_tasks/config.md b/docs/administration/CLI_tasks/config.md
index cc32bf859..0923004b5 100644
--- a/docs/administration/CLI_tasks/config.md
+++ b/docs/administration/CLI_tasks/config.md
@@ -11,14 +11,17 @@
config :pleroma, configurable_from_database: true
```
-```sh tab="OTP"
- ./bin/pleroma_ctl config migrate_to_db
-```
+=== "OTP"
-```sh tab="From Source"
-mix pleroma.config migrate_to_db
-```
+ ```sh
+ ./bin/pleroma_ctl config migrate_to_db
+ ```
+
+=== "From Source"
+ ```sh
+ mix pleroma.config migrate_to_db
+ ```
## Transfer config from DB to `config/env.exported_from_db.secret.exs`
@@ -31,10 +34,12 @@ mix pleroma.config migrate_to_db
To delete transfered settings from database optional flag `-d` can be used. `<env>` is `prod` by default.
-```sh tab="OTP"
- ./bin/pleroma_ctl config migrate_from_db [--env=<env>] [-d]
-```
+=== "OTP"
+ ```sh
+ ./bin/pleroma_ctl config migrate_from_db [--env=<env>] [-d]
+ ```
-```sh tab="From Source"
-mix pleroma.config migrate_from_db [--env=<env>] [-d]
-```
+=== "From Source"
+ ```sh
+ mix pleroma.config migrate_from_db [--env=<env>] [-d]
+ ```
diff --git a/docs/administration/CLI_tasks/database.md b/docs/administration/CLI_tasks/database.md
index 647f6f274..6dca83167 100644
--- a/docs/administration/CLI_tasks/database.md
+++ b/docs/administration/CLI_tasks/database.md
@@ -9,13 +9,18 @@
Replaces embedded objects with references to them in the `objects` table. Only needs to be ran once if the instance was created before Pleroma 1.0.5. The reason why this is not a migration is because it could significantly increase the database size after being ran, however after this `VACUUM FULL` will be able to reclaim about 20% (really depends on what is in the database, your mileage may vary) of the db size before the migration.
-```sh tab="OTP"
-./bin/pleroma_ctl database remove_embedded_objects [option ...]
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl database remove_embedded_objects [option ...]
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.database remove_embedded_objects [option ...]
+ ```
-```sh tab="From Source"
-mix pleroma.database remove_embedded_objects [option ...]
-```
### Options
- `--vacuum` - run `VACUUM FULL` after the embedded objects are replaced with their references
@@ -27,13 +32,17 @@ This will prune remote posts older than 90 days (configurable with [`config :ple
!!! danger
The disk space will only be reclaimed after `VACUUM FULL`. You may run out of disk space during the execution of the task or vacuuming if you don't have about 1/3rds of the database size free.
-```sh tab="OTP"
-./bin/pleroma_ctl database prune_objects [option ...]
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl database prune_objects [option ...]
+ ```
+
+=== "From Source"
-```sh tab="From Source"
-mix pleroma.database prune_objects [option ...]
-```
+ ```sh
+ mix pleroma.database prune_objects [option ...]
+ ```
### Options
- `--vacuum` - run `VACUUM FULL` after the objects are pruned
@@ -42,33 +51,45 @@ mix pleroma.database prune_objects [option ...]
Can be safely re-run
-```sh tab="OTP"
-./bin/pleroma_ctl database bump_all_conversations
-```
+=== "OTP"
-```sh tab="From Source"
-mix pleroma.database bump_all_conversations
-```
+ ```sh
+ ./bin/pleroma_ctl database bump_all_conversations
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.database bump_all_conversations
+ ```
## Remove duplicated items from following and update followers count for all users
-```sh tab="OTP"
-./bin/pleroma_ctl database update_users_following_followers_counts
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl database update_users_following_followers_counts
+ ```
-```sh tab="From Source"
-mix pleroma.database update_users_following_followers_counts
-```
+=== "From Source"
+
+ ```sh
+ mix pleroma.database update_users_following_followers_counts
+ ```
## Fix the pre-existing "likes" collections for all objects
-```sh tab="OTP"
-./bin/pleroma_ctl database fix_likes_collections
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl database fix_likes_collections
+ ```
-```sh tab="From Source"
-mix pleroma.database fix_likes_collections
-```
+=== "From Source"
+
+ ```sh
+ mix pleroma.database fix_likes_collections
+ ```
## Vacuum the database
@@ -76,13 +97,17 @@ mix pleroma.database fix_likes_collections
Running an `analyze` vacuum job can improve performance by updating statistics used by the query planner. **It is safe to cancel this.**
-```sh tab="OTP"
-./bin/pleroma_ctl database vacuum analyze
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl database vacuum analyze
+ ```
+
+=== "From Source"
-```sh tab="From Source"
-mix pleroma.database vacuum analyze
-```
+ ```sh
+ mix pleroma.database vacuum analyze
+ ```
### Full
@@ -91,10 +116,28 @@ and more compact files with an optimized layout. This process will take a long t
it builds the files side-by-side the existing database files. It can make your database faster and use less disk space,
but should only be run if necessary. **It is safe to cancel this.**
-```sh tab="OTP"
-./bin/pleroma_ctl database vacuum full
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl database vacuum full
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.database vacuum full
+ ```
+
+## Add expiration to all local statuses
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl database ensure_expiration
+ ```
+
+=== "From Source"
-```sh tab="From Source"
-mix pleroma.database vacuum full
-``` \ No newline at end of file
+ ```sh
+ mix pleroma.database ensure_expiration
+ ```
diff --git a/docs/administration/CLI_tasks/digest.md b/docs/administration/CLI_tasks/digest.md
index 2eb31379e..a590581e3 100644
--- a/docs/administration/CLI_tasks/digest.md
+++ b/docs/administration/CLI_tasks/digest.md
@@ -4,22 +4,30 @@
## Send digest email since given date (user registration date by default) ignoring user activity status.
-```sh tab="OTP"
- ./bin/pleroma_ctl digest test <nickname> [since_date]
-```
+=== "OTP"
-```sh tab="From Source"
-mix pleroma.digest test <nickname> [since_date]
-```
+ ```sh
+ ./bin/pleroma_ctl digest test <nickname> [since_date]
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.digest test <nickname> [since_date]
+ ```
Example:
-```sh tab="OTP"
-./bin/pleroma_ctl digest test donaldtheduck 2019-05-20
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl digest test donaldtheduck 2019-05-20
+ ```
+
+=== "From Source"
-```sh tab="From Source"
-mix pleroma.digest test donaldtheduck 2019-05-20
-```
+ ```sh
+ mix pleroma.digest test donaldtheduck 2019-05-20
+ ```
diff --git a/docs/administration/CLI_tasks/email.md b/docs/administration/CLI_tasks/email.md
index 7b7a8457a..00d2e74f8 100644
--- a/docs/administration/CLI_tasks/email.md
+++ b/docs/administration/CLI_tasks/email.md
@@ -4,21 +4,29 @@
## Send test email (instance email by default)
-```sh tab="OTP"
- ./bin/pleroma_ctl email test [--to <destination email address>]
-```
+=== "OTP"
-```sh tab="From Source"
-mix pleroma.email test [--to <destination email address>]
-```
+ ```sh
+ ./bin/pleroma_ctl email test [--to <destination email address>]
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.email test [--to <destination email address>]
+ ```
Example:
-```sh tab="OTP"
-./bin/pleroma_ctl email test --to root@example.org
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl email test --to root@example.org
+ ```
+
+=== "From Source"
-```sh tab="From Source"
-mix pleroma.email test --to root@example.org
-```
+ ```sh
+ mix pleroma.email test --to root@example.org
+ ```
diff --git a/docs/administration/CLI_tasks/emoji.md b/docs/administration/CLI_tasks/emoji.md
index ddcb7e62c..e3d1b210e 100644
--- a/docs/administration/CLI_tasks/emoji.md
+++ b/docs/administration/CLI_tasks/emoji.md
@@ -4,13 +4,15 @@
## Lists emoji packs and metadata specified in the manifest
-```sh tab="OTP"
-./bin/pleroma_ctl emoji ls-packs [option ...]
-```
+=== "OTP"
+ ```sh
+ ./bin/pleroma_ctl emoji ls-packs [option ...]
+ ```
-```sh tab="From Source"
-mix pleroma.emoji ls-packs [option ...]
-```
+=== "From Source"
+ ```sh
+ mix pleroma.emoji ls-packs [option ...]
+ ```
### Options
@@ -18,26 +20,30 @@ mix pleroma.emoji ls-packs [option ...]
## Fetch, verify and install the specified packs from the manifest into `STATIC-DIR/emoji/PACK-NAME`
-```sh tab="OTP"
-./bin/pleroma_ctl emoji get-packs [option ...] <pack ...>
-```
+=== "OTP"
+ ```sh
+ ./bin/pleroma_ctl emoji get-packs [option ...] <pack ...>
+ ```
-```sh tab="From Source"
-mix pleroma.emoji get-packs [option ...] <pack ...>
-```
+=== "From Source"
+ ```sh
+ mix pleroma.emoji get-packs [option ...] <pack ...>
+ ```
### Options
- `-m, --manifest PATH/URL` - same as [`ls-packs`](#ls-packs)
## Create a new manifest entry and a file list from the specified remote pack file
-```sh tab="OTP"
-./bin/pleroma_ctl emoji gen-pack PACK-URL
-```
+=== "OTP"
+ ```sh
+ ./bin/pleroma_ctl emoji gen-pack PACK-URL
+ ```
-```sh tab="From Source"
-mix pleroma.emoji gen-pack PACK-URL
-```
+=== "From Source"
+ ```sh
+ mix pleroma.emoji gen-pack PACK-URL
+ ```
Currently, only .zip archives are recognized as remote pack files and packs are therefore assumed to be zip archives. This command is intended to run interactively and will first ask you some basic questions about the pack, then download the remote file and generate an SHA256 checksum for it, then generate an emoji file list for you.
@@ -47,8 +53,9 @@ Currently, only .zip archives are recognized as remote pack files and packs are
## Reload emoji packs
-```sh tab="OTP"
-./bin/pleroma_ctl emoji reload
-```
+=== "OTP"
+ ```sh
+ ./bin/pleroma_ctl emoji reload
+ ```
This command only works with OTP releases.
diff --git a/docs/administration/CLI_tasks/instance.md b/docs/administration/CLI_tasks/instance.md
index 52e264bb1..989ecc55d 100644
--- a/docs/administration/CLI_tasks/instance.md
+++ b/docs/administration/CLI_tasks/instance.md
@@ -3,13 +3,17 @@
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
## Generate a new configuration file
-```sh tab="OTP"
- ./bin/pleroma_ctl instance gen [option ...]
-```
+=== "OTP"
-```sh tab="From Source"
-mix pleroma.instance gen [option ...]
-```
+ ```sh
+ ./bin/pleroma_ctl instance gen [option ...]
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.instance gen [option ...]
+ ```
If any of the options are left unspecified, you will be prompted interactively.
diff --git a/docs/administration/CLI_tasks/oauth_app.md b/docs/administration/CLI_tasks/oauth_app.md
index 4d6bfc25a..f0568491e 100644
--- a/docs/administration/CLI_tasks/oauth_app.md
+++ b/docs/administration/CLI_tasks/oauth_app.md
@@ -7,10 +7,14 @@
Optional params:
* `-s SCOPES` - scopes for app, e.g. `read,write,follow,push`.
-```sh tab="OTP"
- ./bin/pleroma_ctl app create -n APP_NAME -r REDIRECT_URI
-```
+=== "OTP"
-```sh tab="From Source"
-mix pleroma.app create -n APP_NAME -r REDIRECT_URI
-``` \ No newline at end of file
+ ```sh
+ ./bin/pleroma_ctl app create -n APP_NAME -r REDIRECT_URI
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.app create -n APP_NAME -r REDIRECT_URI
+ ``` \ No newline at end of file
diff --git a/docs/administration/CLI_tasks/relay.md b/docs/administration/CLI_tasks/relay.md
index c4f078f4d..bdd7e8be4 100644
--- a/docs/administration/CLI_tasks/relay.md
+++ b/docs/administration/CLI_tasks/relay.md
@@ -4,30 +4,42 @@
## Follow a relay
-```sh tab="OTP"
-./bin/pleroma_ctl relay follow <relay_url>
-```
+=== "OTP"
-```sh tab="From Source"
-mix pleroma.relay follow <relay_url>
-```
+ ```sh
+ ./bin/pleroma_ctl relay follow <relay_url>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.relay follow <relay_url>
+ ```
## Unfollow a remote relay
-```sh tab="OTP"
-./bin/pleroma_ctl relay unfollow <relay_url>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl relay unfollow <relay_url>
+ ```
-```sh tab="From Source"
-mix pleroma.relay unfollow <relay_url>
-```
+=== "From Source"
+
+ ```sh
+ mix pleroma.relay unfollow <relay_url>
+ ```
## List relay subscriptions
-```sh tab="OTP"
-./bin/pleroma_ctl relay list
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl relay list
+ ```
+
+=== "From Source"
-```sh tab="From Source"
-mix pleroma.relay list
-```
+ ```sh
+ mix pleroma.relay list
+ ```
diff --git a/docs/administration/CLI_tasks/release_environments.md b/docs/administration/CLI_tasks/release_environments.md
deleted file mode 100644
index 36ab43864..000000000
--- a/docs/administration/CLI_tasks/release_environments.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# Generate release environment file
-
-```sh tab="OTP"
- ./bin/pleroma_ctl release_env gen
-```
-
-```sh tab="From Source"
-mix pleroma.release_env gen
-```
diff --git a/docs/administration/CLI_tasks/robots_txt.md b/docs/administration/CLI_tasks/robots_txt.md
new file mode 100644
index 000000000..7eeedf571
--- /dev/null
+++ b/docs/administration/CLI_tasks/robots_txt.md
@@ -0,0 +1,21 @@
+# Managing robots.txt
+
+{! backend/administration/CLI_tasks/general_cli_task_info.include !}
+
+## Generate a new robots.txt file and add it to the static directory
+
+The `robots.txt` that ships by default is permissive. It allows well-behaved search engines to index all of your instance's URIs.
+
+If you want to generate a restrictive `robots.txt`, you can run the following mix task. The generated `robots.txt` will be written in your instance [static directory](../../../configuration/static_dir/).
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl robots_txt disallow_all
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.robots_txt disallow_all
+ ```
diff --git a/docs/administration/CLI_tasks/uploads.md b/docs/administration/CLI_tasks/uploads.md
index 6a15d22f6..8585ec76b 100644
--- a/docs/administration/CLI_tasks/uploads.md
+++ b/docs/administration/CLI_tasks/uploads.md
@@ -3,13 +3,17 @@
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
## Migrate uploads from local to remote storage
-```sh tab="OTP"
- ./bin/pleroma_ctl uploads migrate_local <target_uploader> [option ...]
-```
+=== "OTP"
-```sh tab="From Source"
-mix pleroma.uploads migrate_local <target_uploader> [option ...]
-```
+ ```sh
+ ./bin/pleroma_ctl uploads migrate_local <target_uploader> [option ...]
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.uploads migrate_local <target_uploader> [option ...]
+ ```
### Options
- `--delete` - delete local uploads after migrating them to the target uploader
diff --git a/docs/administration/CLI_tasks/user.md b/docs/administration/CLI_tasks/user.md
index 3b4c421a7..3e7f028ba 100644
--- a/docs/administration/CLI_tasks/user.md
+++ b/docs/administration/CLI_tasks/user.md
@@ -4,13 +4,17 @@
## Create a user
-```sh tab="OTP"
-./bin/pleroma_ctl user new <nickname> <email> [option ...]
-```
+=== "OTP"
-```sh tab="From Source"
-mix pleroma.user new <nickname> <email> [option ...]
-```
+ ```sh
+ ./bin/pleroma_ctl user new <nickname> <email> [option ...]
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user new <nickname> <email> [option ...]
+ ```
### Options
@@ -22,23 +26,33 @@ mix pleroma.user new <nickname> <email> [option ...]
- `-y`, `--assume-yes`/`--no-assume-yes` - whether to assume yes to all questions
## List local users
-```sh tab="OTP"
- ./bin/pleroma_ctl user list
-```
-```sh tab="From Source"
-mix pleroma.user list
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user list
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user list
+ ```
## Generate an invite link
-```sh tab="OTP"
- ./bin/pleroma_ctl user invite [option ...]
-```
-```sh tab="From Source"
-mix pleroma.user invite [option ...]
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user invite [option ...]
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user invite [option ...]
+ ```
### Options
@@ -46,113 +60,168 @@ mix pleroma.user invite [option ...]
- `--max-use NUMBER` - maximum numbers of token uses
## List generated invites
-```sh tab="OTP"
- ./bin/pleroma_ctl user invites
-```
-```sh tab="From Source"
-mix pleroma.user invites
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user invites
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user invites
+ ```
## Revoke invite
-```sh tab="OTP"
- ./bin/pleroma_ctl user revoke_invite <token>
-```
-```sh tab="From Source"
-mix pleroma.user revoke_invite <token>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user revoke_invite <token>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user revoke_invite <token>
+ ```
## Delete a user
-```sh tab="OTP"
- ./bin/pleroma_ctl user rm <nickname>
-```
-```sh tab="From Source"
-mix pleroma.user rm <nickname>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user rm <nickname>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user rm <nickname>
+ ```
## Delete user's posts and interactions
-```sh tab="OTP"
- ./bin/pleroma_ctl user delete_activities <nickname>
-```
-```sh tab="From Source"
-mix pleroma.user delete_activities <nickname>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user delete_activities <nickname>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user delete_activities <nickname>
+ ```
## Sign user out from all applications (delete user's OAuth tokens and authorizations)
-```sh tab="OTP"
- ./bin/pleroma_ctl user sign_out <nickname>
-```
-```sh tab="From Source"
-mix pleroma.user sign_out <nickname>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user sign_out <nickname>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user sign_out <nickname>
+ ```
## Deactivate or activate a user
-```sh tab="OTP"
- ./bin/pleroma_ctl user toggle_activated <nickname>
-```
-```sh tab="From Source"
-mix pleroma.user toggle_activated <nickname>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user toggle_activated <nickname>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user toggle_activated <nickname>
+ ```
## Deactivate a user and unsubscribes local users from the user
-```sh tab="OTP"
- ./bin/pleroma_ctl user deactivate NICKNAME
-```
-```sh tab="From Source"
-mix pleroma.user deactivate NICKNAME
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user deactivate NICKNAME
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user deactivate NICKNAME
+ ```
## Deactivate all accounts from an instance and unsubscribe local users on it
-```sh tab="OTP"
- ./bin/pleroma_ctl user deactivate_all_from_instance <instance>
-```
-```sh tab="From Source"
-mix pleroma.user deactivate_all_from_instance <instance>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user deactivate_all_from_instance <instance>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user deactivate_all_from_instance <instance>
+ ```
## Create a password reset link for user
-```sh tab="OTP"
- ./bin/pleroma_ctl user reset_password <nickname>
-```
-```sh tab="From Source"
-mix pleroma.user reset_password <nickname>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user reset_password <nickname>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user reset_password <nickname>
+ ```
## Disable Multi Factor Authentication (MFA/2FA) for a user
-```sh tab="OTP"
- ./bin/pleroma_ctl user reset_mfa <nickname>
-```
-```sh tab="From Source"
-mix pleroma.user reset_mfa <nickname>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user reset_mfa <nickname>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user reset_mfa <nickname>
+ ```
## Set the value of the given user's settings
-```sh tab="OTP"
- ./bin/pleroma_ctl user set <nickname> [option ...]
-```
-```sh tab="From Source"
-mix pleroma.user set <nickname> [option ...]
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user set <nickname> [option ...]
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user set <nickname> [option ...]
+ ```
### Options
- `--locked`/`--no-locked` - whether the user should be locked
@@ -160,30 +229,45 @@ mix pleroma.user set <nickname> [option ...]
- `--admin`/`--no-admin` - whether the user should be an admin
## Add tags to a user
-```sh tab="OTP"
- ./bin/pleroma_ctl user tag <nickname> <tags>
-```
-```sh tab="From Source"
-mix pleroma.user tag <nickname> <tags>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user tag <nickname> <tags>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user tag <nickname> <tags>
+ ```
## Delete tags from a user
-```sh tab="OTP"
- ./bin/pleroma_ctl user untag <nickname> <tags>
-```
-```sh tab="From Source"
-mix pleroma.user untag <nickname> <tags>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user untag <nickname> <tags>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user untag <nickname> <tags>
+ ```
## Toggle confirmation status of the user
-```sh tab="OTP"
- ./bin/pleroma_ctl user toggle_confirmed <nickname>
-```
-```sh tab="From Source"
-mix pleroma.user toggle_confirmed <nickname>
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user toggle_confirmed <nickname>
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user toggle_confirmed <nickname>
+ ```
diff --git a/docs/clients.md b/docs/clients.md
index 2a42c659f..f84295b1f 100644
--- a/docs/clients.md
+++ b/docs/clients.md
@@ -6,11 +6,11 @@ Feel free to contact us to be added to this list!
### Roma for Desktop
- Homepage: <https://www.pleroma.com/#desktopApp>
- Source Code: <https://github.com/roma-apps/roma-desktop>
-- Platforms: Windows, Mac, (Linux?)
+- Platforms: Windows, Mac, Linux
- Features: Streaming Ready
### Social
-- Source Code: <https://gitlab.gnome.org/BrainBlasted/Social>
+- Source Code: <https://gitlab.gnome.org/World/Social>
- Contact: [@brainblasted@social.libre.fi](https://social.libre.fi/users/brainblasted)
- Platforms: Linux (GNOME)
- Note(2019-01-28): Not at a pre-alpha stage yet
@@ -35,7 +35,7 @@ Feel free to contact us to be added to this list!
- Source Code: <https://framagit.org/tom79/fedilab/>
- Contact: [@fedilab@framapiaf.org](https://framapiaf.org/users/fedilab)
- Platforms: Android
-- Features: Streaming Ready, Moderation, Text Formatting
+- Features: Streaming Ready, Moderation, Text Formatting
### Kyclos
- Source Code: <https://git.pleroma.social/pleroma/harbour-kyclos>
@@ -48,16 +48,9 @@ Feel free to contact us to be added to this list!
- Platforms: Android
- Features: No Streaming, Emoji Reactions, Text Formatting, FE Stickers
-### Nekonium
-- Homepage: [F-Droid Repository](https://repo.gdgd.jp.net/), [Google Play](https://play.google.com/store/apps/details?id=com.apps.nekonium), [Amazon](https://www.amazon.co.jp/dp/B076FXPRBC/)
-- Source: <https://gogs.gdgd.jp.net/lin/nekonium>
-- Contact: [@lin@pleroma.gdgd.jp.net](https://pleroma.gdgd.jp.net/users/lin)
-- Platforms: Android
-- Features: Streaming Ready
-
### Fedi
- Homepage: <https://www.fediapp.com/>
-- Source Code: Proprietary, but free
+- Source Code: Proprietary, but gratis
- Platforms: iOS, Android
- Features: Pleroma-specific features like Reactions
@@ -70,9 +63,9 @@ Feel free to contact us to be added to this list!
### Twidere
- Homepage: <https://twidere.mariotaku.org/>
-- Source Code: <https://github.com/TwidereProject/Twidere-Android/>, <https://github.com/TwidereProject/Twidere-iOS/>
+- Source Code: <https://github.com/TwidereProject/Twidere-Android/>
- Contact: <me@mariotaku.org>
-- Platform: Android, iOS
+- Platform: Android
- Features: No Streaming
### Indigenous
@@ -89,11 +82,6 @@ Feel free to contact us to be added to this list!
- Contact: [@gcupc@glitch.social](https://glitch.social/users/gcupc)
- Features: No Streaming
-### Feather
-- Source Code: <https://github.com/kaniini/feather>
-- Contact: [@kaniini@pleroma.site](https://pleroma.site/kaniini)
-- Features: No Streaming
-
### Halcyon
- Source Code: <https://notabug.org/halcyon-suite/halcyon>
- Contact: [@halcyon@social.csswg.org](https://social.csswg.org/users/halcyon)
@@ -107,6 +95,15 @@ Feel free to contact us to be added to this list!
- Features: No Streaming
### Sengi
+- Homepage: <https://nicolasconstant.github.io/sengi/>
- Source Code: <https://github.com/NicolasConstant/sengi>
- Contact: [@sengi_app@mastodon.social](https://mastodon.social/users/sengi_app)
-- Note(2019-01-28): The development is currently in a early stage.
+
+### DashFE
+- Source Code: <https://notabug.org/daisuke/DashboardFE>
+- Contact: [@dashfe@stereophonic.space](https://stereophonic.space/users/dashfe)
+
+### BloatFE
+- Source Code: <https://git.freesoftwareextremist.com/bloat/>
+- Contact: [@r@freesoftwareextremist.com](https://freesoftwareextremist.com/users/r)
+- Features: Does not requires JavaScript
diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md
index 4645860b7..a09d6b6b2 100644
--- a/docs/configuration/cheatsheet.md
+++ b/docs/configuration/cheatsheet.md
@@ -38,8 +38,8 @@ To add configuration to your config file, you can copy it from the base config.
* `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.
-* `public`: Makes the client API in authenticated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. See also: `restrict_unauthenticated`.
-* `quarantined_instances`: List of ActivityPub instances where private(DMs, followers-only) activities will not be send.
+* `public`: Makes the client API in authenticated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. Note that there is a dependent setting restricting or allowing unauthenticated access to specific resources, see `restrict_unauthenticated` for more details.
+* `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 [:frontend_configurations](#frontend_configurations) or in ``static/config.json``.
* `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML).
* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with
@@ -114,6 +114,7 @@ To add configuration to your config file, you can copy it from the base config.
* `Pleroma.Web.ActivityPub.MRF.MentionPolicy`: Drops posts mentioning configurable users. (See [`:mrf_mention`](#mrf_mention)).
* `Pleroma.Web.ActivityPub.MRF.VocabularyPolicy`: Restricts activities to a configured set of vocabulary. (See [`:mrf_vocabulary`](#mrf_vocabulary)).
* `Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy`: Rejects or delists posts based on their age when received. (See [`:mrf_object_age`](#mrf_object_age)).
+ * `Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy`: Sets a default expiration on all posts made by users of the local instance. Requires `Pleroma.ActivityExpiration` to be enabled for processing the scheduled delections.
* `transparency`: Make the content of your Message Rewrite Facility settings public (via nodeinfo).
* `transparency_exclusions`: Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.
@@ -220,6 +221,8 @@ config :pleroma, :mrf_user_allowlist, %{
## Pleroma.ActivityExpiration
+Enables the worker which processes posts scheduled for deletion. Pinned posts are exempt from expiration.
+
* `enabled`: whether expired activities will be sent to the job queue to be deleted
## Frontends
@@ -549,6 +552,7 @@ the source code is here: [kocaptcha](https://github.com/koto-bank/kocaptcha). Th
* `proxy_remote`: If you're using a remote uploader, Pleroma will proxy media requests instead of redirecting to it.
* `proxy_opts`: Proxy options, see `Pleroma.ReverseProxy` documentation.
* `filename_display_max_length`: Set max length of a filename to display. 0 = no limit. Default: 30.
+* `default_description`: Sets which default description an image has if none is set explicitly. Options: nil (default) - Don't set a default, :filename - use the filename of the file, a string (e.g. "attachment") - Use this string
!!! warning
`strip_exif` has been replaced by `Pleroma.Upload.Filter.Mogrify`.
@@ -858,9 +862,6 @@ Warning: it's discouraged to use this feature because of the associated security
### :auth
-* `Pleroma.Web.Auth.PleromaAuthenticator`: default database authenticator.
-* `Pleroma.Web.Auth.LDAPAuthenticator`: LDAP authentication.
-
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`.
@@ -890,6 +891,9 @@ Pleroma account will be created with the same name as the LDAP user name.
* `base`: LDAP base, e.g. "dc=example,dc=com"
* `uid`: LDAP attribute name to authenticate the user, e.g. when "cn", the filter will be "cn=username,base"
+Note, if your LDAP server is an Active Directory server the correct value is commonly `uid: "cn"`, but if you use an
+OpenLDAP server the value may be `uid: "uid"`.
+
### OAuth consumer mode
OAuth consumer mode allows sign in / sign up via external OAuth providers (e.g. Twitter, Facebook, Google, Microsoft, etc.).
@@ -1048,6 +1052,8 @@ Restrict access for unauthenticated users to timelines (public and federated), u
* `local`
* `remote`
+Note: when `:instance, :public` is set to `false`, all `:restrict_unauthenticated` items be effectively set to `true` by default. If you'd like to allow unauthenticated access to specific API endpoints on a private instance, please explicitly set `:restrict_unauthenticated` to non-default value in `config/prod.secret.exs`.
+
Note: setting `restrict_unauthenticated/timelines/local` to `true` has no practical sense if `restrict_unauthenticated/timelines/federated` is set to `false` (since local public activities will still be delivered to unauthenticated users as part of federated timeline).
## Pleroma.Web.ApiSpec.CastAndValidate
diff --git a/docs/configuration/static_dir.md b/docs/configuration/static_dir.md
index 5fb38c3de..8ac07b725 100644
--- a/docs/configuration/static_dir.md
+++ b/docs/configuration/static_dir.md
@@ -1,45 +1,61 @@
# Static Directory
-Static frontend files are shipped in `priv/static/` and tracked by version control in this repository. If you want to overwrite or update these without the possibility of merge conflicts, you can write your custom versions to `instance/static/`.
+Static frontend files are shipped with pleroma. If you want to overwrite or update these without problems during upgrades, you can write your custom versions to the static directory.
-```
-config :pleroma, :instance,
- static_dir: "instance/static/",
-```
+You can find the location of the static directory in the [configuration](../cheatsheet/#instance).
+
+=== "OTP"
-For example, edit `instance/static/instance/panel.html` .
+ ```elixir
+ config :pleroma, :instance,
+ static_dir: "/var/lib/pleroma/static/"
+ ```
+
+=== "From Source"
+
+ ```elixir
+ config :pleroma, :instance,
+ static_dir: "instance/static/"
+ ```
Alternatively, you can overwrite this value in your configuration to use a different static instance directory.
-This document is written assuming `instance/static/`.
+This document is written using `$static_dir` as the value of the `config :pleroma, :instance, static_dir` setting.
-Or, if you want to manage your custom file in git repository, basically remove the `instance/` entry from `.gitignore`.
+If you use a From Source installation and want to manage your custom files in the git repository, you can remove the `instance/` entry from `.gitignore`.
## robots.txt
-By default, the `robots.txt` that ships in `priv/static/` is permissive. It allows well-behaved search engines to index all of your instance's URIs.
+There's a mix tasks to [generate a new robot.txt](../../administration/CLI_tasks/robots_txt/).
+
+For more complex things, you can write your own robots.txt to `$static_dir/robots.txt`.
-If you want to generate a restrictive `robots.txt`, you can run the following mix task. The generated `robots.txt` will be written in your instance static directory.
+E.g. if you want to block all crawlers except for [fediverse.network](https://fediverse.network/about) you can use
```
-mix pleroma.robots_txt disallow_all
+User-Agent: *
+Disallow: /
+
+User-Agent: crawler-us-il-1.fediverse.network
+Allow: /
+
+User-Agent: makhnovtchina.random.sh
+Allow: /
```
## Thumbnail
-Put on `instance/static/instance/thumbnail.jpeg` with your selfie or other neat picture. It will appear in [Pleroma Instances](http://distsn.org/pleroma-instances.html).
+Add `$static_dir/instance/thumbnail.jpeg` with your selfie or other neat picture. It will be available on `http://your-domain.tld/instance/thumbnail.jpeg` and can be used by external applications.
## Instance-specific panel
-![instance-specific panel demo](/uploads/296b19ec806b130e0b49b16bfe29ce8a/image.png)
-
-Create and Edit your file on `instance/static/instance/panel.html`.
+Create and Edit your file at `$static_dir/instance/panel.html`.
## Background
-You can change the background of your Pleroma instance by uploading it to `instance/static/`, and then changing `background` in `config/prod.secret.exs` accordingly.
+You can change the background of your Pleroma instance by uploading it to `$static_dir/`, and then changing `background` in [your configuration](../cheatsheet/#frontend_configurations) accordingly.
-If you put `instance/static/images/background.jpg`
+E.g. if you put `$static_dir/images/background.jpg`
```
config :pleroma, :frontend_configurations,
@@ -50,12 +66,14 @@ config :pleroma, :frontend_configurations,
## Logo
-![logo modification demo](/uploads/c70b14de60fa74245e7f0dcfa695ebff/image.png)
+!!! important
+ Note the extra `static` folder for the default logo.png location
-If you want to give a brand to your instance, You can change the logo of your instance by uploading it to `instance/static/`.
+If you want to give a brand to your instance, You can change the logo of your instance by uploading it to the static directory `$static_dir/static/logo.png`.
-Alternatively, you can specify the path with config.
-If you put `instance/static/static/mylogo-file.png`
+Alternatively, you can specify the path to your logo in [your configuration](../cheatsheet/#frontend_configurations).
+
+E.g. if you put `$static_dir/static/mylogo-file.png`
```
config :pleroma, :frontend_configurations,
@@ -66,4 +84,7 @@ config :pleroma, :frontend_configurations,
## Terms of Service
-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 changing `instance/static/static/terms-of-service.html`.
+!!! important
+ 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`.
diff --git a/docs/installation/alpine_linux_en.md b/docs/installation/alpine_linux_en.md
index c726d559f..a5683f18c 100644
--- a/docs/installation/alpine_linux_en.md
+++ b/docs/installation/alpine_linux_en.md
@@ -14,6 +14,7 @@ It assumes that you have administrative rights, either as root or a user with [s
* `erlang-xmerl`
* `git`
* Development Tools
+* `cmake`
#### Optional packages used in this guide
@@ -39,7 +40,7 @@ sudo apk upgrade
* Install some tools, which are needed later:
```shell
-sudo apk add git build-base
+sudo apk add git build-base cmake
```
### Install Elixir and Erlang
diff --git a/docs/installation/arch_linux_en.md b/docs/installation/arch_linux_en.md
index bf9cfb488..7fb69dd60 100644
--- a/docs/installation/arch_linux_en.md
+++ b/docs/installation/arch_linux_en.md
@@ -9,6 +9,7 @@ This guide will assume that you have administrative rights, either as root or a
* `elixir`
* `git`
* `base-devel`
+* `cmake`
#### Optional packages used in this guide
@@ -26,7 +27,7 @@ sudo pacman -Syu
* Install some of the above mentioned programs:
```shell
-sudo pacman -S git base-devel elixir
+sudo pacman -S git base-devel elixir cmake
```
### Install PostgreSQL
diff --git a/docs/installation/debian_based_en.md b/docs/installation/debian_based_en.md
index 8ae5044b5..60c2f47e5 100644
--- a/docs/installation/debian_based_en.md
+++ b/docs/installation/debian_based_en.md
@@ -12,6 +12,7 @@ This guide will assume you are on Debian Stretch. This guide should also work wi
* `erlang-nox`
* `git`
* `build-essential`
+* `cmake`
#### Optional packages used in this guide
@@ -30,7 +31,7 @@ sudo apt full-upgrade
* Install some of the above mentioned programs:
```shell
-sudo apt install git build-essential postgresql postgresql-contrib
+sudo apt install git build-essential postgresql postgresql-contrib cmake
```
### Install Elixir and Erlang
diff --git a/docs/installation/debian_based_jp.md b/docs/installation/debian_based_jp.md
index 42e91cda7..c2dd840d3 100644
--- a/docs/installation/debian_based_jp.md
+++ b/docs/installation/debian_based_jp.md
@@ -16,6 +16,7 @@
- `erlang-nox`
- `git`
- `build-essential`
+- `cmake`
#### このガイドで利用している追加パッケージ
@@ -32,7 +33,7 @@ sudo apt full-upgrade
* 上記に挙げたパッケージをインストールしておきます。
```
-sudo apt install git build-essential postgresql postgresql-contrib
+sudo apt install git build-essential postgresql postgresql-contrib cmake
```
diff --git a/docs/installation/freebsd_en.md b/docs/installation/freebsd_en.md
new file mode 100644
index 000000000..130d68766
--- /dev/null
+++ b/docs/installation/freebsd_en.md
@@ -0,0 +1,210 @@
+# Installing on FreeBSD
+
+This document was written for FreeBSD 12.1, but should be work on future releases.
+
+## Required software
+
+This assumes the target system has `pkg(8)`.
+
+```
+# pkg install elixir postgresql12-server postgresql12-client postgresql12-contrib git-lite sudo nginx gmake acme.sh
+```
+
+Copy the rc.d scripts to the right directory:
+
+Setup the required services to automatically start at boot, using `sysrc(8)`.
+
+```
+# sysrc nginx_enable=YES
+# sysrc postgresql_enable=YES
+```
+
+## Initialize postgres
+
+```
+# service postgresql initdb
+# service postgresql start
+```
+
+## Configuring Pleroma
+
+Create a user for Pleroma:
+
+```
+# pw add user pleroma -m
+# echo 'export LC_ALL="en_US.UTF-8"' >> /home/pleroma/.profile
+# su -l pleroma
+```
+
+Clone the repository:
+
+```
+$ cd $HOME # Should be the same as /home/pleroma
+$ git clone -b stable https://git.pleroma.social/pleroma/pleroma.git
+```
+
+Configure Pleroma. Note that you need a domain name at this point:
+
+```
+$ cd /home/pleroma/pleroma
+$ mix deps.get # Enter "y" when asked to install Hex
+$ mix pleroma.instance gen # You will be asked a few questions here.
+$ cp config/generated_config.exs config/prod.secret.exs
+```
+
+Since Postgres is configured, we can now initialize the database. There should
+now be a file in `config/setup_db.psql` that makes this easier. Edit it, and
+*change the password* to a password of your choice. Make sure it is secure, since
+it'll be protecting your database. As root, you can now initialize the database:
+
+```
+# cd /home/pleroma/pleroma
+# sudo -Hu postgres -g postgres psql -f config/setup_db.psql
+```
+
+Postgres allows connections from all users without a password by default. To
+fix this, edit `/var/db/postgres/data12/pg_hba.conf`. Change every `trust` to
+`password`.
+
+Once this is done, restart Postgres with:
+```
+# service postgresql restart
+```
+
+Run the database migrations.
+
+Back as the pleroma user, run the following to implement any database migrations.
+
+```
+# su -l pleroma
+$ cd /home/pleroma/pleroma
+$ MIX_ENV=prod mix ecto.migrate
+```
+
+You will need to do this whenever you update with `git pull`:
+
+## Configuring acme.sh
+
+We'll be using acme.sh in Stateless Mode for TLS certificate renewal.
+
+First, as root, allow the user `acme` to have access to the acme log file, as follows:
+
+```
+# touch /var/log/acme.sh.log
+# chown acme:acme /var/log/acme.sh.log
+# chmod 600 /var/log/acme.sh.log
+```
+
+Next, obtain your account fingerprint:
+
+```
+# sudo -Hu acme -g acme acme.sh --register-account
+```
+
+You need to add the following to your nginx configuration for the server
+running on port 80:
+
+```
+ location ~ ^/\.well-known/acme-challenge/([-_a-zA-Z0-9]+)$ {
+ default_type text/plain;
+ return 200 "$1.6fXAG9VyG0IahirPEU2ZerUtItW2DHzDzD9wZaEKpqd";
+ }
+```
+
+Replace the string after after `$1.` with your fingerprint.
+
+Start nginx:
+
+```
+# service nginx start
+```
+
+It should now be possible to issue a cert (replace `example.com`
+with your domain name):
+
+```
+# sudo -Hu acme -g acme acme.sh --issue -d example.com --stateless
+```
+
+Let's add auto-renewal to `/etc/crontab`
+(replace `example.com` with your domain):
+
+```
+/usr/local/bin/sudo -Hu acme -g acme /usr/local/sbin/acme.sh -r -d example.com --stateless
+```
+
+### Configuring nginx
+
+FreeBSD's default nginx configuration does not contain an include directive, which is
+typically used for multiple sites. Therefore, you will need to first create the required
+directory as follows:
+
+
+```
+# mkdir -p /usr/local/etc/nginx/sites-available
+```
+
+Next, add an `include` directive to `/usr/local/etc/nginx/nginx.conf`, within the `http {}`
+block, as follows:
+
+
+```
+http {
+...
+ include /usr/local/etc/nginx/sites-available/*;
+}
+```
+
+As root, copy `/home/pleroma/pleroma/installation/pleroma.nginx` to
+`/usr/local/etc/nginx/sites-available/pleroma.nginx`.
+
+Edit the defaults of `/usr/local/etc/nginx/sites-available/pleroma.nginx`:
+
+* Change `ssl_trusted_certificate` to `/var/db/acme/certs/example.tld/example.tld.cer`.
+* Change `ssl_certificate` to `/var/db/acme/certs/example.tld/fullchain.cer`.
+* Change `ssl_certificate_key` to `/var/db/acme/certs/example.tld/example.tld.key`.
+* Change all references of `example.tld` to your instance's domain name.
+
+## Creating a startup script for Pleroma
+
+Pleroma will need to compile when it initially starts, which typically takes a longer
+period of time. Therefore, it is good practice to initially run pleroma from the
+command-line before utilizing the rc.d script. That is done as follows:
+
+```
+# su -l pleroma
+$ cd $HOME/pleroma
+$ MIX_ENV=prod mix phx.server
+```
+
+Copy the startup script to the correct location and make sure it's executable:
+
+```
+# cp /home/pleroma/pleroma/installation/freebsd/rc.d/pleroma /usr/local/etc/rc.d/pleroma
+# chmod +x /usr/local/etc/rc.d/pleroma
+```
+
+Update the `/etc/rc.conf` and start pleroma with the following commands:
+
+```
+# sysrc pleroma_enable=YES
+# service pleroma start
+```
+
+#### Create your first user
+
+If your instance is up and running, you can create your first user with administrative rights with the following task:
+
+```shell
+sudo -Hu pleroma MIX_ENV=prod mix pleroma.user new <username> <your@emailaddress> --admin
+```
+## Conclusion
+
+Restart nginx with `# service nginx restart` and you should be up and running.
+
+Make sure your time is in sync, or other instances will receive your posts with
+incorrect timestamps. You should have ntpd running.
+
+## Questions
+
+Questions about the installation or didn’t it work as it should be, ask in [#pleroma:matrix.org](https://matrix.heldscal.la/#/room/#freenode_#pleroma:matrix.org) or IRC Channel **#pleroma** on **Freenode**.
diff --git a/docs/installation/gentoo_en.md b/docs/installation/gentoo_en.md
index 32152aea7..5a676380c 100644
--- a/docs/installation/gentoo_en.md
+++ b/docs/installation/gentoo_en.md
@@ -28,6 +28,7 @@ Gentoo quite pointedly does not come with a cron daemon installed, and as such i
* `dev-db/postgresql`
* `dev-lang/elixir`
* `dev-vcs/git`
+* `dev-util/cmake`
#### Optional ebuilds used in this guide
@@ -46,7 +47,7 @@ Gentoo quite pointedly does not come with a cron daemon installed, and as such i
* Emerge all required the required and suggested software in one go:
```shell
- # emerge --ask dev-db/postgresql dev-lang/elixir dev-vcs/git www-servers/nginx app-crypt/certbot app-crypt/certbot-nginx
+ # emerge --ask dev-db/postgresql dev-lang/elixir dev-vcs/git www-servers/nginx app-crypt/certbot app-crypt/certbot-nginx dev-util/cmake
```
If you would not like to install the optional packages, remove them from this line.
diff --git a/docs/installation/migrating_from_source_otp_en.md b/docs/installation/migrating_from_source_otp_en.md
index 31c2f1294..d303a6daf 100644
--- a/docs/installation/migrating_from_source_otp_en.md
+++ b/docs/installation/migrating_from_source_otp_en.md
@@ -8,13 +8,15 @@ You will be running commands as root. If you aren't root already, please elevate
The system needs to have `curl` and `unzip` installed for downloading and unpacking release builds.
-```sh tab="Alpine"
-apk add curl unzip
-```
+=== "Alpine"
+ ```sh
+ apk add curl unzip
+ ```
-```sh tab="Debian/Ubuntu"
-apt install curl unzip
-```
+=== "Debian/Ubuntu"
+ ```sh
+ apt install 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.
@@ -110,27 +112,29 @@ OTP releases have different service files than from-source installs so they need
**Warning:** The service files assume pleroma user's home directory is `/opt/pleroma`, please make sure all paths fit your installation.
-```sh tab="Alpine"
-# Copy the service into a proper directory
-cp -f ~pleroma/installation/init.d/pleroma /etc/init.d/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
-```
+ # Start pleroma
+ rc-service pleroma start
+ ```
-```sh tab="Debian/Ubuntu"
-# Copy the service into a proper directory
-cp ~pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
+=== "Debian/Ubuntu"
+ ```sh
+ # Copy the service into a proper directory
+ cp ~pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
-# Reload service files
-systemctl daemon-reload
+ # Reload service files
+ systemctl daemon-reload
-# Reenable pleroma to start on boot
-systemctl reenable pleroma
+ # Reenable pleroma to start on boot
+ systemctl reenable pleroma
-# Start pleroma
-systemctl start pleroma
-```
+ # Start pleroma
+ systemctl start pleroma
+ ```
## Running mix tasks
Refer to [Running mix tasks](otp_en.md#running-mix-tasks) section from OTP release installation guide.
diff --git a/docs/installation/netbsd_en.md b/docs/installation/netbsd_en.md
index 3626acc69..6ad0de2f6 100644
--- a/docs/installation/netbsd_en.md
+++ b/docs/installation/netbsd_en.md
@@ -19,6 +19,7 @@ databases/postgresql11-client
databases/postgresql11-server
devel/git-base
devel/git-docs
+devel/cmake
lang/elixir
security/acmesh
security/sudo
diff --git a/docs/installation/openbsd_en.md b/docs/installation/openbsd_en.md
index 5dbe24f75..eee452845 100644
--- a/docs/installation/openbsd_en.md
+++ b/docs/installation/openbsd_en.md
@@ -14,11 +14,12 @@ The following packages need to be installed:
* git
* postgresql-server
* postgresql-contrib
+ * cmake
To install them, run the following command (with doas or as root):
```
-pkg_add elixir gmake ImageMagick git postgresql-server postgresql-contrib
+pkg_add elixir gmake ImageMagick git postgresql-server postgresql-contrib cmake
```
Pleroma requires a reverse proxy, OpenBSD has relayd in base (and is used in this guide) and packages/ports are available for nginx (www/nginx) and apache (www/apache-httpd). Independently of the reverse proxy, [acme-client(1)](https://man.openbsd.org/acme-client) can be used to get a certificate from Let's Encrypt.
diff --git a/docs/installation/openbsd_fi.md b/docs/installation/openbsd_fi.md
index 272273cff..b5b5056a9 100644
--- a/docs/installation/openbsd_fi.md
+++ b/docs/installation/openbsd_fi.md
@@ -16,7 +16,7 @@ Matrix-kanava #freenode_#pleroma:matrix.org ovat hyviä paikkoja löytää apua
Asenna tarvittava ohjelmisto:
-`# pkg_add git elixir gmake postgresql-server-10.3 postgresql-contrib-10.3`
+`# pkg_add git elixir gmake postgresql-server-10.3 postgresql-contrib-10.3 cmake`
Luo postgresql-tietokanta:
diff --git a/docs/installation/otp_en.md b/docs/installation/otp_en.md
index 338dfa7d0..b7e3bb2ac 100644
--- a/docs/installation/otp_en.md
+++ b/docs/installation/otp_en.md
@@ -28,15 +28,17 @@ Other than things bundled in the OTP release Pleroma depends on:
* 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)
-```sh tab="Alpine"
-echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories
-apk update
-apk add curl unzip ncurses postgresql postgresql-contrib nginx certbot
-```
-
-```sh tab="Debian/Ubuntu"
-apt install curl unzip libncurses5 postgresql postgresql-contrib nginx certbot
-```
+=== "Alpine"
+ ```
+ echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories
+ apk update
+ apk add curl unzip ncurses postgresql postgresql-contrib nginx certbot
+ ```
+
+=== "Debian/Ubuntu"
+ ```
+ apt install curl unzip libncurses5 postgresql postgresql-contrib nginx certbot
+ ```
## Setup
### Configuring PostgreSQL
@@ -47,31 +49,35 @@ apt install curl unzip libncurses5 postgresql postgresql-contrib nginx certbot
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](../configuration/cheatsheet.md#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).
-```sh tab="Alpine"
-apk add git build-base postgresql-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
-```
-
-```sh tab="Debian/Ubuntu"
-# Available only on Buster/19.04
-apt install postgresql-11-rum
-```
+=== "Alpine"
+ ```
+ apk add git build-base postgresql-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
+ ```
+
+=== "Debian/Ubuntu"
+ ```
+ # Available only on Buster/19.04
+ apt install postgresql-11-rum
+ ```
#### (Optional) Performance configuration
It is encouraged to check [Optimizing your PostgreSQL performance](../configuration/postgresql.md) document, for tips on PostgreSQL tuning.
-```sh tab="Alpine"
-rc-service postgresql restart
-```
+=== "Alpine"
+ ```
+ rc-service postgresql restart
+ ```
-```sh tab="Debian/Ubuntu"
-systemctl restart postgresql
-```
+=== "Debian/Ubuntu"
+ ```
+ systemctl restart postgresql
+ ```
If you are using PostgreSQL 12 or higher, add this to your Ecto database configuration
@@ -121,9 +127,6 @@ 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"
-# Run the environment file generator.
-su pleroma -s $SHELL -lc "./bin/pleroma_ctl release_env gen"
-
# Create the postgres database
su postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"
@@ -134,7 +137,7 @@ su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
# 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 "export $(cat /opt/pleroma/config/pleroma.env); ./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
@@ -154,14 +157,16 @@ certbot certonly --standalone --preferred-challenges http -d yourinstance.tld
The location of nginx configs is dependent on the distro
-```sh tab="Alpine"
-cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.conf
-```
+=== "Alpine"
+ ```
+ cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/conf.d/pleroma.conf
+ ```
-```sh tab="Debian/Ubuntu"
-cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.conf
-ln -s /etc/nginx/sites-available/pleroma.conf /etc/nginx/sites-enabled/pleroma.conf
-```
+=== "Debian/Ubuntu"
+ ```
+ cp /opt/pleroma/installation/pleroma.nginx /etc/nginx/sites-available/pleroma.conf
+ ln -s /etc/nginx/sites-available/pleroma.conf /etc/nginx/sites-enabled/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
```sh
@@ -178,36 +183,39 @@ nginx -t
```
#### Start nginx
-```sh tab="Alpine"
-rc-service nginx start
-```
+=== "Alpine"
+ ```
+ rc-service nginx start
+ ```
-```sh tab="Debian/Ubuntu"
-systemctl start nginx
-```
+=== "Debian/Ubuntu"
+ ```
+ systemctl start nginx
+ ```
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
-```sh tab="Alpine"
-# Copy the service into a proper directory
-cp /opt/pleroma/installation/init.d/pleroma /etc/init.d/pleroma
+=== "Alpine"
+ ```
+ # 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
-```
+ # Start pleroma and enable it on boot
+ rc-service pleroma start
+ rc-update add pleroma
+ ```
-```sh tab="Debian/Ubuntu"
-# Copy the service into a proper directory
-cp /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
+=== "Debian/Ubuntu"
+ ```
+ # 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
-```
+ # Start pleroma and enable it on boot
+ systemctl start pleroma
+ systemctl enable 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.
@@ -227,43 +235,45 @@ $EDITOR path-to-nginx-config
nginx -t
```
-```sh tab="Alpine"
-# Restart nginx
-rc-service nginx restart
+=== "Alpine"
+ ```
+ # Restart nginx
+ rc-service nginx restart
-# Start the cron daemon and make it start on boot
-rc-service crond start
-rc-update add crond
+ # 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'
+ # 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/ --post-hook "rc-service nginx reload"
-' > /etc/periodic/daily/renew-pleroma-cert
-chmod +x /etc/periodic/daily/renew-pleroma-cert
+ # Add it to the daily cron
+ echo '#!/bin/sh
+ 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
-# If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert
-run-parts --test /etc/periodic/daily
-```
+ # If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert
+ run-parts --test /etc/periodic/daily
+ ```
-```sh tab="Debian/Ubuntu"
-# Restart nginx
-systemctl restart nginx
+=== "Debian/Ubuntu"
+ ```
+ # 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 reload 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 reload nginx'
-# Add it to the daily cron
-echo '#!/bin/sh
-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
+ # Add it to the daily cron
+ echo '#!/bin/sh
+ 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
-# If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert
-run-parts --test /etc/cron.daily
-```
+ # If everything worked the output should contain /etc/cron.daily/renew-pleroma-cert
+ run-parts --test /etc/cron.daily
+ ```
## Create your first user and set as admin
```sh
@@ -279,3 +289,4 @@ This will create an account withe the username of 'joeuser' with the email addre
## Questions
Questions about the installation or didn’t it work as it should be, ask in [#pleroma:matrix.org](https://matrix.heldscal.la/#/room/#freenode_#pleroma:matrix.org) or IRC Channel **#pleroma** on **Freenode**.
+