summaryrefslogtreecommitdiff
path: root/docs/administration/CLI_tasks
diff options
context:
space:
mode:
Diffstat (limited to 'docs/administration/CLI_tasks')
-rw-r--r--docs/administration/CLI_tasks/config.md29
-rw-r--r--docs/administration/CLI_tasks/database.md132
-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.md55
-rw-r--r--docs/administration/CLI_tasks/frontend.md69
-rw-r--r--docs/administration/CLI_tasks/instance.md16
-rw-r--r--docs/administration/CLI_tasks/oauth_app.md20
-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.md291
12 files changed, 546 insertions, 215 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 ff400c8ed..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 ...]
+ ```
-```sh tab="From Source"
-mix pleroma.database prune_objects [option ...]
-```
+=== "From Source"
+
+ ```sh
+ mix pleroma.database prune_objects [option ...]
+ ```
### Options
- `--vacuum` - run `VACUUM FULL` after the objects are pruned
@@ -42,30 +51,93 @@ mix pleroma.database prune_objects [option ...]
Can be safely re-run
-```sh tab="OTP"
-./bin/pleroma_ctl database bump_all_conversations
-```
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl database bump_all_conversations
+ ```
-```sh tab="From Source"
-mix pleroma.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
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.database fix_likes_collections
+ ```
+
+## Vacuum the database
+
+### Analyze
+
+Running an `analyze` vacuum job can improve performance by updating statistics used by the query planner. **It is safe to cancel this.**
+
+=== "OTP"
+
+ ```sh
+ ./bin/pleroma_ctl database vacuum analyze
+ ```
+
+=== "From Source"
+
+ ```sh
+ mix pleroma.database vacuum analyze
+ ```
+
+### Full
+
+Running a `full` vacuum job rebuilds your entire database by reading all of the data and rewriting it into smaller
+and more compact files with an optimized layout. This process will take a long time and use additional disk space as
+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.**
+
+=== "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 fix_likes_collections
-```
+ ```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 efec8222c..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,29 +20,42 @@ 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.
+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.
- The manifest entry will either be written to a newly created `index.json` file or appended to the existing one, *replacing* the old pack with the same name if it was in the file previously.
+ The manifest entry will either be written to a newly created `pack_name.json` file (pack name is asked in questions) or appended to the existing one, *replacing* the old pack with the same name if it was in the file previously.
The file list will be written to the file specified previously, *replacing* that file. You _should_ check that the file list doesn't contain anything you don't need in the pack, that is, anything that is not an emoji (the whole pack is downloaded, but only emoji files are extracted).
+
+## Reload emoji packs
+
+=== "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..7d1c1e937
--- /dev/null
+++ b/docs/administration/CLI_tasks/frontend.md
@@ -0,0 +1,69 @@
+# Managing frontends
+
+`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 like, 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.
+
+```sh tab="OTP"
+./bin/pleroma_ctl frontend install pleroma
+```
+
+```sh tab="From Source"
+mix pleroma.frontend install pleroma
+```
+
+This will download the latest build for the 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:
+
+```sh tab="OPT"
+./bin/pleroma_ctl frontend install pleroma --ref 2hu_edition --build-url https://example.org/raymoo.zip
+```
+
+```sh tab="From Source"
+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.
+
+```sh tab="OTP"
+./bin/pleroma_ctl frontend install pleroma --ref mybuild --file ~/Downloads/doomfe.zip
+```
+
+```sh tab="From Source"
+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 commond line. For example:
+
+```sh tab="OTP"
+./bin/pleroma_ctl frontend install gensokyo --ref master --build-url https://gensokyo.2hu/builds/marisa.zip
+```
+
+```sh tab="From Source"
+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..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
new file mode 100644
index 000000000..f0568491e
--- /dev/null
+++ b/docs/administration/CLI_tasks/oauth_app.md
@@ -0,0 +1,20 @@
+# Creating trusted OAuth App
+
+{! backend/administration/CLI_tasks/general_cli_task_info.include !}
+
+## Create trusted OAuth App.
+
+Optional params:
+ * `-s SCOPES` - scopes for app, e.g. `read,write,follow,push`.
+
+=== "OTP"
+
+ ```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 f535dad82..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,103 +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_or_id>
-```
-```sh tab="From Source"
-mix pleroma.user revoke_invite <token_or_id>
-```
+=== "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
+
+=== "OTP"
+ ```sh
+ ./bin/pleroma_ctl user toggle_activated <nickname>
+ ```
-## Deactivate or activate a user
-```sh tab="OTP"
- ./bin/pleroma_ctl user toggle_activated <nickname>
-```
+=== "From Source"
-```sh tab="From Source"
-mix pleroma.user toggle_activated <nickname>
-```
+ ```sh
+ mix pleroma.user toggle_activated <nickname>
+ ```
-## Unsubscribe local users from a user and deactivate the user
-```sh tab="OTP"
- ./bin/pleroma_ctl user unsubscribe NICKNAME
-```
+## Deactivate a user and unsubscribes local users from the user
-```sh tab="From Source"
-mix pleroma.user unsubscribe NICKNAME
-```
+=== "OTP"
+ ```sh
+ ./bin/pleroma_ctl user deactivate NICKNAME
+ ```
-## Unsubscribe local users from an instance and deactivate all accounts on it
-```sh tab="OTP"
- ./bin/pleroma_ctl user unsubscribe_all_from_instance <instance>
-```
+=== "From Source"
-```sh tab="From Source"
-mix pleroma.user unsubscribe_all_from_instance <instance>
-```
+ ```sh
+ mix pleroma.user deactivate NICKNAME
+ ```
+
+
+## Deactivate all accounts from an instance and unsubscribe local users on it
+
+=== "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
+
+=== "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
@@ -150,31 +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>
+ ```