Mastodon: Difference between revisions

Klinger (talk | contribs)
Voklen (talk | contribs)
The services.mastodon.streamingProcesses option is now required for the mastodon service
Line 5: Line 5:
The <code>services.mastodon</code> service can be used to setup a Mastodon instance in [https://docs.joinmastodon.org/admin/config/#single_user_mode single user mode]. It will setup all the necessary services (PostgreSQL, Redis, Nginx...) and setup a valid certificate to be used for the HTTPS connection:
The <code>services.mastodon</code> service can be used to setup a Mastodon instance in [https://docs.joinmastodon.org/admin/config/#single_user_mode single user mode]. It will setup all the necessary services (PostgreSQL, Redis, Nginx...) and setup a valid certificate to be used for the HTTPS connection:


<syntaxHighlight lang=nix>
<syntaxhighlight lang="nix">
   security.acme = {
   security.acme = {
     acceptTerms = true;
     acceptTerms = true;
Line 15: Line 15:
     configureNginx = true;
     configureNginx = true;
     smtp.fromAddress = "noreply@social.example.com"; # Email address used by Mastodon to send emails, replace with your own
     smtp.fromAddress = "noreply@social.example.com"; # Email address used by Mastodon to send emails, replace with your own
    streamingProcesses = 3; # Number of processes used. It is recommended to set to the number of CPU cores minus one
     extraConfig.SINGLE_USER_MODE = "true";
     extraConfig.SINGLE_USER_MODE = "true";
   };
   };
   networking.firewall.allowedTCPPorts = [ 80 443 ];
   networking.firewall.allowedTCPPorts = [ 80 443 ];
</syntaxHighlight>
</syntaxhighlight>


You can then create your account using <code>tootctl</code>:
You can then create your account using <code>tootctl</code>: