aboutsummaryrefslogtreecommitdiff
path: root/docs/administration
diff options
context:
space:
mode:
Diffstat (limited to 'docs/administration')
-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.md48
-rw-r--r--docs/administration/CLI_tasks/emoji.md49
-rw-r--r--docs/administration/CLI_tasks/frontend.md96
-rw-r--r--docs/administration/CLI_tasks/instance.md21
-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/robots_txt.md21
-rw-r--r--docs/administration/CLI_tasks/uploads.md16
-rw-r--r--docs/administration/CLI_tasks/user.md321
-rw-r--r--docs/administration/backup.md21
-rw-r--r--docs/administration/updating.md7
14 files changed, 602 insertions, 250 deletions
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..d9aa0e71b 100644
--- a/docs/administration/CLI_tasks/email.md
+++ b/docs/administration/CLI_tasks/email.md
@@ -1,24 +1,46 @@
-# Managing emails
+# EMail administration tasks
{! backend/administration/CLI_tasks/general_cli_task_info.include !}
## 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
+ mix pleroma.email test --to root@example.org
+ ```
+
+## Send confirmation emails to all unconfirmed user accounts
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl email send_confirmation_mails
+ ```
+
+=== "From Source"
-```sh tab="From Source"
-mix pleroma.email test --to root@example.org
-```
+ ```sh
+ mix pleroma.email send_confirmation_mails
+ ```
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/frontend.md b/docs/administration/CLI_tasks/frontend.md
new file mode 100644
index 000000000..d4a48cb56
--- /dev/null
+++ b/docs/administration/CLI_tasks/frontend.md
@@ -0,0 +1,96 @@
+# Managing frontends
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl frontend install <frontend> [--ref <ref>] [--file <file>] [--build-url <build-url>] [--path <path>] [--build-dir <build-dir>]
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.frontend install <frontend> [--ref <ref>] [--file <file>] [--build-url <build-url>] [--path <path>] [--build-dir <build-dir>]
+ ```
+
+Frontend can be installed either from local zip file, or automatically downloaded from the web.
+
+You can give all the options directly on the command line, but missing information will be filled out by looking at the data configured under `frontends.available` in the config files.
+
+Currently, known `<frontend>` values are:
+
+- [admin-fe](https://git.pleroma.social/pleroma/admin-fe)
+- [kenoma](http://git.pleroma.social/lambadalambda/kenoma)
+- [pleroma-fe](http://git.pleroma.social/pleroma/pleroma-fe)
+- [fedi-fe](https://git.pleroma.social/pleroma/fedi-fe)
+- [soapbox-fe](https://gitlab.com/soapbox-pub/soapbox-fe)
+
+You can still install frontends that are not configured, see below.
+
+## Example installations for a known frontend
+
+For a frontend configured under the `available` key, it's enough to install it by name.
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl frontend install pleroma
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.frontend install pleroma
+ ```
+
+This will download the latest build for the pre-configured `ref` and install it. It can then be configured as the one of the served frontends in the config file (see `primary` or `admin`).
+
+You can override any of the details. To install a pleroma build from a different URL, you could do this:
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
+ ```
+
+Similarly, you can also install from a local zip file.
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
+ ```
+
+The resulting frontend will always be installed into a folder of this template: `${instance_static}/frontends/${name}/${ref}`.
+
+Careful: This folder will be completely replaced on installation.
+
+## Example installation for an unknown frontend
+
+The installation process is the same, but you will have to give all the needed options on the command line. For example:
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl frontend install gensokyo --ref master --build-url https://gensokyo.2hu/builds/marisa.zip
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.frontend install gensokyo --ref master --build-url https://gensokyo.2hu/builds/marisa.zip
+ ```
+
+If you don't have a zip file but just want to install a frontend from a local path, you can simply copy the files over a folder of this template: `${instance_static}/frontends/${name}/${ref}`.
+
diff --git a/docs/administration/CLI_tasks/instance.md b/docs/administration/CLI_tasks/instance.md
index 52e264bb1..982b22bf3 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.
@@ -33,3 +37,8 @@ If any of the options are left unspecified, you will be prompted interactively.
- `--static-dir <path>` - the directory custom public files should be read from (custom emojis, frontend bundle overrides, robots.txt, etc.)
- `--listen-ip <ip>` - the ip the app should listen to, defaults to 127.0.0.1
- `--listen-port <port>` - the port the app should listen to, defaults to 4000
+- `--strip-uploads <Y|N>` - use ExifTool to strip uploads of sensitive location data
+- `--anonymize-uploads <Y|N>` - randomize uploaded filenames
+- `--dedupe-uploads <Y|N>` - store files based on their hash to reduce data storage requirements if duplicates are uploaded with different filenames
+- `--skip-release-env` - skip generation the release environment file
+- `--release-env-file` - release environment file path
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/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..c64ed4f22 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,144 +60,245 @@ 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
+- `--admin`/`--no-admin` - whether the user should be an admin
+- `--confirmed`/`--no-confirmed` - whether the user account is confirmed
- `--locked`/`--no-locked` - whether the user should be locked
- `--moderator`/`--no-moderator` - whether the user should be a moderator
-- `--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>
+ ```
+
+## Set confirmation status for all regular active users
+*Admins and moderators are excluded*
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user confirm_all
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user confirm_all
+ ```
+
+## Revoke confirmation status for all regular active users
+*Admins and moderators are excluded*
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl user unconfirm_all
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.user unconfirm_all
+ ```
diff --git a/docs/administration/backup.md b/docs/administration/backup.md
index be57bf74a..5f279ab97 100644
--- a/docs/administration/backup.md
+++ b/docs/administration/backup.md
@@ -5,20 +5,25 @@
1. Stop the Pleroma service.
2. Go to the working directory of Pleroma (default is `/opt/pleroma`)
3. Run `sudo -Hu postgres pg_dump -d <pleroma_db> --format=custom -f </path/to/backup_location/pleroma.pgdump>` (make sure the postgres user has write access to the destination file)
-4. Copy `pleroma.pgdump`, `config/prod.secret.exs` and the `uploads` folder to your backup destination. If you have other modifications, copy those changes too.
+4. Copy `pleroma.pgdump`, `config/prod.secret.exs`, `config/setup_db.psql` (if still available) and the `uploads` folder to your backup destination. If you have other modifications, copy those changes too.
5. Restart the Pleroma service.
## Restore/Move
-1. Optionally reinstall Pleroma (either on the same server or on another server if you want to move servers). Try to use the same database name.
+1. Optionally reinstall Pleroma (either on the same server or on another server if you want to move servers).
2. Stop the Pleroma service.
3. Go to the working directory of Pleroma (default is `/opt/pleroma`)
4. Copy the above mentioned files back to their original position.
-5. Drop the existing database and recreate an empty one `sudo -Hu postgres psql -c 'DROP DATABASE <pleroma_db>;';` `sudo -Hu postgres psql -c 'CREATE DATABASE <pleroma_db>;';`
-6. Run `sudo -Hu postgres pg_restore -d <pleroma_db> -v -1 </path/to/backup_location/pleroma.pgdump>`
-7. If you installed a newer Pleroma version, you should run `mix ecto.migrate`[^1]. This task performs database migrations, if there were any.
-8. Restart the Pleroma service.
-9. Run `sudo -Hu postgres vacuumdb --all --analyze-in-stages`. This will quickly generate the statistics so that postgres can properly plan queries.
+5. Drop the existing database and user if restoring in-place. `sudo -Hu postgres psql -c 'DROP DATABASE <pleroma_db>;';` `sudo -Hu postgres psql -c 'DROP USER <pleroma_db>;'`
+6. Restore the database schema and pleroma postgres role the with the original `setup_db.psql` if you have it: `sudo -Hu postgres psql -f config/setup_db.psql`.
+
+ Alternatively, run the `mix pleroma.instance gen` task again. You can ignore most of the questions, but make the database user, name, and password the same as found in your backup of `config/prod.secret.exs`. Then run the restoration of the pleroma role and schema with of the generated `config/setup_db.psql` as instructed above. You may delete the `config/generated_config.exs` file as it is not needed.
+
+7. Now restore the Pleroma instance's data into the empty database schema: `sudo -Hu postgres pg_restore -d <pleroma_db> -v -1 </path/to/backup_location/pleroma.pgdump>`
+8. If you installed a newer Pleroma version, you should run `mix ecto.migrate`[^1]. This task performs database migrations, if there were any.
+9. Restart the Pleroma service.
+10. Run `sudo -Hu postgres vacuumdb --all --analyze-in-stages`. This will quickly generate the statistics so that postgres can properly plan queries.
+11. If setting up on a new server configure Nginx by using the `installation/pleroma.nginx` config sample or reference the Pleroma installation guide for your OS which contains the Nginx configuration instructions.
[^1]: Prefix with `MIX_ENV=prod` to run it using the production config file.
@@ -31,6 +36,6 @@
3. Disable pleroma from systemd `systemctl disable pleroma`
4. Remove the files and folders you created during installation (see installation guide). This includes the pleroma, nginx and systemd files and folders.
5. Reload nginx now that the configuration is removed `systemctl reload nginx`
-6. Remove the database and database user `sudo -Hu postgres psql -c 'DROP DATABASE <pleroma_db>;';` `sudo -Hu postgres psql -c 'DROP USER <pleroma_db>;';`
+6. Remove the database and database user `sudo -Hu postgres psql -c 'DROP DATABASE <pleroma_db>;';` `sudo -Hu postgres psql -c 'DROP USER <pleroma_db>;'`
7. Remove the system user `userdel pleroma`
8. Remove the dependencies that you don't need anymore (see installation guide). Make sure you don't remove packages that are still needed for other software that you have running!
diff --git a/docs/administration/updating.md b/docs/administration/updating.md
index c994f3f16..ef2c9218c 100644
--- a/docs/administration/updating.md
+++ b/docs/administration/updating.md
@@ -18,9 +18,10 @@ su pleroma -s $SHELL -lc "./bin/pleroma_ctl migrate"
1. Go to the working directory of Pleroma (default is `/opt/pleroma`)
2. Run `git pull`. This pulls the latest changes from upstream.
-3. Run `mix deps.get`. This pulls in any new dependencies.
+3. Run `mix deps.get` [^1]. This pulls in any new dependencies.
4. Stop the Pleroma service.
-5. Run `mix ecto.migrate`[^1]. This task performs database migrations, if there were any.
+5. Run `mix ecto.migrate` [^1] [^2]. This task performs database migrations, if there were any.
6. Start the Pleroma service.
-[^1]: Prefix with `MIX_ENV=prod` to run it using the production config file.
+[^1]: Depending on which install guide you followed (for example on Debian/Ubuntu), you want to run `mix` tasks as `pleroma` user by adding `sudo -Hu pleroma` before the command.
+[^2]: Prefix with `MIX_ENV=prod` to run it using the production config file.