diff --git a/docs/README.md b/docs/README.md index 3da3d1967..b5a6e43fe 100644 --- a/docs/README.md +++ b/docs/README.md @@ -15,7 +15,7 @@ source venv/bin/activate pip install -r requirements.txt # Run an http server who rebuilds when files change -# Accessable on http://127.0.0.1:8000 +# Accessible on http://127.0.0.1:8000 mkdocs serve # Build the docs diff --git a/docs/docs/administration/CLI_tasks/config.md b/docs/docs/administration/CLI_tasks/config.md index 31e5af401..e738baad0 100644 --- a/docs/docs/administration/CLI_tasks/config.md +++ b/docs/docs/administration/CLI_tasks/config.md @@ -1,4 +1,4 @@ -# Transfering the config to/from the database +# Transferring the config to/from the database {! administration/CLI_tasks/general_cli_task_info.include !} @@ -34,9 +34,9 @@ Options: -- `` - where to save migrated config. E.g. `--path=/tmp`. If file saved into non standart folder, you must manually copy file into directory where Pleroma can read it. For OTP install path will be `PLEROMA_CONFIG_PATH` or `/etc/akkoma`. For installation from source - `config` directory in the akkoma folder. -- `` - environment, for which is migrated config. By default is `prod`. -- To delete transferred settings from database optional flag `-d` can be used +- `` - where to save migrated config. E.g. `--path=/tmp`. If the file was saved into a non-standard directory, you must manually copy it into a location where Pleroma can read it. For OTP the install path will be `PLEROMA_CONFIG_PATH` or `/etc/akkoma`. For installation from source it’s the `config` directory in the akkoma folder. +- `` - environment, for which is migrated config. By default, it’s `prod`. +- To delete transferred settings from database the optional flag `-d` can be used === "OTP" ```sh @@ -48,7 +48,7 @@ Options: mix pleroma.config migrate_from_db [--env=] [-d] [--path=] ``` -## Dump all of the config settings defined in the database +## Dump all config settings defined in the database === "OTP" @@ -172,15 +172,16 @@ it may be easier to dump the values to JSON and then modify them in a text edito === "From Source" ```sh - mix pleroma.config dump_to_file group key path + mix pleroma.config dump_to_file group key path # For example, to dump the MRF simple configuration: mix pleroma.config dump_to_file pleroma mrf_simple /tmp/mrf_simple.json ``` ## Loading specific configuration values from JSON -**Note:** This will overwrite any existing value in the database, and can -cause crashes if you do not have exactly the correct formatting. +!!!note + This will overwrite any existing value in the database, and can + cause crashes if you do not have exactly the correct formatting. Once you have modified the JSON file, you can load it back into the database. @@ -200,6 +201,7 @@ Once you have modified the JSON file, you can load it back into the database. mix pleroma.config load_from_file /tmp/mrf_simple.json ``` -**NOTE** an instance reboot is needed for many changes to take effect, -you may want to visit `/api/v1/pleroma/admin/restart` on your instance -to soft-restart the instance. +!!! note + An instance reboot is needed for many changes to take effect, + you may want to visit `/api/v1/pleroma/admin/restart` on your instance + to soft-restart the instance. diff --git a/docs/docs/administration/CLI_tasks/database.md b/docs/docs/administration/CLI_tasks/database.md index f92cd1a52..68ff0afb4 100644 --- a/docs/docs/administration/CLI_tasks/database.md +++ b/docs/docs/administration/CLI_tasks/database.md @@ -7,7 +7,7 @@ ## Replace embedded objects with their references -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. +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 database size before the migration. === "OTP" @@ -29,7 +29,7 @@ Replaces embedded objects with references to them in the `objects` table. Only n This will prune remote posts older than 90 days (configurable with [`config :pleroma, :instance, remote_post_retention_days`](../../configuration/cheatsheet.md#instance)) from the database. Pruned posts may be refetched in some cases. !!! note - The disk space will only be reclaimed after a proper vacuum. By default Postgresql does this for you on a regular basis, but if your instance has been running for a long time and there are many rows deleted, it may be advantageous to use `VACUUM FULL` (e.g. by using the `--vacuum` option). + The disk space will only be reclaimed after a proper vacuum. By default, Postgresql does this for you on a regular basis, but if your instance has been running for a long time and there are many rows deleted, it may be advantageous to use `VACUUM FULL` (e.g. by using the `--vacuum` option). !!! danger 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. Vacuum causes a substantial increase in I/O traffic, and may lead to a degraded experience while it is running. @@ -135,7 +135,7 @@ Can be safely re-run ## Vacuum the database !!! note - By default Postgresql has an autovacuum deamon running. While the tasks described here can help in some cases, they shouldn't be needed on a regular basis. See [the Postgresql docs on vacuuming](https://www.postgresql.org/docs/current/sql-vacuum.html) for more information on this. + By default, Postgresql has an autovacuum daemon running. While the tasks described here can help in some cases, they shouldn't be needed on a regular basis. See [the Postgresql docs on vacuuming](https://www.postgresql.org/docs/current/sql-vacuum.html) for more information on this. ### Analyze @@ -155,7 +155,7 @@ Running an `analyze` vacuum job can improve performance by updating statistics u ### Full -Running a `full` vacuum job rebuilds your entire database by reading all of the data and rewriting it into smaller +Running a `full` vacuum job rebuilds your entire database by reading all 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.** @@ -188,7 +188,7 @@ but should only be run if necessary. **It is safe to cancel this.** ## Change Text Search Configuration -Change `default_text_search_config` for database and (if necessary) text_search_config used in index, then rebuild index (it may take time). +Change `default_text_search_config` for database and (if necessary) text_search_config used in index, then rebuild index (it may take time). === "OTP" @@ -207,9 +207,9 @@ See [PostgreSQL documentation](https://www.postgresql.org/docs/current/textsearc ## Pruning old activities Over time, transient `Delete` activities and `Tombstone` objects -can accumulate in your database, inflating its size. This is not ideal. -There is a periodic task to prune these transient objects, -but on first run this may take a while on older instances to catch up +can accumulate in your database, inflating its size. This is not ideal. +There is a periodic task to prune these transient objects, +but on the first run this may take a while on older instances to catch up to the current day. === "OTP" diff --git a/docs/docs/administration/CLI_tasks/diagnostics.md b/docs/docs/administration/CLI_tasks/diagnostics.md index 25572da8a..17226b946 100644 --- a/docs/docs/administration/CLI_tasks/diagnostics.md +++ b/docs/docs/administration/CLI_tasks/diagnostics.md @@ -26,5 +26,5 @@ from the perspective of another given user. `./bin/pleroma_ctl diagnostics user_timeline ` === "From Source" - - `mix pleroma.diagnostics user_timeline ` \ No newline at end of file + + `mix pleroma.diagnostics user_timeline ` diff --git a/docs/docs/administration/CLI_tasks/digest.md b/docs/docs/administration/CLI_tasks/digest.md index 7a6569ada..5a9e5e910 100644 --- a/docs/docs/administration/CLI_tasks/digest.md +++ b/docs/docs/administration/CLI_tasks/digest.md @@ -16,7 +16,6 @@ mix pleroma.digest test [since_date] ``` - Example: === "OTP" @@ -30,4 +29,3 @@ Example: ```sh mix pleroma.digest test donaldtheduck 2019-05-20 ``` - diff --git a/docs/docs/administration/CLI_tasks/email.md b/docs/docs/administration/CLI_tasks/email.md index f76096e07..cb73f738e 100644 --- a/docs/docs/administration/CLI_tasks/email.md +++ b/docs/docs/administration/CLI_tasks/email.md @@ -1,4 +1,4 @@ -# EMail administration tasks +# Email administration tasks {! administration/CLI_tasks/general_cli_task_info.include !} diff --git a/docs/docs/administration/CLI_tasks/emoji.md b/docs/docs/administration/CLI_tasks/emoji.md index bad908dca..c023c5b03 100644 --- a/docs/docs/administration/CLI_tasks/emoji.md +++ b/docs/docs/administration/CLI_tasks/emoji.md @@ -14,9 +14,8 @@ mix pleroma.emoji ls-packs [option ...] ``` - ### Options -- `-m, --manifest PATH/URL` - path to a custom manifest, it can either be an URL starting with `http`, in that case the manifest will be fetched from that address, or a local path +- `-m, --manifest PATH/URL` - path to a custom manifest, it can either be a URL starting with `http`, in that case the manifest will be fetched from that address, or a local path ## Fetch, verify and install the specified packs from the manifest into `STATIC-DIR/emoji/PACK-NAME` diff --git a/docs/docs/administration/CLI_tasks/frontend.md b/docs/docs/administration/CLI_tasks/frontend.md index 5d0c7147a..e9c9d2aa7 100644 --- a/docs/docs/administration/CLI_tasks/frontend.md +++ b/docs/docs/administration/CLI_tasks/frontend.md @@ -12,14 +12,14 @@ mix pleroma.frontend install [--ref ] [--file ] [--build-url ] [--path ] [--build-dir ] ``` -Frontend can be installed either from local zip file, or automatically downloaded from the web. +Frontend can be installed either from a 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 `` values are: - [admin-fe](https://akkoma.dev/AkkomaGang/admin-fe) -- [mastodon-fe](https://akkoma.dev/AkkomaGang/masto-fe) +- [masto-fe](https://akkoma.dev/AkkomaGang/masto-fe) - [pleroma-fe](https://akkoma.dev/AkkomaGang/pleroma-fe) You can still install frontends that are not configured, see below. @@ -42,7 +42,7 @@ For a frontend configured under the `available` key, it's enough to install it b 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 an Akkoma-FE build from a different URL, you could do this: +You can override any of the details. To install an akkoma-fe build from a different URL, you could do this: === "OTP" @@ -56,7 +56,7 @@ You can override any of the details. To install an Akkoma-FE build from a differ mix pleroma.frontend install pleroma-fe --ref 2hu_edition --build-url https://example.org/raymoo.zip ``` -Similarly, you can also install from a local zip file. +Similarly, you can also install from a local ZIP file. === "OTP" @@ -90,5 +90,4 @@ The installation process is the same, but you will have to give all the needed o 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}`. - +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/docs/administration/CLI_tasks/general_cli_task_info.include b/docs/docs/administration/CLI_tasks/general_cli_task_info.include index 500e68e8d..a837f6f2d 100644 --- a/docs/docs/administration/CLI_tasks/general_cli_task_info.include +++ b/docs/docs/administration/CLI_tasks/general_cli_task_info.include @@ -1,5 +1,5 @@ -Every command should be ran as the `akkoma` user from it's home directory. For example if you are superuser, you would have to wrap the command in `su akkoma -s $SHELL -lc "$COMMAND"`. +Every command should be ran as the `akkoma` user from its home directory. For example if you are superuser, you would have to wrap the command in `su akkoma -s $SHELL -lc "$COMMAND"`. ??? note "From source note about `MIX_ENV`" - The `mix` command should be prefixed with the name of environment your Akkoma server is running in, usually it's `MIX_ENV=prod` + The `mix` command should be prefixed with the name of the environment your Akkoma server is running in, usually it's `MIX_ENV=prod` diff --git a/docs/docs/administration/CLI_tasks/instance.md b/docs/docs/administration/CLI_tasks/instance.md index 3d30d1119..682dd21c1 100644 --- a/docs/docs/administration/CLI_tasks/instance.md +++ b/docs/docs/administration/CLI_tasks/instance.md @@ -15,7 +15,6 @@ mix pleroma.instance gen [option ...] ``` - If any of the options are left unspecified, you will be prompted interactively. ### Options @@ -35,11 +34,11 @@ If any of the options are left unspecified, you will be prompted interactively. - `--db-configurable ` - Allow/disallow configuring instance from admin part - `--uploads-dir ` - the directory uploads go in when using a local uploader - `--static-dir ` - the directory custom public files should be read from (custom emojis, frontend bundle overrides, robots.txt, etc.) -- `--listen-ip ` - the ip the app should listen to, defaults to 127.0.0.1 +- `--listen-ip ` - the IP the app should listen to, defaults to 127.0.0.1 - `--listen-port ` - the port the app should listen to, defaults to 4000 - `--strip-uploads-metadata ` - use ExifTool to strip uploads of metadata when possible - `--read-uploads-description ` - use ExifTool to read image descriptions from uploads - `--anonymize-uploads ` - randomize uploaded filenames - `--dedupe-uploads ` - 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 +- `--skip-release-env` - skip generation of the release environment file - `--release-env-file` - release environment file path diff --git a/docs/docs/administration/CLI_tasks/oauth_app.md b/docs/docs/administration/CLI_tasks/oauth_app.md index 8a49b3c09..261467deb 100644 --- a/docs/docs/administration/CLI_tasks/oauth_app.md +++ b/docs/docs/administration/CLI_tasks/oauth_app.md @@ -4,7 +4,7 @@ ## Create trusted OAuth App. -Optional params: +Optional parameters: * `-s SCOPES` - scopes for app, e.g. `read,write,follow,push`. === "OTP" @@ -17,4 +17,4 @@ Optional params: ```sh mix pleroma.app create -n APP_NAME -r REDIRECT_URI - ``` \ No newline at end of file + ``` diff --git a/docs/docs/administration/CLI_tasks/user.md b/docs/docs/administration/CLI_tasks/user.md index b7a60751d..bb1801a3f 100644 --- a/docs/docs/administration/CLI_tasks/user.md +++ b/docs/docs/administration/CLI_tasks/user.md @@ -16,7 +16,6 @@ mix pleroma.user new [option ...] ``` - ### Options - `--name ` - the user's display name - `--bio ` - the user's bio @@ -39,8 +38,7 @@ mix pleroma.user list ``` - -## Generate an invite link +## Generate an invitation link === "OTP" @@ -54,7 +52,6 @@ mix pleroma.user invite [option ...] ``` - ### Options - `--expires-at DATE` - last day on which token is active (e.g. "2019-04-05") - `--max-use NUMBER` - maximum numbers of token uses @@ -73,7 +70,6 @@ mix pleroma.user invites ``` - ## Revoke invite === "OTP" @@ -88,7 +84,6 @@ mix pleroma.user revoke_invite ``` - ## Delete a user === "OTP" @@ -103,7 +98,6 @@ mix pleroma.user rm ``` - ## Delete user's posts and interactions === "OTP" @@ -118,7 +112,6 @@ mix pleroma.user delete_activities ``` - ## Sign user out from all applications (delete user's OAuth tokens and authorizations) === "OTP" @@ -161,7 +154,6 @@ mix pleroma.user deactivate NICKNAME ``` - ## Deactivate all accounts from an instance and unsubscribe local users on it === "OTP" @@ -176,7 +168,6 @@ mix pleroma.user deactivate_all_from_instance ``` - ## Create a password reset link for user === "OTP" @@ -191,8 +182,7 @@ mix pleroma.user reset_password ``` - -## Disable Multi Factor Authentication (MFA/2FA) for a user +## Disable Multi-Factor Authentication (MFA/2FA) for a user === "OTP" @@ -206,7 +196,6 @@ mix pleroma.user reset_mfa ``` - ## Set the value of the given user's settings === "OTP" @@ -241,7 +230,6 @@ mix pleroma.user tag ``` - ## Delete tags from a user === "OTP" @@ -256,7 +244,6 @@ mix pleroma.user untag ``` - ## Toggle confirmation status of the user === "OTP" @@ -304,7 +291,7 @@ ## Fix following state Sometimes the system can get into a situation where -it think you're already following someone and won't send a request +it thinks you're already following someone and won't send a request to the remote instance, or won't let you unfollow someone. This bug was fixed, but in case you encounter these weird states: @@ -324,4 +311,4 @@ The first argument is the local user's nickname - if you are `myuser@myinstance` The second is the remote user, consisting of both nickname AND domain. -If you are a weird follow state situation and cannot resolve it with the above, you may need to co-operate with the remote admin to clear the state their side too - they should provide the arguments *backwards*, i.e `fix_follow_state remote local`. +If you are a weird follow state situation and cannot resolve it with the above, you may need to co-operate with the remote admin to clear the state their side too - they should provide the arguments *backwards*, i.e. `fix_follow_state remote local`. diff --git a/docs/docs/administration/backup.md b/docs/docs/administration/backup.md index 08f9fed5e..5a6e9ee19 100644 --- a/docs/docs/administration/backup.md +++ b/docs/docs/administration/backup.md @@ -9,30 +9,30 @@ 5. Restart the Akkoma service. [¹]: We assume the database name is "akkoma". If not, you can find the correct name in your configuration files. -[²]: If you have a from source installation, you need `config/prod.secret.exs` instead of `config/config.exs`. The `config/config.exs` file also exists, but in case of from source installations, it only contains the default values and it is tracked by Git, so you don't need to back it up. +[²]: If you have a from source installation, you need `config/prod.secret.exs` instead of `config/config.exs`. The `config/config.exs` file also exists, but in case of from source installations, it only contains the default values and it is tracked by Git, so you don't need to back it up. ## Restore/Move 1. Optionally reinstall Akkoma (either on the same server or on another server if you want to move servers). 2. Stop the Akkoma service. 3. Go to the working directory of Akkoma (default is `/opt/akkoma`) -4. Copy the above mentioned files back to their original position. +4. Copy the above-mentioned files back to their original position. 5. Drop the existing database and user[¹]. `sudo -Hu postgres psql -c 'DROP DATABASE akkoma;';` `sudo -Hu postgres psql -c 'DROP USER akkoma;'` 6. Restore the database schema and akkoma role[¹] (replace the password with the one you find in the configuration file), `sudo -Hu postgres psql -c "CREATE USER akkoma WITH ENCRYPTED PASSWORD '';"` `sudo -Hu postgres psql -c "CREATE DATABASE akkoma OWNER akkoma;"`. 7. Now restore the Akkoma instance's data into the empty database schema[¹]: `sudo -Hu postgres pg_restore -d akkoma -v -1 ` 8. If you installed a newer Akkoma version, you should run the database migrations `./bin/pleroma_ctl migrate`[²]. 9. Restart the Akkoma 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/nginx/akkoma.nginx` configuration sample or reference the Akkoma installation guide which contains the Nginx configuration instructions. +11. If setting up on a new server, configure nginx by using the `installation/nginx/akkoma.nginx` configuration sample or reference the Akkoma installation guide which contains the nginx configuration instructions. [¹]: We assume the database name and user are both "akkoma". If not, you can find the correct name in your configuration files. [²]: If you have a from source installation, the command is `MIX_ENV=prod mix ecto.migrate`. Note that we prefix with `MIX_ENV=prod` to use the `config/prod.secret.exs` configuration file. ## Remove -1. Optionally you can remove the users of your instance. This will trigger delete requests for their accounts and posts. Note that this is 'best effort' and doesn't mean that all traces of your instance will be gone from the fediverse. - * You can do this from the admin-FE where you can select all local users and delete the accounts using the *Moderate multiple users* dropdown. - * You can also list local users and delete them individually using the CLI tasks for [Managing users](./CLI_tasks/user.md). +1. Optionally, you can remove the users of your instance. This will trigger delete requests for their accounts and posts. Note that this is 'best effort' and doesn't mean that all traces of your instance will be gone from the fediverse. + * You can do this from the admin-fe where you can select all local users and delete the accounts using the *Moderate multiple users* dropdown. + * You can also list local users and delete them individually using the CLI tasks for [managing users](./CLI_tasks/user.md). 2. Stop the Akkoma service `systemctl stop akkoma` 3. Disable Akkoma from systemd `systemctl disable akkoma` 4. Remove the files and folders you created during installation (see installation guide). This includes the akkoma, nginx and systemd files and folders. diff --git a/docs/docs/administration/monitoring.md b/docs/docs/administration/monitoring.md index b7a748731..7f3fa05c3 100644 --- a/docs/docs/administration/monitoring.md +++ b/docs/docs/administration/monitoring.md @@ -11,7 +11,7 @@ See: [export\_prometheus\_metrics](../../configuration/cheatsheet#instance) To scrape prometheus metrics, we need an oauth2 token with the `admin:metrics` scope. -consider using [constanze](https://akkoma.dev/AkkomaGang/constanze) to make this easier - +Consider using [constanze](https://akkoma.dev/AkkomaGang/constanze) to make this easier - ```bash constanze token --client-app --scopes "admin:metrics" --client-name "Prometheus" diff --git a/docs/docs/administration/updating.md b/docs/docs/administration/updating.md index 94bddfb6c..74fc5e576 100644 --- a/docs/docs/administration/updating.md +++ b/docs/docs/administration/updating.md @@ -33,8 +33,8 @@ su -s "$SHELL" akkoma ./bin/pleroma_ctl frontend install pleroma-fe --ref stable ``` -If you selected an alternate flavour on installation, -you _may_ need to specify `--flavour`, in the same way as +If you selected an alternate flavour on installation, +you _may_ need to specify `--flavour`, in the same way as [when installing](../../installation/otp_en#detecting-flavour). ## For from source installations (using git) @@ -62,6 +62,6 @@ mix ecto.migrate # Start akkoma (replace with your system service manager's equivalent if different) sudo systemctl start akkoma -# Update Akkoma-FE frontend to latest stable. For other Frontends see Frontend Configuration doc for more information. +# Update akkoma-fe frontend to latest stable. For other Frontends see Frontend Configuration doc for more information. mix pleroma.frontend install pleroma-fe --ref stable ``` diff --git a/docs/docs/configuration/cheatsheet.md b/docs/docs/configuration/cheatsheet.md index 9a50fc2bb..425488958 100644 --- a/docs/docs/configuration/cheatsheet.md +++ b/docs/docs/configuration/cheatsheet.md @@ -2,9 +2,9 @@ This is a cheat sheet for Akkoma configuration file, any setting possible to configure should be listed here. -For OTP installations the configuration is typically stored in `/etc/akkoma/config.exs`. +For OTP installations, the configuration is typically stored in `/etc/akkoma/config.exs`. -For from source installations Akkoma configuration works by first importing the base config `config/config.exs`, then overriding it by the environment config `config/$MIX_ENV.exs` and then overriding it by user config `config/$MIX_ENV.secret.exs`. In from source installations you should always make the changes to the user config and NEVER to the base config to avoid breakages and merge conflicts. So for production you change/add configuration to `config/prod.secret.exs`. +For from source installations, Akkoma configuration works by first importing the base config `config/config.exs`, then overriding it by the environment config `config/$MIX_ENV.exs` and then overriding it by user config `config/$MIX_ENV.secret.exs`. In from source installations you should always make the changes to the user config and NEVER to the base config to avoid breakages and merge conflicts. I.e. for production you change/add configuration to `config/prod.secret.exs`. To add configuration to your config file, you can copy it from the base config. The latest version of it can be viewed [here](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/config/config.exs). You can also use this file if you don't know how an option is supposed to be formatted. @@ -12,7 +12,7 @@ To add configuration to your config file, you can copy it from the base config. * `name`: The instance’s name. * `email`: Email used to reach an Administrator/Moderator of the instance. * `notify_email`: Email used for notifications. -* `description`: The instance’s description, can be seen in nodeinfo and ``/api/v1/instance``. +* `description`: The instance’s description, can be seen in nodeinfo and `/api/v1/instance`. * `limit`: Posts character limit (CW/Subject included in the counter). * `description_limit`: The character limit for image descriptions. * `remote_limit`: Hard character limit beyond which remote posts will be dropped. @@ -33,12 +33,12 @@ 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`: Permits remote instances to subscribe to all public posts of your instance. This may increase the visibility of your instance. -* `public`: Allows unauthenticated access to public resources on your instance. This is essentially used as the default value for `:restrict_unauthenticated`. +* `public`: Allows unauthenticated access to public resources on your instance. This is essentially used as the default value for `:restrict_unauthenticated`. See `restrict_unauthenticated` for more details. -* `quarantined_instances`: *DEPRECATED* ActivityPub instances where activities will not be sent. They can still reach there via other means, we just won't send them. +* `quarantined_instances`: *DEPRECATED* ActivityPub instances where activities will not be sent. They can still see our activities via other means, we just won't send them. * `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 - older software for theses nicknames. +* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). + This will break federation with older software for theses nicknames. * `max_pinned_statuses`: The maximum number of pinned statuses. `0` will disable the feature. * `autofollowed_nicknames`: Set to nicknames of (local) users that every new user should automatically follow. * `autofollowing_nicknames`: Set to nicknames of (local) users that automatically follows every newly registered user. @@ -46,7 +46,7 @@ To add configuration to your config file, you can copy it from the base config. * `max_report_comment_size`: The maximum size of the report comment (Default: `1000`). * `safe_dm_mentions`: If set to true, only mentions at the beginning of a post will be used to address people in direct messages. This is to prevent accidental mentioning of people when talking about them (e.g. "@friend hey i really don't like @enemy"). Default: `false`. * `healthcheck`: If set to true, system data will be shown on ``/api/v1/pleroma/healthcheck``. -* `remote_post_retention_days`: The default amount of days to retain remote posts when pruning the database. +* `remote_post_retention_days`: The default number of days to retain remote posts when pruning the database. * `user_bio_length`: A user bio maximum length (default: `5000`). * `user_name_length`: A user name maximum length (default: `100`). * `skip_thread_containment`: Skip filter out broken threads. The default is `false`. @@ -61,9 +61,9 @@ To add configuration to your config file, you can copy it from the base config. * `cleanup_attachments_delay`: How many seconds to wait after post deletion before attempting to deletion; useful for “delete & redraft” functionality (default: `1800`) * `show_reactions`: Let favourites and emoji reactions be viewed through the API (default: `true`). * `password_reset_token_validity`: The time after which reset tokens aren't accepted anymore, in seconds (default: one day). -* `local_bubble`: Array of domains representing instances closely related to yours. Used to populate the `bubble` timeline. e.g `["example.com"]`, (default: `[]`) -* `languages`: List of Language Codes used by the instance. This is used to try and set a default language from the frontend. It will try and find the first match between the languages set here and the user's browser languages. It will default to the first language in this setting if there is no match.. (default `["en"]`) -* `export_prometheus_metrics`: Enable prometheus metrics, served at `/api/v1/akkoma/metrics`, requiring the `admin:metrics` oauth scope. +* `local_bubble`: Array of domains representing instances closely related to yours. Used to populate the `bubble` timeline. e.g. `["example.com"]`, (default: `[]`) +* `languages`: List of Language Codes used by the instance. This is used to try and set a default language from the frontend. It will try and find the first match between the languages set here and the user's browser languages. It will default to the first language in this setting if there is no match. (default `["en"]`) +* `export_prometheus_metrics`: Enable prometheus metrics, served at `/api/v1/akkoma/metrics`, requiring the `admin:metrics` OAuth scope. * `privileged_staff`: Set to `true` to give moderators access to a few higher responsibility actions. * `federated_timeline_available`: Set to `false` to remove access to the federated timeline for all users. @@ -76,15 +76,15 @@ To add configuration to your config file, you can copy it from the base config. ## Welcome * `direct_message`: - welcome message sent as a direct message. - * `enabled`: Enables the send a direct message to a newly registered user. Defaults to `false`. + * `enabled`: Enables sending a direct message to a newly registered user. Defaults to `false`. * `sender_nickname`: The nickname of the local user that sends the welcome message. - * `message`: A message that will be send to a newly registered users as a direct message. + * `message`: A message that will be sent to a newly registered users as a direct message. * `email`: - welcome message sent as a email. - * `enabled`: Enables the send a welcome email to a newly registered user. Defaults to `false`. + * `enabled`: Enables sending a welcome email to newly registered users. Defaults to `false`. * `sender`: The email address or tuple with `{nickname, email}` that will use as sender to the welcome email. * `subject`: A subject of welcome email. - * `html`: A html that will be send to a newly registered users as a email. - * `text`: A text that will be send to a newly registered users as a email. + * `html`: A html that will be sent to newly registered users as an email. + * `text`: A text that will be sent to newly registered users as an email. Example: @@ -135,7 +135,7 @@ To add configuration to your config file, you can copy it from the base config. * `Pleroma.Web.ActivityPub.MRF.StealEmojiPolicy`: Steals all eligible emoji encountered in posts from remote instances (See [`:mrf_steal_emoji`](#mrf_steal_emoji)) * `Pleroma.Web.ActivityPub.MRF.SubchainPolicy`: Selectively runs other MRF policies when messages match (See [`:mrf_subchain`](#mrf_subchain)). - * `Pleroma.Web.ActivityPub.MRF.TagPolicy`: Applies policies to individual users based on tags, which can be set using pleroma-fe/admin-fe/any other app that supports Pleroma Admin API. For example it allows marking posts from individual users nsfw (sensitive). + * `Pleroma.Web.ActivityPub.MRF.TagPolicy`: Applies policies to individual users based on tags, which can be set using pleroma-fe/admin-fe/any other app that supports Pleroma Admin API. For example, it allows marking posts from individual users nsfw (sensitive). * `Pleroma.Web.ActivityPub.MRF.UserAllowListPolicy`: Drops all posts except from users specified in a list. (See [`:mrf_user_allowlist`](#mrf_user_allowlist)) * `Pleroma.Web.ActivityPub.MRF.VocabularyPolicy`: Restricts activities to a configured set of vocabulary. (See [`:mrf_vocabulary`](#mrf_vocabulary)). @@ -170,7 +170,7 @@ Additionally the following MRFs will *always* be aplied and cannot be disabled: * `media_removal`: List of instances to strip media attachments from and the reason for doing so. * `media_nsfw`: List of instances to tag all media as NSFW (sensitive) from and the reason for doing so. * `federated_timeline_removal`: List of instances to remove from the Federated Timeline (aka The Whole Known Network) and the reason for doing so. -* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so. Additionally prevents activities from being sent to that instance. +* `reject`: List of instances to reject activities (except deletes) from and the reason for doing so. Additionally, prevents activities from being sent to that instance. * `accept`: List of instances to only accept activities (except deletes) from and the reason for doing so. * `followers_only`: Force posts from the given instances to be visible by followers only and the reason for doing so. * `report_removal`: List of instances to reject reports from and the reason for doing so. @@ -203,8 +203,8 @@ config :pleroma, :mrf_subchain, * `reject_threshold`: Number of mentioned users after which the messaged gets rejected. Set to 0 to disable. #### :mrf_keyword -* `reject`: A list of patterns which result in message being rejected, each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html). -* `federated_timeline_removal`: A list of patterns which result in message being removed from federated timelines (a.k.a unlisted), each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html). +* `reject`: A list of patterns which result in a message being rejected, each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html). +* `federated_timeline_removal`: A list of patterns which result in message being removed from federated timelines (a.k.a. unlisted), each pattern can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html). * `replace`: A list of tuples containing `{pattern, replacement}`, `pattern` can be a string or a [regular expression](https://hexdocs.pm/elixir/Regex.html). #### :mrf_mention @@ -291,11 +291,11 @@ config :pleroma, :mrf_reject_newly_created_account_notes, age: 86400 ### :frontend_configurations -This can be used to configure a keyword list that keeps the configuration data for any kind of frontend. By default, settings for `pleroma_fe` and `masto_fe` are configured. You can find the documentation for `pleroma_fe` configuration into [Akkoma-FE configuration and customization for instance administrators](https://docs-fe.akkoma.dev/stable/CONFIGURATION/#options). +This can be used to configure a keyword list that keeps the configuration data for any kind of frontend. By default, settings for `pleroma_fe` and `masto_fe` are configured. You can find the documentation for `pleroma_fe` configuration into [akkoma-fe configuration and customization for instance administrators](https://docs-fe.akkoma.dev/stable/CONFIGURATION/#options). Frontends can access these settings at `/api/v1/pleroma/frontend_configurations` -To add your own configuration for Akkoma-FE, use it like this: +To add your own configuration for akkoma-fe, use it like this: ```elixir config :pleroma, :frontend_configurations, @@ -340,7 +340,7 @@ config :pleroma, :frontends, * `:primary` - The frontend that will be served at `/` * `:admin` - The frontend that will be served at `/pleroma/admin` * `:swagger` - Config for developers to act as an API reference to be served at `/pleroma/swaggerui/` (trailing slash _needed_). Disabled by default. -* `:mastodon` - The mastodon-fe configuration. This shouldn't need to be changed. This is served at `/web` when installed. +* `:mastodon` - The masto-fe configuration. This shouldn't need to be changed. This is served at `/web` when installed. ### :static\_fe @@ -352,20 +352,20 @@ Available options: ### :assets -This section configures assets to be used with various frontends. Currently the only option -relates to mascots on the mastodon frontend +This section configures assets to be used with various frontends. +Currently, the only option relates to mascots on masto-fe * `mascots`: KeywordList of mascots, each element __MUST__ contain both a `url` and a `mime_type` key. * `default_mascot`: An element from `mascots` - This will be used as the default mascot - on MastoFE (default: `:pleroma_fox_tan`). + on masto-fe (default: `:pleroma_fox_tan`). ### :manifest -This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE. +This section describes PWA manifest instance-specific values. Currently this option relate only for masto-fe. -* `icons`: Describe the icons of the app, this a list of maps describing icons in the same way as the - [spec](https://www.w3.org/TR/appmanifest/#imageresource-and-its-members) describes it. +* `icons`: Describe the icons of the app, this is a list of maps describing icons as + detailed in its [spec](https://www.w3.org/TR/appmanifest/#imageresource-and-its-members). Example: @@ -393,7 +393,7 @@ This section describe PWA manifest instance-specific values. Currently this opti * `shortcode_globs`: Location of custom emoji files. `*` can be used as a wildcard. Example `["/emoji/custom/**/*.png"]` * `pack_extensions`: A list of file extensions for emojis, when no emoji.txt for a pack is present. Example `[".png", ".gif"]` -* `groups`: Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the groupname and the value the location or array of locations. `*` can be used as a wildcard. Example `[Custom: ["/emoji/*.png", "/emoji/custom/*.png"]]` +* `groups`: Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name and the value the location or array of locations. `*` can be used as a wildcard. Example `[Custom: ["/emoji/*.png", "/emoji/custom/*.png"]]` * `default_manifest`: Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download. Currently only one manifest can be added (no arrays). * `shared_pack_cache_seconds_per_file`: When an emoji pack is shared, the archive is created and cached in memory for this amount of seconds multiplied by the number of files. @@ -404,14 +404,14 @@ This section describe PWA manifest instance-specific values. Currently this opti * `base_url`: The base URL to access a user-uploaded file. Using a (sub)domain distinct from the instance endpoint is **strongly** recommended. * `proxy_opts`: All options defined in `Pleroma.ReverseProxy` documentation, defaults to `[max_body_length: (25*1_048_576)]`. -* `whitelist`: List of hosts with scheme to bypass the mediaproxy (e.g. `https://example.com`) +* `whitelist`: List of hosts with scheme to bypass the media proxy (e.g. `https://example.com`) * `invalidation`: options for remove media from cache after delete object: * `enabled`: Enables purge cache - * `provider`: Which one of the [purge cache strategy](#purge-cache-strategy) to use. + * `provider`: Which one of the [purge cache strategies](#purge-cache-strategy) to use. ## :media_preview_proxy -* `enabled`: Enables proxying of remote media preview to the instance’s proxy. Requires enabled media proxy (`media_proxy/enabled`). +* `enabled`: Enables proxying of remote media preview to the instance’s proxy. Requires media proxy to be enabled (`media_proxy/enabled`). * `thumbnail_max_width`: Max width of preview thumbnail for images (video preview always has original dimensions). * `thumbnail_max_height`: Max height of preview thumbnail for images (video preview always has original dimensions). * `image_quality`: Quality of the output. Ranges from 0 (min quality) to 100 (max quality). @@ -421,8 +421,8 @@ This section describe PWA manifest instance-specific values. Currently this opti #### Pleroma.Web.MediaProxy.Invalidation.Script -This strategy allow perform external shell script to purge cache. -Urls of attachments are passed to the script as arguments. +This strategy allows executing an external shell script to purge cache. +URLs of attachments are passed to the script as arguments. * `script_path`: Path to the external script. * `url_format`: Set to `:htcacheclean` if using Apache's htcacheclean utility. @@ -436,7 +436,7 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, #### Pleroma.Web.MediaProxy.Invalidation.Http -This strategy allow perform custom http request to purge cache. +This strategy allows performing a custom HTTP request to purge cache. * `method`: http method. default is `purge` * `headers`: http headers. @@ -456,12 +456,12 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http, * `providers`: a list of metadata providers to enable. Providers available: * `Pleroma.Web.Metadata.Providers.OpenGraph` * `Pleroma.Web.Metadata.Providers.TwitterCard` -* `unfurl_nsfw`: If set to `true` nsfw attachments will be shown in previews. +* `unfurl_nsfw`: If set to `true` NSFW attachments will be shown in previews. ### :rich_media (consumer) -* `enabled`: if enabled the instance will parse metadata from attached links to generate link previews. +* `enabled`: if enabled, the instance will parse metadata from attached links to generate link previews. * `ignore_hosts`: list of hosts which will be ignored by the metadata parser. For example `["accounts.google.com", "xss.website"]`, defaults to `[]`. -* `ignore_tld`: list TLDs (top-level domains) which will ignore for parse metadata. default is ["local", "localdomain", "lan"]. +* `ignore_tld`: list of TLDs (top-level domains) which will ignore for parse metadata. The default is ["local", "localdomain", "lan"]. * `parsers`: list of Rich Media parsers. * `failure_backoff`: Amount of milliseconds after request failure, during which the request will not be retried. @@ -472,12 +472,12 @@ config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http, !!! note `Phoenix` endpoint configuration, all configuration options can be viewed [here](https://hexdocs.pm/phoenix/Phoenix.Endpoint.html#module-dynamic-configuration), only common options are listed here. -* `http` - a list containing http protocol configuration, all configuration options can be viewed [here](https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html#module-options), only common options are listed here. For deployment using docker, you need to set this to `[ip: {0,0,0,0}, port: 4000]` to make akkoma accessible from other containers (such as your nginx server). +* `http` - a list containing HTTP protocol configuration, all configuration options can be viewed [here](https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html#module-options), only common options are listed here. For deployment using Docker, you need to set this to `[ip: {0,0,0,0}, port: 4000]` to make akkoma accessible from other containers (such as your nginx server). - `ip` - a tuple consisting of 4 integers - `port` -* `url` - a list containing the configuration for generating urls, accepts +* `url` - a list containing the configuration for generating URLs, accepts - `host` - the host without the scheme and a post (e.g `example.com`, not `https://example.com:2020`) - - `scheme` - e.g `http`, `https` + - `scheme` - e.g. `http`, `https` - `port` - `path` * `extra_cookie_attrs` - a list of `Key=Value` strings to be added as non-standard cookie attributes. Defaults to `["SameSite=Lax"]`. See the [SameSite article](https://www.owasp.org/index.php/SameSite) on OWASP for more info. @@ -492,14 +492,14 @@ config :pleroma, Pleroma.Web.Endpoint, ] ``` -This will make Akkoma listen on `127.0.0.1` port `8080` and generate urls starting with `https://example.com:2020` +This will make Akkoma listen on `127.0.0.1` port `8080` and generate URLs starting with `https://example.com:2020` ### :http_security * ``enabled``: Whether the managed content security policy is enabled. * ``sts``: Whether to additionally send a `Strict-Transport-Security` header. * ``sts_max_age``: The maximum age for the `Strict-Transport-Security` header if sent. * ``referrer_policy``: The referrer policy to use, either `"same-origin"` or `"no-referrer"`. -* ``report_uri``: Adds the specified url to `report-uri` and `report-to` group in CSP header. +* ``report_uri``: Adds the specified URL to `report-uri` and `report-to` group in CSP header. ### Pleroma.Web.Plugs.RemoteIp @@ -515,11 +515,10 @@ Available options: * `proxies` - A list of upstream proxy IP subnets in CIDR notation from which we will parse the content of `headers`. Defaults to `[]`. IPv4 entries without a bitmask will be assumed to be /32 and IPv6 /128. * `reserved` - A list of reserved IP subnets in CIDR notation which should be ignored if found in `headers`. Defaults to `["127.0.0.0/8", "::1/128", "fc00::/7", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]`. - ### :rate_limit !!! note - If your instance is behind a reverse proxy ensure [`Pleroma.Web.Plugs.RemoteIp`](#pleroma-plugs-remoteip) is enabled (it is enabled by default). + If your instance is behind a reverse proxy, ensure [`Pleroma.Web.Plugs.RemoteIp`](#pleroma-plugs-remoteip) is enabled (it is enabled by default). A keyword list of rate limiters where a key is a limiter name and value is the limiter configuration. The basic configuration is a tuple where: @@ -539,18 +538,18 @@ config :pleroma, :rate_limit, Means that: 1. In 60 seconds, 15 authentication attempts can be performed from the same IP address. -2. In 1 second, 10 search requests can be performed from the same IP adress by unauthenticated users, while authenticated users can perform 30 search requests per second. +2. In 1 second, 10 search requests can be performed from the same IP address by unauthenticated users, while authenticated users can perform 30 search requests per second. Supported rate limiters: * `:search` - Account/Status search. -* `:timeline` - Timeline requests (each timeline has it's own limiter). +* `:timeline` - Timeline requests (each timeline has its own limiter). * `:app_account_creation` - Account registration from the API. * `:relations_actions` - Following/Unfollowing in general. * `:relation_id_action` - Following/Unfollowing for a specific user. * `:statuses_actions` - Status actions such as: (un)repeating, (un)favouriting, creating, deleting. * `:status_id_action` - (un)Repeating/(un)Favouriting a particular status. -* `:authentication` - Authentication actions, i.e getting an OAuth token. +* `:authentication` - Authentication actions, i.e. getting an OAuth token. * `:password_reset` - Requesting password reset emails. * `:account_confirmation_resend` - Requesting resending account confirmation emails. * `:ap_routes` - Requesting statuses via ActivityPub. @@ -603,7 +602,7 @@ the source code is here: [kocaptcha](https://github.com/koto-bank/kocaptcha). Th * `uploader`: Which one of the [uploaders](#uploaders) to use. * `filters`: List of [upload filters](#upload-filters) to use. -* `link_name`: When enabled Akkoma will add a `name` parameter to the url of the upload, for example `https://instance.tld/media/corndog.png?name=corndog.png`. This is needed to provide the correct filename in Content-Disposition headers +* `link_name`: When enabled Akkoma will add a `name` parameter to the URL of the upload, for example `https://instance.tld/media/corndog.png?name=corndog.png`. This is needed to provide the correct filename in Content-Disposition headers * `base_url`: The base URL to access a user-uploaded file; MUST be configured explicitly. Using a (sub)domain distinct from the instance endpoint is **strongly** recommended. A good value might be `https://media.myakkoma.instance/media/`. * `proxy_opts`: Proxy options, see `Pleroma.ReverseProxy` documentation. @@ -616,7 +615,7 @@ the source code is here: [kocaptcha](https://github.com/koto-bank/kocaptcha). Th #### Pleroma.Uploaders.Local -* `uploads`: Which directory to store the user-uploads in, relative to pleroma’s working directory. +* `uploads`: Which directory to store the user-uploads in, relative to akkoma’s working directory. #### Pleroma.Uploaders.S3 @@ -658,7 +657,7 @@ This filter replaces the declared filename (not the path) of an upload. #### Pleroma.Upload.Filter.Exiftool.StripMetadata -This filter strips metadata with Exiftool leaving color profiles and orientation intact. +This filter strips metadata with ExifTool leaving color profiles and orientation intact. * `purge`: List of Exiftool tag names or tag group names to purge * `preserve`: List of Exiftool tag names or tag group names to preserve even if they occur in the purge list @@ -678,16 +677,16 @@ No specific configuration. #### Pleroma.Upload.Filter.Mogrify -* `args`: List of actions for the `mogrify` command like `"strip"` or `["strip", "auto-orient", {"implode", "1"}]`. +* `args`: List of actions for the `mogrify` command, like `"strip"` or `["strip", "auto-orient", {"implode", "1"}]`. ## Email ### Pleroma.Emails.Mailer * `adapter`: one of the mail adapters listed in [Swoosh readme](https://github.com/swoosh/swoosh#adapters), or `Swoosh.Adapters.Local` for in-memory mailbox. * `api_key` / `password` and / or other adapter-specific settings, per the above documentation. -* `enabled`: Allows enable/disable send emails. Default: `false`. +* `enabled`: whether your instance is allowed to send emails. Default: `false`. -An example for Sendgrid adapter: +An example for SendGrid adapter: ```elixir config :pleroma, Pleroma.Emails.Mailer, @@ -729,7 +728,7 @@ Email notifications settings. ### Pleroma.Emails.NewUsersDigestEmail -- `:enabled` - a boolean, enables new users admin digest email when `true`. Defaults to `false`. +- `:enabled` - a boolean, enables admin-digest email about new users when `true`. Defaults to `false`. ## Background jobs @@ -824,7 +823,7 @@ config :logger, :ex_syslogger, level: :warn ``` -Another example, keeping console output and adding the pid to syslog output: +Another example, keeping console output and adding the PID to syslog output: ```elixir config :logger, backends: [:console, {ExSyslogger, :ex_syslogger}] @@ -871,7 +870,7 @@ This will probably take a long time. ### :admin_token -Allows to set a token that can be used to authenticate with the admin api without using an actual user by giving it as the `admin_token` parameter or `x-admin-token` HTTP header. Example: +Allows to set a token that can be used to authenticate with the admin API without using an actual user by giving it as the `admin_token` parameter or `x-admin-token` HTTP header. Example: ```elixir config :pleroma, :admin_token, "somerandomtoken" @@ -889,7 +888,8 @@ or curl -H "X-Admin-Token: somerandomtoken" "http://localhost:4000/api/v1/pleroma/admin/users/invites" ``` -Warning: it's discouraged to use this feature because of the associated security risk: static / rarely changed instance-wide token is much weaker compared to email-password pair of a real admin user; consider using HTTP Basic Auth or OAuth-based authentication instead. +!!! warning + It's discouraged to use this feature because of the associated security risk: static / rarely changed instance-wide token is much weaker compared to email-password pair of a real admin user; consider using HTTP Basic Auth or OAuth-based authentication instead. ### :auth @@ -909,8 +909,8 @@ Authentication / authorization settings. Use LDAP for user authentication. When a user logs in to the Akkoma instance, the name and password will be verified by trying to authenticate (bind) to an LDAP server. If a user exists in the LDAP directory but there -is no account with the same name yet on the Akkoma instance then a new -Akkoma account will be created with the same name as the LDAP user name. +is no account with the same name yet on the Akkoma instance, then a new +Akkoma account will be created with the same name as the LDAP username. * `enabled`: enables LDAP authentication * `host`: LDAP server hostname @@ -931,20 +931,20 @@ OAuth 2.0 provider settings: * `token_expires_in` - The lifetime in seconds of the access token. * `issue_new_refresh_token` - Keeps old refresh token or generate new refresh token when to obtain an access token. -* `clean_expired_tokens` - Enable a background job to clean expired oauth tokens. Defaults to `false`. +* `clean_expired_tokens` - Enable a background job to clean expired OAuth tokens. Defaults to `false`. OAuth 2.0 provider and related endpoints: -* `POST /api/v1/apps` creates client app basing on provided params. +* `POST /api/v1/apps` creates client app basing on provided parameters. * `GET/POST /oauth/authorize` renders/submits authorization form. * `POST /oauth/token` creates/renews OAuth token. * `POST /oauth/revoke` revokes provided OAuth token. -* `GET /api/v1/accounts/verify_credentials` (with proper `Authorization` header or `access_token` URI param) returns user info on requester (with `acct` field containing local nickname and `fqn` field containing fully-qualified nickname which could generally be used as email stub for OAuth software that demands email field in identity endpoint response, like Peertube). +* `GET /api/v1/accounts/verify_credentials` (with proper `Authorization` header or `access_token` URI parameter) returns user info on requester (with `acct` field containing local nickname and `fqn` field containing fully-qualified nickname which could generally be used as email stub for OAuth software that demands email field in identity endpoint response, like Peertube). ### OAuth consumer mode OAuth consumer mode allows sign in / sign up via external OAuth providers (e.g. Twitter, Facebook, Google, Microsoft, etc.). -Implementation is based on Ueberauth; see the list of [available strategies](https://github.com/ueberauth/ueberauth/wiki/List-of-Strategies). +Implementation is based on Überauth; see the list of [available strategies](https://github.com/ueberauth/ueberauth/wiki/List-of-Strategies). !!! note Each strategy is shipped as a separate dependency; in order to get the strategies, run `OAUTH_CONSUMER_STRATEGIES="..." mix deps.get`, e.g. `OAUTH_CONSUMER_STRATEGIES="twitter facebook google microsoft" mix deps.get`. The server should also be started with `OAUTH_CONSUMER_STRATEGIES="..." mix phx.server` in case you enable any strategies. @@ -1025,7 +1025,7 @@ config :pleroma, :frontend_configurations, ## Link parsing ### :uri_schemes -* `valid_schemes`: List of the scheme part that is considered valid to be an URL. +* `valid_schemes`: List of the scheme part that is considered valid to be a URL. ### Pleroma.Formatter @@ -1034,10 +1034,10 @@ Configuration for Akkoma's link formatter which parses mentions, hashtags, and U * `class` - specify the class to be added to the generated link (default: `false`) * `rel` - specify the rel attribute (default: `ugc`) * `new_window` - adds `target="_blank"` attribute (default: `false`) -* `truncate` - Set to a number to truncate URLs longer then the number. Truncated URLs will end in `...` (default: `false`) +* `truncate` - Set to a number to truncate URLs longer than the number. Truncated URLs will end in `...` (default: `false`) * `strip_prefix` - Strip the scheme prefix (default: `false`) * `extra` - link URLs with rarely used schemes (magnet, ipfs, irc, etc.) (default: `true`) -* `validate_tld` - Set to false to disable TLD validation for URLs/emails. Can be set to :no_scheme to validate TLDs only for urls without a scheme (e.g `example.com` will be validated, but `http://example.loki` won't) (default: `:no_scheme`) +* `validate_tld` - Set to false to disable TLD validation for URLs/emails. Can be set to :no_scheme to validate TLDs only for URLs without a scheme (e.g `example.com` will be validated, but `http://example.loki` won't) (default: `:no_scheme`) Example: @@ -1073,7 +1073,7 @@ git clone ## :configurable_from_database -Boolean, enables/disables in-database configuration. Read [Transfering the config to/from the database](../administration/CLI_tasks/config.md) for more information. +Boolean, enables/disables in-database configuration. Read [transferring the config to/from the database](../administration/CLI_tasks/config.md) for more information. ## :database_config_whitelist @@ -1123,12 +1123,13 @@ Turning any of the `:restrict_unauthenticated` options to `true` will restrict a #### When :instance, :public is `false` -When `:instance, :public` is set to `false`, all of the `:restrict_unauthenticated` options will effectively be set to `true` by default, +When `:instance, :public` is set to `false`, all `:restrict_unauthenticated` options will effectively be set to `true` by default, meaning that only authenticated users will be able to access the corresponding resources. If you'd like to allow unauthenticated access to specific resources, you can turn these settings to `false`. -**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). +!!! 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 @@ -1145,7 +1146,7 @@ Control favicons for instances. !!! note Requires enabled email -* `:purge_after_days` an integer, remove backup achives after N days. +* `:purge_after_days` an integer, remove backup archives after N days. * `:limit_days` an integer, limit user to export not more often than once per N days. * `:dir` a string with a path to backup temporary directory or `nil` to let Akkoma choose temporary directory in the following order: 1. the directory named by the TMPDIR environment variable @@ -1157,7 +1158,7 @@ Control favicons for instances. ### Theme settings Settings to change theme as exposed to the outside world, for software -that scans `index.html` (mainly misskey) +that scans `index.html` (mainly Misskey) ``` config :pleroma, Pleroma.Web.Metadata.Providers.Theme, theme_color: "#593196" @@ -1182,7 +1183,7 @@ Settings to restrict concurrently running jobs. Jobs which can be configured: Each job has these settings: -* `:max_running` - max concurrently runnings jobs +* `:max_running` - max concurrently running jobs * `:max_waiting` - max waiting jobs ### Translation Settings @@ -1212,6 +1213,6 @@ Translations are available at `/api/v1/statuses/:id/translations/:language`, whe ### `:argos_translate` -- `:command_argos_translate` - command for `argos-translate`. Can be the command if it's in your PATH, or the full path to the file (default: `argos-translate`). +- `:command_argos_translate` - command for `argos-translate`. Can be the command if it's in your PATH, or the full path to the file (default: `argos-translate`). - `:command_argospm` - command for `argospm`. Can be the command if it's in your PATH, or the full path to the file (default: `argospm`). - `:strip_html` - Strip html from the post before translating it (default: `true`). diff --git a/docs/docs/configuration/custom_emoji.md b/docs/docs/configuration/custom_emoji.md index a883e8bf2..bd71fb4dd 100644 --- a/docs/docs/configuration/custom_emoji.md +++ b/docs/docs/configuration/custom_emoji.md @@ -46,7 +46,7 @@ config :pleroma, :emoji, ] ``` -Order of the `groups` matters, so to override default tags just put your group on top of the list. E.g: +Order of the `groups` matters, so to override default tags, just put your group on top of the list. E.g: ```elixir config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"], diff --git a/docs/docs/configuration/frontend_management.md b/docs/docs/configuration/frontend_management.md index 8875ee279..be07d6255 100644 --- a/docs/docs/configuration/frontend_management.md +++ b/docs/docs/configuration/frontend_management.md @@ -2,7 +2,7 @@ Frontends in Akkoma are swappable, you can pick which you'd like. -For a basic setup, you can set a frontends for the key `primary` and `admin` and the options of `name` and `ref`. This will then make Akkoma serve the frontend from a folder constructed by concatenating the instance static path, `frontends` and the name and ref. +For a basic setup, you can set a frontend for the key `primary` and `admin` and the options of `name` and `ref`. This will then make Akkoma serve the frontend from a folder constructed by concatenating the instance static path, `frontends` and the name and ref. The key `primary` refers to the frontend that will be served by default for general requests. The key `admin` refers to the frontend that will be served at the `/pleroma/admin` path. @@ -34,15 +34,15 @@ If you choose not to install a frontend for whatever reason, it is recommended t You can also replace the default "no frontend" page by placing an `index.html` file under your `instance/static/` directory. -## Mastodon-FE +## masto-fe -Akkoma supports both [glitchsoc](https://github.com/glitch-soc/mastodon)'s more "vanilla" mastodon frontend, +Akkoma supports both [glitch-soc](https://github.com/glitch-soc/mastodon)'s more "vanilla" mastodon frontend, as well as [fedibird](https://github.com/fedibird/mastodon)'s extended frontend which has near-feature-parity with akkoma (with quoting and reactions). -To enable either one, you must run the `frontend.install` task for either `mastodon-fe` or `fedibird-fe` (both `--ref akkoma`), then make sure +To enable either one, you must run the `frontend.install` task for either `masto-fe` or `fedibird-fe` (both `--ref akkoma`), then make sure `:pleroma, :frontends, :mastodon` references the one you want. -## Swagger (openAPI) documentation viewer +## Swagger (OpenAPI) documentation viewer If you're a developer and you'd like a human-readable rendering of the API documentation, you can enable [Swagger UI](https://github.com/swagger-api/swagger-ui). diff --git a/docs/docs/configuration/hardening.md b/docs/docs/configuration/hardening.md index f8ba048dd..618e7222e 100644 --- a/docs/docs/configuration/hardening.md +++ b/docs/docs/configuration/hardening.md @@ -81,7 +81,7 @@ Use private `/tmp` and `/var/tmp` folders inside a new file system namespace, wh > Recommended value: `true` -The `/home`, `/root`, and `/run/user` folders can not be accessed by this service anymore. If your Akkoma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to `false`. +The `/home`, `/root`, and `/run/user` folders cannot be accessed by this service anymore. If your Akkoma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to `false`. ### ProtectSystem diff --git a/docs/docs/configuration/how_to_serve_another_domain_for_webfinger.md b/docs/docs/configuration/how_to_serve_another_domain_for_webfinger.md index ccf13ad84..6d6df2571 100644 --- a/docs/docs/configuration/how_to_serve_another_domain_for_webfinger.md +++ b/docs/docs/configuration/how_to_serve_another_domain_for_webfinger.md @@ -11,7 +11,7 @@ Akkoma supports that, but it might be tricky to set up, and any error might prev It is important to understand that for federation purposes, a user in Akkoma has two unique identifiers associated: -- A webfinger `acct:` URI, used for discovery and as a verifiable global name for the user across Akkoma instances. In our example, our account's acct: URI is `acct:user@example.org` +- A WebFinger `acct:` URI, used for discovery and as a verifiable global name for the user across Akkoma instances. In our example, our account's acct: URI is `acct:user@example.org` - An author/actor URI, used in every other aspect of federation. This is the way in which users are identified in ActivityPub, the underlying protocol used for federation with other Akkoma instances. In our case, it is `https://akkoma.example.org/users/user`. @@ -19,7 +19,7 @@ Both account identifiers are unique and required for Akkoma. An important risk i ## WebFinger -As said earlier, each Akkoma user has an `acct`: URI, which is used for discovery and authentication. When you add @user@example.org, a webfinger query is performed. This is done in two steps: +As said earlier, each Akkoma user has an `acct`: URI, which is used for discovery and authentication. When you add @user@example.org, a WebFinger query is performed. This is done in two steps: 1. Querying `https://example.org/.well-known/host-meta` (where the domain of the URL matches the domain part of the `acct`: URI) to get information on how to perform the query. This file will indeed contain a URL template of the form `https://example.org/.well-known/webfinger?resource={uri}` that will be used in the second step. @@ -27,7 +27,8 @@ This file will indeed contain a URL template of the form `https://example.org/.w ## Configuring your Akkoma instance -**_DO NOT ATTEMPT TO CONFIGURE YOUR INSTANCE THIS WAY IF YOU DID NOT UNDERSTAND THE ABOVE_** +!!! danger + DO NOT ATTEMPT TO CONFIGURE YOUR INSTANCE THIS WAY IF YOU DID NOT UNDERSTAND THE ABOVE ### Configuring Akkoma @@ -47,7 +48,7 @@ config :pleroma, Pleroma.Web.WebFinger, domain: "example.org" ### Configuring WebFinger domain -Now, you have Akkoma running at `https://akkoma.example.org` as well as a website at `https://example.org`. If you recall how webfinger queries work, the first step is to query `https://example.org/.well-known/host-meta`, which will contain an URL template. +Now, you have Akkoma running at `https://akkoma.example.org` as well as a website at `https://example.org`. If you recall how WebFinger queries work, the first step is to query `https://example.org/.well-known/host-meta`, which will contain a URL template. Therefore, the easiest way to configure `example.org` is to redirect `/.well-known/host-meta` to `akkoma.example.org`. diff --git a/docs/docs/configuration/howto_database_config.md b/docs/docs/configuration/howto_database_config.md index a6dea5640..d5d70b705 100644 --- a/docs/docs/configuration/howto_database_config.md +++ b/docs/docs/configuration/howto_database_config.md @@ -1,7 +1,7 @@ # How to activate Akkoma in-database configuration ## Explanation -The configuration of Akkoma (and Pleroma) has traditionally been managed with a config file, e.g. `config/prod.secret.exs`. This method requires a restart of the application for any configuration changes to take effect. We have made it possible to control most settings in the AdminFE interface after running a migration script. +The configuration of Akkoma (and Pleroma) has traditionally been managed with a config file, e.g. `config/prod.secret.exs`. This method requires a restart of the application for any configuration changes to take effect. We have made it possible to control most settings in the admin-fe interface after running a migration script. ## Migration to database config @@ -74,7 +74,7 @@ The configuration of Akkoma (and Pleroma) has traditionally been managed with a config :pleroma, configurable_from_database: true ``` -5. Restart your instance and you can now access the Settings tab in AdminFE. +5. Restart your instance and you can now access the Settings tab in admin-fe. ## Reverting back from database config @@ -130,7 +130,7 @@ You can clear the database config with the following command: Additionally, every time you migrate the configuration to the database the config table is automatically truncated to ensure a clean migration. ### Manually removing a setting -If you encounter a situation where the server cannot run properly because of an invalid setting in the database and this is preventing you from accessing AdminFE, you can manually remove the offending setting if you know which one it is. +If you encounter a situation where the server cannot run properly because of an invalid setting in the database and this is preventing you from accessing admin-fe, you can manually remove the offending setting if you know which one it is. e.g., here is an example showing a the removal of the `config :pleroma, :instance` settings: diff --git a/docs/docs/configuration/howto_proxy.md b/docs/docs/configuration/howto_proxy.md index 2ddd73192..4f2089d80 100644 --- a/docs/docs/configuration/howto_proxy.md +++ b/docs/docs/configuration/howto_proxy.md @@ -1,5 +1,5 @@ # How to configure upstream proxy for federation -If you want to proxify all http requests (e.g. for TOR) that Akkoma makes to an upstream proxy server, edit your config file (`dev.secret.exs` or `prod.secret.exs`) and add the following: +If you want to proxify all HTTP requests (e.g. for TOR) that Akkoma makes to an upstream proxy server, edit your config file (`dev.secret.exs` or `prod.secret.exs`) and add the following: ``` config :pleroma, :http, diff --git a/docs/docs/configuration/howto_search_cjk.md b/docs/docs/configuration/howto_search_cjk.md index ba5863451..9c0352f62 100644 --- a/docs/docs/configuration/howto_search_cjk.md +++ b/docs/docs/configuration/howto_search_cjk.md @@ -15,7 +15,7 @@ In most cases, you would need an extension installed to support parsing CJK text Once you have the new search config , make sure you test it with the `pleroma` user in PostgreSQL (change `YOUR.CONFIG` to your real configuration name) ``` -SELECT ts_debug('YOUR.CONFIG', '安装和配置Nginx, ElixirとErlangをインストールします'); +SELECT ts_debug('YOUR.CONFIG', '安装和配置nginx, ElixirとErlangをインストールします'); ``` Check output of the query, and see if it matches your expectation. diff --git a/docs/docs/configuration/howto_theming_your_instance.md b/docs/docs/configuration/howto_theming_your_instance.md index e29143db8..35448a13f 100644 --- a/docs/docs/configuration/howto_theming_your_instance.md +++ b/docs/docs/configuration/howto_theming_your_instance.md @@ -47,7 +47,7 @@ Now you'll already be able to select the theme in Pleroma FE from the drop-down. ### Give the theme a name -When you open one of the themes that ship with Akkoma, you'll notice that the json has a `"name"` key. Add a key-value pair to your theme where the key name is `"name"` and the value the name you want to give your theme. After this you can refresh te page in your browser and the name should be visible in the drop-down. +When you open one of the themes that ship with Akkoma, you'll notice that the JSON has a `"name"` key. Add a key-value pair to your theme where the key name is `"name"` and the value the name you want to give your theme. After this you can refresh the page in your browser and the name should be visible in the drop-down. Example of `my-awesome-theme.json` where we add the name "My Awesome Theme" ```json @@ -70,4 +70,4 @@ config :pleroma, :frontend_configurations, } ``` -If you added it in the back-end configuration file, you'll need to restart your instance for the changes to take effect. If you don't see the changes, it's probably because the browser has cached the previous theme. In that case you'll want to clear browser caches. Alternatively you can use a private/incognito window just to see the changes. +If you added it in the back-end configuration file, you'll need to restart your instance for the changes to take effect. If you don't see the changes, it's probably because the browser has cached the previous theme. In that case you'll want to clear browser caches. Alternatively, you can use a private/incognito window just to see the changes. diff --git a/docs/docs/configuration/i2p.md b/docs/docs/configuration/i2p.md index 1fb18d1c0..17dbe62e5 100644 --- a/docs/docs/configuration/i2p.md +++ b/docs/docs/configuration/i2p.md @@ -1,4 +1,4 @@ -# I2P Federation and Accessability +# I2P Federation and Accessibility This guide is going to focus on the Akkoma federation aspect. The actual installation is neatly explained in the official documentation, and more likely to remain up-to-date. It might be added to this guide if there will be a need for that. @@ -15,9 +15,10 @@ One using the config, and one using external software (fedproxy). The external s ### Using the Config -**Warning:** So far, everytime I followed this way of federating using I2P, the rest of my federation stopped working. I'm leaving this here in case it will help with making it work. +!!! warning + So far, everytime I followed this way of federating using I2P, the rest of my federation stopped working. I'm leaving this here in case it will help with making it work. -Assuming you're running in prod, cd to your Akkoma folder and append the following to `config/prod.secret.exs`: +Assuming you're running in prod, `cd` to your Akkoma folder and append the following to `config/prod.secret.exs`: ``` config :pleroma, :http, proxy_url: {:socks5, :localhost, 4447} ``` @@ -45,7 +46,7 @@ To use [fedproxy](https://github.com/majestrate/fedproxy) you'll need to install ``` apt install golang ``` -Use a different user than akkoma or root. Run the following to add the Gopath to your ~/.bashrc. +Use a different user than akkoma or root. Run the following to add the `GOPATH` to your ~/.bashrc. ``` echo "export GOPATH=/home/ren/.go" >> ~/.bashrc ``` @@ -103,7 +104,7 @@ systemctl start i2pd.service *Notice:* The stop command initiates a graceful shutdown process, i2pd stops after finishing to route transit tunnels (maximum 10 minutes). Now you'll have to find your address. -To do that you can download and use I2PD tools.[^1] +To do that, you can download and use I2PD tools.[^1] Or you'll need to access your web-console on localhost:7070. If you don't have a GUI, you'll have to SSH tunnel into it like this: `ssh -L 7070:127.0.0.1:7070 user@ip -p port`. @@ -130,7 +131,7 @@ config :pleroma, :http_security, enabled: false ``` -In the Nginx config, add the following into the `location /` block: +In the nginx config, add the following into the `location /` block: ```nginx add_header X-XSS-Protection "0"; add_header X-Permitted-Cross-Domain-Policies none; @@ -146,7 +147,7 @@ listen 127.0.0.1:14447; Set `server_name` to your i2p address. -Reload Nginx: +Reload nginx: ``` systemctl restart i2pd.service --no-block systemctl reload nginx.service diff --git a/docs/docs/configuration/integrations/howto_ejabberd.md b/docs/docs/configuration/integrations/howto_ejabberd.md index c7f752a77..b09526fe0 100644 --- a/docs/docs/configuration/integrations/howto_ejabberd.md +++ b/docs/docs/configuration/integrations/howto_ejabberd.md @@ -1,10 +1,10 @@ -# Configuring Ejabberd (XMPP Server) to use Akkoma for authentication +# Configuring ejabberd (XMPP Server) to use Akkoma for authentication -If you want to give your Akkoma users an XMPP (chat) account, you can configure [Ejabberd](https://github.com/processone/ejabberd) to use your Akkoma server for user authentication, automatically giving every local user an XMPP account. +If you want to give your Akkoma users an XMPP (chat) account, you can configure [ejabberd](https://github.com/processone/ejabberd) to use your Akkoma server for user authentication, automatically giving every local user an XMPP account. -In general, you just have to follow the configuration described at [https://docs.ejabberd.im/admin/configuration/authentication/#external-script](https://docs.ejabberd.im/admin/configuration/authentication/#external-script). Please read this section carefully. +In general, you just have to follow the configuration described at [https://docs.ejabberd.im/admin/configuration/authentication/#external-script](https://docs.ejabberd.im/admin/configuration/authentication/#external-script). Please read this section carefully. -Copy the script below to suitable path on your system and set owner and permissions. Also do not forget adjusting `AKKOMA_HOST` and `AKKOMA_PORT`, if necessary. +Copy the script below to a suitable path on your system and set owner and permissions. Also do not forget adjusting `AKKOMA_HOST` and `AKKOMA_PORT`, if necessary. ```bash cp akkoma_ejabberd_auth.py /etc/ejabberd/akkoma_ejabberd_auth.py @@ -12,7 +12,7 @@ chown ejabberd /etc/ejabberd/akkoma_ejabberd_auth.py chmod 700 /etc/ejabberd/akkoma_ejabberd_auth.py ``` -Set external auth params in ejabberd.yaml file: +Set external auth parameters in ejabberd.yaml file: ```bash auth_method: [external] @@ -23,8 +23,7 @@ auth_use_cache: false Restart / reload your ejabberd service. -After restarting your Ejabberd server, your users should now be able to connect with their Akkoma credentials. - +After restarting your ejabberd server, your users should now be able to connect with their Akkoma credentials. ```python import sys @@ -33,7 +32,6 @@ import http.client from base64 import b64encode import logging - AKKOMA_HOST = "127.0.0.1" AKKOMA_PORT = "4000" AUTH_ENDPOINT = "/api/v1/accounts/verify_credentials" diff --git a/docs/docs/configuration/integrations/howto_mongooseim.md b/docs/docs/configuration/integrations/howto_mongooseim.md index 807ae2289..1bbf2b718 100644 --- a/docs/docs/configuration/integrations/howto_mongooseim.md +++ b/docs/docs/configuration/integrations/howto_mongooseim.md @@ -5,6 +5,6 @@ If you want to give your Akkoma users an XMPP (chat) account, you can configure In general, you just have to follow the configuration described at [https://mongooseim.readthedocs.io/en/latest/authentication-backends/HTTP-authentication-module/](https://mongooseim.readthedocs.io/en/latest/authentication-backends/HTTP-authentication-module/) and do these changes to your mongooseim.cfg. 1. Set the auth_method to `{auth_method, http}`. -2. Add the http auth pool like this: `{http, global, auth, [{workers, 50}], [{server, "https://yourakkomainstance.com"}]}` +2. Add the HTTP auth pool like this: `{http, global, auth, [{workers, 50}], [{server, "https://yourakkomainstance.com"}]}` Restart your MongooseIM server, your users should now be able to connect with their Akkoma credentials. diff --git a/docs/docs/configuration/mrf.md b/docs/docs/configuration/mrf.md index 0a17b3112..74f6a8287 100644 --- a/docs/docs/configuration/mrf.md +++ b/docs/docs/configuration/mrf.md @@ -11,7 +11,7 @@ Possible uses include: * removing media from messages * sending only public messages to a specific instance -The MRF provides user-configurable policies. The default policy is `NoOpPolicy`, which disables the MRF functionality. Akkoma also includes an easy to use policy called `SimplePolicy` which maps messages matching certain pre-defined criterion to actions built into the policy module. +The MRF provides user-configurable policies. The default policy is `NoOpPolicy`, which disables the MRF functionality. Akkoma also includes an easy-to-use policy called `SimplePolicy` which maps messages matching certain pre-defined criterion to actions built into the policy module. It is possible to use multiple, active MRF policies at the same time. @@ -29,7 +29,7 @@ config :pleroma, :mrf, Once `SimplePolicy` is enabled, you can configure various groups in the `:mrf_simple` config object. These groups are: -* `reject`: Servers in this group will have their messages rejected. Also outbound messages will not be sent to these servers. +* `reject`: Servers in this group will have their messages rejected. Also, outbound messages will not be sent to these servers. * `accept`: If not empty, only messages from these instances will be accepted (whitelist federation). * `media_nsfw`: Servers in this group will have the #nsfw tag and sensitive setting injected into incoming messages which contain media. * `media_removal`: Servers in this group will have media stripped from incoming messages. @@ -151,7 +151,7 @@ Please note that the Akkoma developers consider custom MRF policy modules to fal ### MRF policies descriptions -If MRF policy depends on config, it can be added into MRF tab to adminFE by adding `config_description/0` method, which returns a map with a specific structure. See existing MRF's like `lib/pleroma/web/activity_pub/mrf/activity_expiration_policy.ex` for examples. Note that more complex inputs, like tuples or maps, may need extra changes in the adminFE and just adding it to `config_description/0` may not be enough to get these inputs working from the adminFE. +If MRF policy depends on config, it can be added into MRF tab to admin-fe by adding `config_description/0` method, which returns a map with a specific structure. See existing MRF's like `lib/pleroma/web/activity_pub/mrf/activity_expiration_policy.ex` for examples. Note that more complex inputs, like tuples or maps, may need extra changes in the admin-fe and just adding it to `config_description/0` may not be enough to get these inputs working from the admin-fe. Example: diff --git a/docs/docs/configuration/onion_federation.md b/docs/docs/configuration/onion_federation.md index 26efbae42..b894ed539 100644 --- a/docs/docs/configuration/onion_federation.md +++ b/docs/docs/configuration/onion_federation.md @@ -5,7 +5,7 @@ In addition, federating with such instances will also help furthering that goal. This is a guide to show you how it can be easily done. This guide assumes you already got Akkoma working, and that it's running on the default port 4000. -This guide also assumes you're using Nginx as the reverse proxy. +This guide also assumes you're using nginx as the reverse proxy. To install Tor on Debian / Ubuntu: ``` @@ -21,7 +21,7 @@ HiddenServicePort 80 127.0.0.1:8099 HiddenServiceVersion 3 # Remove if Tor version is below 0.3 ( tor --version ) HTTPTunnelPort 9080 ``` -Restart Tor to generate an adress: +Restart Tor to generate an address: ``` systemctl restart tor@default.service ``` @@ -63,7 +63,7 @@ If creating a Tor-only instance, open `config/prod.secret.exs` and under "config In addition to that, replace the existing nginx config's contents with the example below. ## Existing Instance (Clearnet Instance) -If not a Tor-only instance, +If not a Tor-only instance, add the nginx config below to your existing config at `/etc/nginx/sites-enabled/akkoma.nginx`. --- @@ -74,7 +74,7 @@ config :pleroma, :http_security, enabled: false ``` -In the Nginx config, add the following into the `location /` block: +In the nginx config, add the following into the `location /` block: ```nginx add_header X-XSS-Protection "0"; add_header X-Permitted-Cross-Domain-Policies none; @@ -90,7 +90,7 @@ listen 127.0.0.1:8099; Set the `server_name` to your onion address. -Reload Nginx: +Reload nginx: ``` systemctl reload nginx ``` @@ -101,7 +101,7 @@ You should now be able to both access your instance using Tor and federate with ### Possible Issues -* In Debian, make sure your hidden service folder `/var/lib/tor/akkoma_hidden_service/` and its contents, has debian-tor as both owner and group by using +* In Debian, make sure your hidden service folder `/var/lib/tor/akkoma_hidden_service/` and its contents, has debian-tor as both owner and group by using ``` ls -la /var/lib/tor/ ``` diff --git a/docs/docs/configuration/optimisation/optimizing_beam.md b/docs/docs/configuration/optimisation/optimizing_beam.md index 747773f3e..3bd4a13fd 100644 --- a/docs/docs/configuration/optimisation/optimizing_beam.md +++ b/docs/docs/configuration/optimisation/optimizing_beam.md @@ -1,6 +1,6 @@ # Optimizing the BEAM -Akkoma is built upon the Erlang/OTP VM known as BEAM. The BEAM VM is highly optimized for latency, but this has drawbacks in environments without dedicated hardware. One of the tricks used by the BEAM VM is [busy waiting](https://en.wikipedia.org/wiki/Busy_waiting). This allows the application to pretend to be busy working so the OS kernel does not pause the application process and switch to another process waiting for the CPU to execute its workload. It does this by spinning for a period of time which inflates the apparent CPU usage of the application so it is immediately ready to execute another task. This can be observed with utilities like **top(1)** which will show consistently high CPU usage for the process. Switching between procesess is a rather expensive operation and also clears CPU caches further affecting latency and performance. The goal of busy waiting is to avoid this penalty. +Akkoma is built upon the Erlang/OTP VM known as BEAM. The BEAM VM is highly optimized for latency, but this has drawbacks in environments without dedicated hardware. One of the tricks used by the BEAM VM is [busy waiting](https://en.wikipedia.org/wiki/Busy_waiting). This allows the application to pretend to be busy working so the OS kernel does not pause the application process and switch to another process waiting for the CPU to execute its workload. It does this by spinning for a period of time which inflates the apparent CPU usage of the application so it is immediately ready to execute another task. This can be observed with utilities like **top(1)** which will show consistently high CPU usage for the process. Switching between processes is a rather expensive operation and also clears CPU caches further affecting latency and performance. The goal of busy waiting is to avoid this penalty. This strategy is very successful in making a performant and responsive application, but is not desirable on Virtual Machines or hardware with few CPU cores. Akkoma instances are often deployed on the same server as the required PostgreSQL database which can lead to situations where the Akkoma application is holding the CPU in a busy-wait loop and as a result the database cannot process requests in a timely manner. The fewer CPUs available, the more this problem is exacerbated. The latency is further amplified by the OS being installed on a Virtual Machine as the Hypervisor uses CPU time-slicing to pause the entire OS and switch between other tasks. @@ -18,7 +18,6 @@ Please only change these settings if you are experiencing issues or really know * AWS (known to use burst scheduling) - ## Example configurations Tuning the BEAM requires you provide a config file normally called [vm.args](http://erlang.org/doc/man/erl.html#emulator-flags). If you are using systemd to manage the service you can modify the unit file as such: diff --git a/docs/docs/configuration/optimisation/varnish_cache.md b/docs/docs/configuration/optimisation/varnish_cache.md index 1598354f5..b5dbd9489 100644 --- a/docs/docs/configuration/optimisation/varnish_cache.md +++ b/docs/docs/configuration/optimisation/varnish_cache.md @@ -4,29 +4,29 @@ Varnish is a layer that sits between your web server and your backend applicatio it does something similar to nginx caching, but tends to be optimised for speed over all else. -To set up a varnish cache, first you'll need to install varnish. +To set up a Varnish cache, first you'll need to install Varnish. This will vary by distribution, and since this is a rather advanced guide, no copy-paste instructions are provided. It's probably in your distribution's package manager, though. `apt-get install varnish` and so on. -Once you have varnish installed, you'll need to configure it to work with akkoma. +Once you have Varnish installed, you'll need to configure it to work with akkoma. -Copy the configuration file to the varnish configuration directory: +Copy the configuration file to the Varnish configuration directory: cp installation/akkoma.vcl /etc/varnish/akkoma.vcl -You may want to check if varnish added a `default.vcl` file to the same directory, -if so you can just remove it without issue. +You may want to check if Varnish added a `default.vcl` file to the same directory, +if so, you can just remove it without issue. -Then boot up varnish, probably `systemctl start varnish` or `service varnish start`. +Then boot up Varnish, probably `systemctl start varnish` or `service varnish start`. Now you should be able to `curl -D- localhost:6081` and see a bunch of akkoma javascript. -Once that's out of the way, we can point our webserver at varnish. This +Once that's out of the way, we can point our webserver at Varnish. This -=== "Nginx" +=== "nginx" upstream phoenix { server 127.0.0.1:6081 max_fails=5 fail_timeout=60s; @@ -51,4 +51,4 @@ if (std.port(server.ip) != 443) { } ``` -This will allow your webserver alone to handle redirects. \ No newline at end of file +This will allow your webserver alone to handle redirects. diff --git a/docs/docs/configuration/postgresql.md b/docs/docs/configuration/postgresql.md index 420ba7319..8bc0ad63e 100644 --- a/docs/docs/configuration/postgresql.md +++ b/docs/docs/configuration/postgresql.md @@ -10,4 +10,4 @@ It is also recommended to not use "Network Storage" option. If your server runs other services, you may want to take that into account. E.g. if you have 4G ram, but 1G of it is already used for other services, it may be better to tell PGTune you only have 3G. -In the end, PGTune only provides recomended settings, you can always try to finetune further. +In the end, PGTune only provides recommended settings, you can always try to finetune further. diff --git a/docs/docs/configuration/search.md b/docs/docs/configuration/search.md index 4c6bc412f..149368d83 100644 --- a/docs/docs/configuration/search.md +++ b/docs/docs/configuration/search.md @@ -18,7 +18,7 @@ around 4 gigabytes. Like [RUM](./cheatsheet.md#rum-indexing-for-full-text-search higher performance and ordering by timestamp in a reasonable amount of time. Additionally, the search results seem to be more accurate. -Due to high memory usage, it may be best to set it up on a different machine, if running pleroma on a low-resource +Due to high memory usage, it may be best to set it up on a different machine, if running akkoma on a low-resource computer, and use private key authentication to secure the remote search instance. To use [meilisearch](https://www.meilisearch.com/), set the search module to `Pleroma.Search.Meilisearch`: @@ -26,8 +26,8 @@ To use [meilisearch](https://www.meilisearch.com/), set the search module to `Pl > config :pleroma, Pleroma.Search, module: Pleroma.Search.Meilisearch You then need to set the address of the meilisearch instance, and optionally the private key for authentication. You might -also want to change the `initial_indexing_chunk_size` to be smaller if you're server is not very powerful, but not higher than `100_000`, -because meilisearch will refuse to process it if it's too big. However, in general you want this to be as big as possible, because meilisearch +also want to change the `initial_indexing_chunk_size` to be smaller if your server is not very powerful, but not higher than `100_000`, +because Meilisearch will refuse to process it if it's too big. However, in general you want this to be as big as possible, because Meilisearch indexes faster when it can process many posts in a single batch. > config :pleroma, Pleroma.Search.Meilisearch, @@ -36,7 +36,7 @@ indexes faster when it can process many posts in a single batch. > search_key: "search key", > initial_indexing_chunk_size: 100_000 -Information about setting up meilisearch can be found in the +Information about setting up Meilisearch can be found in the [official documentation](https://docs.meilisearch.com/learn/getting_started/installation.html). You probably want to start it with `MEILI_NO_ANALYTICS=true` environment variable to disable analytics. At least version 0.25.0 is required, but you are strongly adviced to use at least 0.26.0, as it introduces @@ -93,7 +93,7 @@ To start the initial indexing, run the `index` command: ``` This will show you the total amount of posts to index, and then show you the amount of posts indexed currently, until the numbers eventually -become the same. The posts are indexed in big batches and meilisearch will take some time to actually index them, even after you have +become the same. The posts are indexed in big batches and Meilisearch will take some time to actually index them, even after you have inserted all the posts into it. Depending on the amount of posts, this may be as long as several hours. To get information about the status of indexing and how many posts have actually been indexed, use the `stats` command: @@ -131,9 +131,9 @@ depends on the amount of text in posts. **Note: This requires at least ElasticSearch 7** -As with meilisearch, this can be rather memory-hungry, but it is very good at what it does. +As with Meilisearch, this can be rather memory-hungry, but it is very good at what it does. -To use [elasticsearch](https://www.elastic.co/), set the search module to `Pleroma.Search.Elasticsearch`: +To use [Elasticsearch](https://www.elastic.co/), set the search module to `Pleroma.Search.Elasticsearch`: > config :pleroma, Pleroma.Search, module: Pleroma.Search.Elasticsearch @@ -146,7 +146,7 @@ You then need to set the URL and authentication credentials if relevant. ### Initial indexing -After setting up the configuration, you'll want to index all of your already existsing posts. You'll only have to do it one time, but it might take a while, depending on the amount of posts your instance has seen. +After setting up the configuration, you'll want to index all of your already existsing posts. You'll only have to do it one time, but it might take a while, depending on the amount of posts your instance has seen. The sequence of actions is as follows: diff --git a/docs/docs/configuration/static_dir.md b/docs/docs/configuration/static_dir.md index 30d7ced40..617956fce 100644 --- a/docs/docs/configuration/static_dir.md +++ b/docs/docs/configuration/static_dir.md @@ -49,7 +49,7 @@ Add `$static_dir/instance/thumbnail.jpeg` with your selfie or other neat picture ## Instance-specific panel -Create and Edit your file at `$static_dir/instance/panel.html`. +Create and edit your file at `$static_dir/instance/panel.html`. ## Background @@ -69,7 +69,7 @@ config :pleroma, :frontend_configurations, !!! 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 the static directory `$static_dir/static/logo.png`. +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 to your logo in [your configuration](../cheatsheet/#frontend_configurations). @@ -91,21 +91,21 @@ Terms of Service will be shown to all users on the registration page. It's the b ## Favicon -The favicon will display on the frontend, and in the browser tab. +The favicon will display on the frontend, and in the browser tab. Place a PNG file at `$static_dir/favicon.png` to change the favicon. Not that this is _one level above_ where the logo is placed, it should be on the same level as the `frontends` directory. - + ## Styling rendered pages To overwrite the CSS stylesheet of the OAuth form and other static pages, you can upload your own CSS file to `instance/static/static.css`. This will completely replace the CSS used by those pages, so it might be a good idea to copy the one from `priv/static/instance/static.css` and make your changes. -## Overriding pleroma-fe styles +## Overriding akkoma-fe styles -To overwrite the CSS stylesheet of pleroma-fe, you can put a file at +To overwrite the CSS stylesheet of akkoma-fe, you can put a file at `$static_dir/static/custom.css` containing your styles. These will be loaded with the rest of the CSS. You will probably have to put `!important` on most/all your styles to override the -default ones, due to the specificity precedence of CSS. \ No newline at end of file +default ones, due to the specificity precedence of CSS. diff --git a/docs/docs/configuration/storing_remote_media.md b/docs/docs/configuration/storing_remote_media.md index a0f099a87..fb6a15513 100644 --- a/docs/docs/configuration/storing_remote_media.md +++ b/docs/docs/configuration/storing_remote_media.md @@ -1,10 +1,10 @@ # Storing Remote Media -Akkoma does not store remote/federated media by default. The best way to achieve this is to change Nginx to keep its reverse proxy cache +Akkoma does not store remote/federated media by default. The best way to achieve this is to change nginx to keep its reverse proxy cache for a year and to activate the `MediaProxyWarmingPolicy` MRF policy in Akkoma which will automatically fetch all media through the proxy as soon as the post is received by your instance. -## Nginx +## nginx The following are excerpts from the [suggested nginx config](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/installation/nginx/akkoma.nginx) that demonstrates the necessary config for the media proxy to work. diff --git a/docs/docs/development/API/admin_api.md b/docs/docs/development/API/admin_api.md index 6efae59b3..ff1e30f4e 100644 --- a/docs/docs/development/API/admin_api.md +++ b/docs/docs/development/API/admin_api.md @@ -137,7 +137,7 @@ Backwards-compatibility for admin API endpoints without version prefixes (`/api/ ## `GET /api/v1/pleroma/admin/users/:nickname/permission_group` -### Get user user permission groups membership +### Get user permission groups membership - Params: none - Response: @@ -153,7 +153,7 @@ Backwards-compatibility for admin API endpoints without version prefixes (`/api/ Note: Available `:permission_group` is currently moderator and admin. 404 is returned when the permission group doesn’t exist. -### Get user user permission groups membership per permission group +### Get user permission groups membership per permission group - Params: none - Response: @@ -303,7 +303,7 @@ Removes the user(s) from follower recommendations. ## `GET /api/v1/pleroma/admin/users/:nickname_or_id` -### Retrive the details of a user +### Retrieve the details of a user - Params: - `nickname` or `id` @@ -313,7 +313,7 @@ Removes the user(s) from follower recommendations. ## `GET /api/v1/pleroma/admin/users/:nickname_or_id/statuses` -### Retrive user's latest statuses +### Retrieve user's latest statuses - Params: - `nickname` or `id` @@ -337,7 +337,7 @@ Removes the user(s) from follower recommendations. ## `GET /api/v1/pleroma/admin/instances/:instance/statuses` -### Retrive instance's latest statuses +### Retrieve instance's latest statuses - Params: - `instance`: instance name @@ -377,7 +377,7 @@ It may take some time. ## `GET /api/v1/pleroma/admin/statuses` -### Retrives all latest statuses +### Retrieves all latest statuses - Params: - *optional* `page_size`: number of statuses to return (default is `20`) @@ -414,7 +414,7 @@ Params: Response: -* On success: relay json object +* On success: relay JSON object ```json {"actor": "https://example.com/relay", "followed_back": true} @@ -505,7 +505,7 @@ Response: ## `POST /api/v1/pleroma/admin/users/email_invite` -### Sends registration invite via email +### Sends a registration invite via email - Params: - `email` @@ -528,7 +528,6 @@ Response: ### Get a password reset token for a given nickname - - Params: none - Response: @@ -541,7 +540,7 @@ Response: ## `PATCH /api/v1/pleroma/admin/users/force_password_reset` -### Force passord reset for a user with a given nickname +### Force password reset for a user with a given nickname - Params: - `nicknames` @@ -960,7 +959,7 @@ Status: 404 ## `GET /api/v1/pleroma/admin/need_reboot` -### Returns the flag whether the pleroma should be restarted +### Returns whether Akkoma should be restarted - Params: none - Response: @@ -975,7 +974,7 @@ Status: 404 ### Get list of merged default settings with saved in database. -*If `need_reboot` is `true`, instance must be restarted, so reboot time settings can take effect.* +*If `need_reboot` is `true`, the instance must be restarted, so reboot time settings can take effect.* **Only works when configuration from database is enabled.** @@ -1044,7 +1043,7 @@ Most of the settings will be applied in `runtime`, this means that you don't nee - `delete` - true (*optional*, if setting must be deleted) - `subkeys` - array of strings (*optional*, only works when `delete=true` parameter is passed, otherwise will be ignored) -*When a value have several nested settings, you can delete only some nested settings by passing a parameter `subkeys`, without deleting all settings by key.* +*When a value has several nested settings, you can delete only some nested settings by passing a parameter `subkeys`, without deleting all settings by key.* ``` [subkey: val1, subkey2: val2, subkey3: val3] \\ initial value {"group": ":pleroma", "key": "some_key", "delete": true, "subkeys": [":subkey", ":subkey3"]} \\ passing json for deletion @@ -1130,7 +1129,7 @@ List of settings which support only full update by subkey: ## ` GET /api/v1/pleroma/admin/config/descriptions` ### Get JSON with config descriptions. -Loads json generated from `config/descriptions.exs`. +Loads JSON generated from `config/descriptions.exs`. - Params: none - Response: diff --git a/docs/docs/development/API/differences_in_mastoapi_responses.md b/docs/docs/development/API/differences_in_mastoapi_responses.md index 990806cea..9183468d2 100644 --- a/docs/docs/development/API/differences_in_mastoapi_responses.md +++ b/docs/docs/development/API/differences_in_mastoapi_responses.md @@ -1,10 +1,10 @@ # Differences in Mastodon API responses from vanilla Mastodon -A Akkoma instance can be identified by " (compatible; Akkoma )" present in `version` field in response from `/api/v1/instance` +An Akkoma instance can be identified by " (compatible; Akkoma )" present in `version` field in response from `/api/v1/instance` ## Flake IDs -Akkoma uses 128-bit ids as opposed to Mastodon's 64 bits. However, just like Mastodon's ids, they are lexically sortable strings +Akkoma uses 128-bit IDs as opposed to Mastodon's 64 bits. However, just like Mastodon's IDs, they are lexically sortable strings ## Timelines @@ -101,11 +101,11 @@ Endpoints which accept `with_relationships` parameter: Has these additional fields under the `pleroma` object: -- `ap_id`: nullable URL string, ActivityPub id of the user +- `ap_id`: nullable URL string, ActivityPub ID of the user - `background_image`: nullable URL string, background image of the user - `tags`: Lists an array of tags for the user - `relationship` (object): Includes fields as documented for Mastodon API https://docs.joinmastodon.org/entities/relationship/ -- `is_moderator`: boolean, nullable, true if user is a moderator +- `is_moderator`: boolean, nullable, true if user is a moderator - `is_admin`: boolean, nullable, true if user is an admin - `confirmation_pending`: boolean, true if a new user account is waiting on email confirmation to be activated - `hide_favorites`: boolean, true when the user has hiding favorites enabled @@ -131,8 +131,8 @@ Has these additional fields under the `akkoma` object: Has these additional fields under the `pleroma` object: -- `show_role`: boolean, nullable, true when the user wants his role (e.g admin, moderator) to be shown -- `no_rich_text` - boolean, nullable, true when html tags are stripped from all statuses requested from the API +- `show_role`: boolean, nullable, true when the user wants his role (e.g. admin, moderator) to be shown +- `no_rich_text` - boolean, nullable, true when HTML tags are stripped from all statuses requested from the API - `discoverable`: boolean, true when the user allows external services (search bots) etc. to index / list the account (regardless of this setting, user will still appear in regular search results) - `actor_type`: string, the type of this account. @@ -200,7 +200,7 @@ An endpoint to delete multiple statuses by IDs. Required parameters: -- `ids`: array of activity ids +- `ids`: array of activity IDs Usage example: `DELETE /api/v1/notifications/destroy_multiple/?ids[]=1&ids[]=2`. @@ -261,7 +261,7 @@ All images (avatar, banner and background) can be reset to the default by sendin ### Akkoma Settings Store -Akkoma has mechanism that allows frontends to save blobs of json for each user on the backend. This can be used to save frontend-specific settings for a user that the backend does not need to know about. +Akkoma has a mechanism that allows frontends to save blobs of json for each user on the backend. This can be used to save frontend-specific settings for a user that the backend does not need to know about. The parameter should have a form of `{frontend_name: {...}}`, with `frontend_name` identifying your type of client, e.g. `pleroma_fe`. It will overwrite everything under this property, but will not overwrite other frontend's settings. @@ -340,7 +340,7 @@ Permits these additional alert types: Has these additional fields under the `pleroma` object: -- `unread_count`: contains number unread notifications +- `unread_count`: contains number of unread notifications ## Streaming @@ -352,7 +352,7 @@ For viewing remote server timelines, there are `public:remote` and `public:remot Akkoma streams follow relationships updates as `pleroma:follow_relationships_update` events to the `user` stream. -The message payload consist of: +The message payload consists of: - `state`: a relationship state, one of `follow_pending`, `follow_accept` or `follow_reject`. diff --git a/docs/docs/development/authentication_authorization.md b/docs/docs/development/authentication_authorization.md index f9a1a763f..a4d32179a 100644 --- a/docs/docs/development/authentication_authorization.md +++ b/docs/docs/development/authentication_authorization.md @@ -10,7 +10,7 @@ For routes with `:authenticated_api` pipeline, authentication & authorization are expected, thus `OAuthScopesPlug` will be run unless explicitly skipped (also `EnsureAuthenticatedPlug` will be executed immediately before action even if there was an early run to give an early error, since `OAuthScopesPlug` supports `:proceed_unauthenticated` option, and other plugs may support similar options as well). - For `:api` pipeline routes, it'll be verified whether `OAuthScopesPlug` was called or explicitly skipped, and if it was not then auth information will be dropped for request. Then `EnsurePublicOrAuthenticatedPlug` will be called to ensure that either the instance is not private or user is authenticated (unless explicitly skipped). Such automated checks help to prevent human errors and result in higher security / privacy for users. + For `:api` pipeline routes, it'll be verified whether `OAuthScopesPlug` was called or explicitly skipped, and if it was not, then auth information will be dropped for request. Then `EnsurePublicOrAuthenticatedPlug` will be called to ensure that either the instance is not private or user is authenticated (unless explicitly skipped). Such automated checks help to prevent human errors and result in higher security / privacy for users. ## Non-OAuth authentication diff --git a/docs/docs/development/index.md b/docs/docs/development/index.md index 8f2dd52d0..a1520184e 100644 --- a/docs/docs/development/index.md +++ b/docs/docs/development/index.md @@ -20,16 +20,16 @@ The docs are written in Markdown, including certain extensions, and can be found Akkoma is written in [Elixir](https://elixir-lang.org/) and uses [Postgresql](https://www.postgresql.org/) for database. We use [Git](https://git-scm.com/) for collaboration and tracking code changes. Furthermore it can typically run on [Unix and Unix-like OS'es](https://en.wikipedia.org/wiki/Unix-like). For development, you should use an OS which [can run Akkoma](../installation/debian_based_en/). -It's good to have at least some basic understanding of at least Git and Elixir. If this is completely new for you, there's some [videos explaining Git](https://git-scm.com/doc) and Codeberg has a nice article explaining the typical [pull requests Git flow](https://docs.codeberg.org/collaborating/pull-requests-and-git-flow/). For Elixir, you can follow Elixir's own [Getting Started guide](https://elixir-lang.org/getting-started/introduction.html). +It's good to have at least some basic understanding of at least Git and Elixir. If this is completely new for you, there are some [videos explaining Git](https://git-scm.com/doc) and Codeberg has a nice article explaining the typical [pull requests Git flow](https://docs.codeberg.org/collaborating/pull-requests-and-git-flow/). For Elixir, you can follow Elixir's own [Getting Started guide](https://elixir-lang.org/getting-started/introduction.html). ## Setting up a development environment -The best way to start is getting the software to run from source so you can start poking on it. Check out the [guides for setting up an Akkoma instance for development](setting_up_akkoma_dev/#setting-up-a-akkoma-development-environment). +The best way to start is getting the software to run from source, so you can start poking on it. Check out the [guides for setting up an Akkoma instance for development](setting_up_akkoma_dev/#setting-up-a-akkoma-development-environment). ## General overview ### Modules -Akkoma has several modules. There are modules for [uploading](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/uploaders), [upload filters](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/upload/filter), [translators](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/akkoma/translators)... The most famous ones are without a doubt the [MRF policies](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/web/activity_pub/mrf). Modules are often self contained and a good way to start with development because you don't have to think about much more than just the module itself. We even have an example on [writing your own MRF policy](/configuration/mrf/#writing-your-own-mrf-policy)! +Akkoma has several modules. There are modules for [uploading](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/uploaders), [upload filters](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/upload/filter), [translators](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/akkoma/translators)... The most famous ones are without a doubt the [MRF policies](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/web/activity_pub/mrf). Modules are often self-contained and a good way to start with development because you don't have to think about much more than just the module itself. We even have an example on [writing your own MRF policy](/configuration/mrf/#writing-your-own-mrf-policy)! Another easy entry point is the [mix tasks](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/mix/tasks/pleroma). They too are often self contained and don't need you to go through much of the code. diff --git a/docs/docs/development/setting_up_akkoma_dev.md b/docs/docs/development/setting_up_akkoma_dev.md index feded9904..f77491be6 100644 --- a/docs/docs/development/setting_up_akkoma_dev.md +++ b/docs/docs/development/setting_up_akkoma_dev.md @@ -1,4 +1,4 @@ -# Setting up a Akkoma development environment +# Setting up an Akkoma development environment Akkoma requires some adjustments from the defaults for running the instance locally. The following should help you to get started. @@ -9,15 +9,15 @@ Akkoma requires some adjustments from the defaults for running the instance loca * You can use your own fork of the repository and add akkoma as a remote `git remote add akkoma 'https://akkoma.dev/AkkomaGang/akkoma.git'` * For domain you can use `localhost` * For the DB you can still choose a dedicated user. The mix tasks sets it up, so it's no extra work for you - * instead of creating a `prod.secret.exs`, create `dev.secret.exs` + * Instead of creating a `prod.secret.exs`, create `dev.secret.exs` * No need to prefix with `MIX_ENV=prod`. We're using dev and that's the default MIX_ENV * You can skip nginx and systemd * For front-end, you'll probably want to install and use the develop branch instead of the stable branch. There's no guarantee that the stable branch of the FE will always work on the develop branch of the BE. 2. Change the dev.secret.exs * Change the FE settings to use the installed branch (see also [Frontend Management](/configuration/frontend_management/)) - * Change the scheme in `config :pleroma, Pleroma.Web.Endpoint` to http (see examples below) + * Change the scheme in `config :pleroma, Pleroma.Web.Endpoint` to HTTP (see examples below) * If you want to change other settings, you can do that too -3. You can now start the server with `mix phx.server`. Once it's build and started, you can access the instance on `http://:` (e.g.http://localhost:4000 ) and should be able to do everything locally you normally can. +3. You can now start the server with `mix phx.server`. Once it's build and started, you can access the instance on `http://:` (e.g. http://localhost:4000 ) and should be able to do everything locally you normally can. Example on how to install pleroma-fe and admin-fe using it's develop branch ```sh @@ -32,7 +32,7 @@ config :pleroma, :frontends, admin: %{"name" => "admin-fe", "ref" => "develop"} ``` -Example config to change the scheme to http. Change the port if you want to run on another port. +Example config to change the scheme to HTTP. Change the port if you want to run on another port. ```elixir config :pleroma, Pleroma.Web.Endpoint, url: [host: "localhost", scheme: "http", port: 4000], @@ -53,7 +53,7 @@ config :logger, :console, ## Testing with HTTPS -If you end up developing alongside other software like misskey, +If you end up developing alongside other software like Misskey, you will not be able to federate without an SSL certificate. You should be able to use the snakeoil certificate that comes standard with most distributions or generate one from scratch, then force elixir to accept it. diff --git a/docs/docs/index.md b/docs/docs/index.md index 8608f8196..3b391d24a 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -3,9 +3,9 @@ # Introduction to Akkoma ## What is Akkoma? Akkoma is a federated social networking platform, compatible with Mastodon and other ActivityPub implementations. It is free software licensed under the AGPLv3. -It actually consists of two components: a backend, named simply Akkoma, and a user-facing frontend, named Akkoma-FE. It also includes the Mastodon frontend, if that's your thing. -It's part of what we call the fediverse, a federated network of instances which speak common protocols and can communicate with each other. -One account on an instance is enough to talk to the entire fediverse! +It actually consists of two components: a backend, named simply Akkoma, and a user-facing frontend, named akkoma-fe. It also includes the Mastodon frontend, if that's your thing. +It's part of what we call the Fediverse, a federated network of instances which speak common protocols and can communicate with each other. +One account on an instance is enough to talk to the entire Fediverse! ## Community Channels @@ -29,15 +29,14 @@ If you don't feel like joining an existing instance, but instead prefer to deplo Installation instructions can be found in the installation section of these docs. ## I got an account, now what? -Great! Now you can explore the fediverse! Open the login page for your Akkoma instance (e.g. ) and login with your username and password. (If you don't have an account yet, click on Register) +Great! Now you can explore the Fediverse! Open the login page for your Akkoma instance (e.g. ) and login with your username and password. (If you don't have an account yet, click on Register) -### Akkoma-FE -The default front-end used by Akkoma is Akkoma-FE. You can find more information on what it is and how to use it in the [Introduction to Akkoma-FE](https://docs-fe.akkoma.dev/stable/). +### akkoma-fe +The default front-end used by Akkoma is akkoma-fe. You can find more information on what it is and how to use it in the [Introduction to akkoma-fe](https://docs-fe.akkoma.dev/stable/). ### Mastodon interface -If the Akkoma-FE interface isn't your thing, or you're just trying something new but you want to keep using the familiar Mastodon interface, we got that too! -Just add a "/web" after your instance url (e.g. ) and you'll end on the Mastodon web interface, but with a Akkoma backend! MAGIC! +If the akkoma-fe interface isn't your thing, or you're just trying something new but you want to keep using the familiar Mastodon interface, we got that too! +Just add a "/web" after your instance URL (e.g. ) and you'll end on the Mastodon web interface, but with a Akkoma backend! MAGIC! The Mastodon interface is from the Glitch-soc fork. For more information on the Mastodon interface you can check the [Mastodon](https://docs.joinmastodon.org/) and [Glitch-soc](https://glitch-soc.github.io/docs/) documentation. Remember, what you see is only the frontend part of Mastodon, the backend is still Akkoma. - diff --git a/docs/docs/installation/alpine_linux_en.md b/docs/docs/installation/alpine_linux_en.md index e5f88ac30..ad865d7ec 100644 --- a/docs/docs/installation/alpine_linux_en.md +++ b/docs/docs/installation/alpine_linux_en.md @@ -137,7 +137,7 @@ doas -u akkoma env MIX_ENV=prod mix phx.server If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Akkoma and you should consider to create an OpenRC service file for Akkoma. -#### Nginx +#### nginx * Install nginx, if not already done: diff --git a/docs/docs/installation/arch_linux_en.md b/docs/docs/installation/arch_linux_en.md index 3e6476a94..d9fb56c0e 100644 --- a/docs/docs/installation/arch_linux_en.md +++ b/docs/docs/installation/arch_linux_en.md @@ -20,7 +20,7 @@ This guide will assume that you have administrative rights, either as root or a * `nginx` (preferred, example configs for other reverse proxies can be found in the repo) * `certbot` (or any other ACME client for Let’s Encrypt certificates) -* `ImageMagick` +* `imagemagick` * `ffmpeg` * `exiftool` @@ -130,7 +130,7 @@ sudo -Hu akkoma MIX_ENV=prod mix phx.server If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Akkoma and you should consider to create a systemd service file for Akkoma. -#### Nginx +#### nginx * Install nginx, if not already done: diff --git a/docs/docs/installation/debian_based_en.md b/docs/docs/installation/debian_based_en.md index 83c979d2e..61e04975d 100644 --- a/docs/docs/installation/debian_based_en.md +++ b/docs/docs/installation/debian_based_en.md @@ -144,7 +144,7 @@ sudo -Hu akkoma MIX_ENV=prod mix phx.server If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Akkoma and you should consider to create a systemd service file for Akkoma. -#### Nginx +#### nginx * Install nginx, if not already done: diff --git a/docs/docs/installation/docker_en.md b/docs/docs/installation/docker_en.md index 9551b034a..44286e5ff 100644 --- a/docs/docs/installation/docker_en.md +++ b/docs/docs/installation/docker_en.md @@ -113,7 +113,7 @@ This is a tad more complex in docker than on the host itself. It You've got two options. -#### Running caddy in a container +#### Running Caddy in a container This is by far the easiest option. It'll handle HTTPS and all that for you. diff --git a/docs/docs/installation/fedora_based_en.md b/docs/docs/installation/fedora_based_en.md index 40cdaf19a..78102a15e 100644 --- a/docs/docs/installation/fedora_based_en.md +++ b/docs/docs/installation/fedora_based_en.md @@ -127,7 +127,7 @@ sudo -Hu akkoma MIX_ENV=prod mix phx.server If you want to open your newly installed instance to the world, you should run nginx or some other webserver/proxy in front of Akkoma and you should consider to create a systemd service file for Akkoma. -#### Nginx +#### nginx * Install nginx, if not already done: diff --git a/docs/docs/installation/gentoo_en.md b/docs/docs/installation/gentoo_en.md index 0e54a3e32..a7dd464ee 100644 --- a/docs/docs/installation/gentoo_en.md +++ b/docs/docs/installation/gentoo_en.md @@ -181,7 +181,7 @@ It probably won't work over the public internet quite yet, however, as we still Assuming you want to open your newly installed federated social network to, well, the federation, you should run nginx or some other webserver/proxy in front of Akkoma. It is also a good idea to set up Akkoma to run as a system service. -#### Nginx +#### nginx * Install nginx, if not already done: @@ -197,7 +197,7 @@ Assuming you want to open your newly installed federated social network to, well * Append the following line at the end of the `http` block in `/etc/nginx/nginx.conf`: -```Nginx +```nginx include sites-enabled/*; ``` diff --git a/docs/docs/installation/openbsd_en.md b/docs/docs/installation/openbsd_en.md index 51909fdd7..db8004653 100644 --- a/docs/docs/installation/openbsd_en.md +++ b/docs/docs/installation/openbsd_en.md @@ -16,7 +16,7 @@ pkg_add elixir gmake git postgresql-server postgresql-contrib cmake ffmpeg erlan pkg_add erlang-wx # Choose the latest version as package version when promted ``` -Akkoma 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. +Akkoma 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. #### Optional software diff --git a/docs/docs/installation/optional/media_graphics_packages.md b/docs/docs/installation/optional/media_graphics_packages.md index 922635fd0..52124b03c 100644 --- a/docs/docs/installation/optional/media_graphics_packages.md +++ b/docs/docs/installation/optional/media_graphics_packages.md @@ -1,30 +1,30 @@ # Optional software packages needed for specific functionality -For specific Akkoma functionality (which is disabled by default) some or all of the below packages are required: - * `ImageMagick` - * `ffmpeg` - * `exiftool` +For specific Akkoma functionality (which is disabled by default) some or all of the below projects are required: + * ImageMagick + * ffmpeg + * ExifTool Please refer to documentation in `docs/installation` on how to install them on specific OS. Note: the packages are not required with the current default settings of Akkoma. -## `ImageMagick` +## ImageMagick -`ImageMagick` is a set of tools to create, edit, compose, or convert bitmap images. +ImageMagick provides a set of tools to create, edit, compose, or convert bitmap images. It is required for the following Akkoma features: * `Pleroma.Upload.Filters.Mogrify`, `Pleroma.Upload.Filters.Mogrifun` upload filters (related config: `Pleroma.Upload/filters` in `config/config.exs`) * Media preview proxy for still images (related config: `media_preview_proxy/enabled` in `config/config.exs`) -## `ffmpeg` +## ffmpeg `ffmpeg` is software to record, convert and stream audio and video. It is required for the following Akkoma features: * Media preview proxy for videos (related config: `media_preview_proxy/enabled` in `config/config.exs`) -## `exiftool` +## ExifTool `exiftool` is media files metadata reader/writer. diff --git a/docs/docs/installation/otp_en.md b/docs/docs/installation/otp_en.md index cdd1ba95d..a61cfdae3 100644 --- a/docs/docs/installation/otp_en.md +++ b/docs/docs/installation/otp_en.md @@ -58,7 +58,7 @@ Other than things bundled in the OTP release Akkoma depends on: Per [`docs/installation/optional/media_graphics_packages.md`](optional/media_graphics_packages.md): * ImageMagick * ffmpeg - * exiftool + * ExifTool === "Alpine" ``` @@ -248,7 +248,7 @@ At this point if you open your (sub)domain in a browser you should see a 502 err systemctl enable akkoma ``` -If everything worked, you should see Akkoma-FE when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Akkoma in the foreground and seeing if there are any errrors. +If everything worked, you should see akkoma-fe when visiting your domain. If that didn't happen, try reviewing the installation steps, starting Akkoma in the foreground and seeing if there are any errrors. {! support.include !} diff --git a/docs/docs/installation/otp_redhat_en.md b/docs/docs/installation/otp_redhat_en.md index 38c1b96db..d8e6550d5 100644 --- a/docs/docs/installation/otp_redhat_en.md +++ b/docs/docs/installation/otp_redhat_en.md @@ -218,7 +218,7 @@ sudo systemctl start akkoma sudo systemctl enable akkoma ``` -If everything worked, you should see a response from Akkoma-BE when visiting your domain. You may need to install frontends like Akkoma-FE and Admin-FE; refer to [this guide](../administration/CLI_tasks/frontend.md) on how to install them. +If everything worked, you should see a response from Akkoma-BE when visiting your domain. You may need to install frontends like akkoma-fe and admin-fe; refer to [this guide](../administration/CLI_tasks/frontend.md) on how to install them. If that didn't happen, try reviewing the installation steps, starting Akkoma in the foreground and seeing if there are any errrors. diff --git a/docs/docs/support.include b/docs/docs/support.include index a1e860a35..db1c7b70b 100644 --- a/docs/docs/support.include +++ b/docs/docs/support.include @@ -1,5 +1,5 @@ ## Support -If you encounter any issues or have questions regarding the install process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/). +If you encounter any issues or have questions regarding the installation process, feel free to ask at [meta.akkoma.dev](https://meta.akkoma.dev/). Or message via IRC on #akkoma at irc.akkoma.dev (port 6697, SSL)