+180
nixos/modules/services/networking/pleroma.md
+180
nixos/modules/services/networking/pleroma.md
···
···+The `pleroma_ctl` CLI utility will prompt you some questions and it will generate an initial config file. This is an example of usage+The `config.exs` file can be further customized following the instructions on the [upstream documentation](https://docs-develop.pleroma.social/backend/configuration/cheatsheet/). Many refinements can be applied also after the service is running.+Then you can create and seed the database, using the `setup.psql` file that you generated in the previous section, by running+In this section we will enable the Pleroma service only locally, so its configurations can be improved incrementally.+This is an example of configuration, where [](#opt-services.pleroma.configs) option contains the content of the file `config.exs`, generated [in the first section](#module-services-pleroma-generate-config), but with the secrets (database password, endpoint secret key, salts, etc.) removed. Removing secrets is important, because otherwise they will be stored publicly in the Nix store.+Secrets must be moved into a file pointed by [](#opt-services.pleroma.secretConfigFile), in our case `/var/lib/pleroma/secrets.exs`. This file can be created copying the previously generated `config.exs` file and then removing all the settings, except the secrets. This is an example+Note that the lines of the same configuration group are comma separated (i.e. all the lines end with a comma, except the last one), so when the lines with passwords are added or removed, commas must be adjusted accordingly.+The service is accessible only from the local `127.0.0.1:4000` port. It can be tested using a port forwarding like this+After Pleroma service is running, all [Pleroma administration utilities](https://docs-develop.pleroma.social/) can be used. In particular an admin user can be created with+In this configuration, Pleroma is listening only on the local port 4000. Nginx can be configured as a Reverse Proxy, for forwarding requests from public ports to the Pleroma service. This is an example of configuration, using+add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, Idempotency-Key' always;+add_header 'Access-Control-Expose-Headers' 'Link, X-RateLimit-Reset, X-RateLimit-Limit, X-RateLimit-Remaining, X-Request-Id' always;
+2
nixos/modules/services/networking/pleroma.nix
+2
nixos/modules/services/networking/pleroma.nix
···+# `pandoc pleroma.md -t docbook --top-level-division=chapter --extract-media=media -f markdown-smart --lua-filter ../../../../doc/build-aux/pandoc-filters/myst-reader/roles.lua --lua-filter ../../../../doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua > pleroma.xml`
+140
-85
nixos/modules/services/networking/pleroma.xml
+140
-85
nixos/modules/services/networking/pleroma.xml
···-<link xlink:href="https://pleroma.social/">Pleroma</link> is a lightweight activity pub server.</para>-<para>The <literal>pleroma_ctl</literal> CLI utility will prompt you some questions and it will generate an initial config file. This is an example of usage-<para>The <literal>config.exs</literal> file can be further customized following the instructions on the <link xlink:href="https://docs-develop.pleroma.social/backend/configuration/cheatsheet/">upstream documentation</link>. Many refinements can be applied also after the service is running.</para>-<para>Then you can create and seed the database, using the <literal>setup.psql</literal> file that you generated in the previous section, by running-<para>In this section we will enable the Pleroma service only locally, so its configurations can be improved incrementally.</para>-<para>This is an example of configuration, where <link linkend="opt-services.pleroma.configs">services.pleroma.configs</link> option contains the content of the file <literal>config.exs</literal>, generated <link linkend="module-services-pleroma-generate-config">in the first section</link>, but with the secrets (database password, endpoint secret key, salts, etc.) removed. Removing secrets is important, because otherwise they will be stored publicly in the Nix store.···-<para>Secrets must be moved into a file pointed by <link linkend="opt-services.pleroma.secretConfigFile">services.pleroma.secretConfigFile</link>, in our case <literal>/var/lib/pleroma/secrets.exs</literal>. This file can be created copying the previously generated <literal>config.exs</literal> file and then removing all the settings, except the secrets. This is an example-Note that the lines of the same configuration group are comma separated (i.e. all the lines end with a comma, except the last one), so when the lines with passwords are added or removed, commas must be adjusted accordingly.</para>-<para>The service is accessible only from the local <literal>127.0.0.1:4000</literal> port. It can be tested using a port forwarding like this-and then accessing <link xlink:href="http://localhost:4000">http://localhost:4000</link> from a web browser.</para>-<para>After Pleroma service is running, all <link xlink:href="https://docs-develop.pleroma.social/">Pleroma administration utilities</link> can be used. In particular an admin user can be created with-<prompt>$ </prompt>pleroma_ctl user new <nickname> <email> --admin --moderator --password <password>-<para>In this configuration, Pleroma is listening only on the local port 4000. Nginx can be configured as a Reverse Proxy, for forwarding requests from public ports to the Pleroma service. This is an example of configuration, using············
···+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-pleroma">+<link xlink:href="https://docs-develop.pleroma.social/backend/configuration/cheatsheet/">upstream···+$ pleroma_ctl user new <nickname> <email> --admin --moderator --password <password>············