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