Mastodon: Difference between revisions

import from old wiki
m (Breaking caddy out of the sandbox does not appear to be necessary) - copied from old wiki
 
(2 intermediate revisions by 2 users not shown)
Line 36: Line 36:


== Usage ==
== Usage ==
Create user
<syntaxhighlight lang="console">
# sudo -u mastodon mastodon-tootctl accounts create my_user --email myuser@example.org
</syntaxhighlight>
Confirm user mail manually
<syntaxhighlight lang="console">
# sudo -u mastodon mastodon-tootctl accounts modify my_user --email myuser@example.org --confirm
</syntaxhighlight>


Change password for user <code>my_user</code>
Change password for user <code>my_user</code>
Line 44: Line 56:


== Tips and tricks ==
== Tips and tricks ==
=== Enabling full text search ===
Using OpenSearch as alternative to ElasticSearch after the license change. First set the following options and rebuild the config:<syntaxhighlight lang="nix">
services.opensearch.enable = true;
services.mastodon.elasticsearch.host = "127.0.0.1";
</syntaxhighlight>Then on the server run the following command to fill the search index:<syntaxhighlight lang="console">
$ sudo -u mastodon mastodon-tootctl search deploy
</syntaxhighlight>


=== Using Caddy as a server  ===
=== Using Caddy as a server  ===
Line 98: Line 118:
# Caddy requires file and socket access
# Caddy requires file and socket access
users.users.caddy.extraGroups = [ "mastodon" ];
users.users.caddy.extraGroups = [ "mastodon" ];
# Caddy systemd unit needs readwrite permissions to /run/mastodon-web
systemd.services.caddy.serviceConfig.ReadWriteDirectories = lib.mkForce [ "/var/lib/caddy" "/run/mastodon-web" ];


</syntaxHighlight>
</syntaxHighlight>