Mastodon: Difference between revisions
imported>Erictapen Specified that there is only one supported database for Mastodon |
imported>LeSuisse Add instructions to setup a minimal Mastodon instance |
||
Line 1: | Line 1: | ||
== Setup your own personal Mastodon instance on a dedicated server == | |||
The <service>services.mastodon</service> 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> | |||
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> | |||
You can then create your account using <code>tootctl</code>: <code>su - mastodon -s "$(which bash)" -c 'mastodon-env tootctl accounts create USERNAME --email=YOUR_EMAIL --confirmed --role=Owner'</code> | |||
== Automatic backups == | == Automatic backups == | ||