Jump to content

Mastodon: Difference between revisions

m
no edit summary
imported>Onny
mNo edit summary
imported>Onny
mNo edit summary
Line 3: Line 3:
== Setup ==
== Setup ==


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].
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:
 
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>
services.mastodon = {
  security.acme = {
  enable = true;
    acceptTerms = true;
  localDomain = "social.example.com"; # Replace with your own domain
    defaults.email = "<EMAIL TO USE FOR CORRESPONDENCE WITH Let's Encrypt>";
  configureNginx = true;
  };
  smtp.fromAddress = "noreply@social.example.com"; # Email address used by Mastodon to send emails, replace with your own
  services.mastodon = {
  extraConfig.SINGLE_USER_MODE = "true";
    enable = true;
};
    localDomain = "social.example.com"; # Replace with your own domain
 
    configureNginx = true;
security.acme = {
    smtp.fromAddress = "noreply@social.example.com"; # Email address used by Mastodon to send emails, replace with your own
  acceptTerms = true;
    extraConfig.SINGLE_USER_MODE = "true";
  defaults.email = "<EMAIL TO USE FOR CORRESPONDENCE WITH Let's Encrypt>";
  };
};
  networking.firewall.allowedTCPPorts = [ 80 443 ];
</syntaxHighlight>
</syntaxHighlight>


Anonymous user