1,035
edits
(→Discord: new section) |
|||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
Up to [[Part Of::Mastodon]] | |||
In this case we are using [[Documents::glitch-soc]] to run a [[Implements::Mastodon]] server. | In this case we are using [[Documents::glitch-soc]] to run a [[Implements::Mastodon]] server. | ||
Line 45: | Line 47: | ||
- [x] Configure postgresql | - [x] Configure postgresql | ||
- [ ] Configure nginx (config below) | - [ ] Configure nginx (config below) | ||
- [ ] Get SSL Cert | - [x] Get SSL Cert | ||
- [x] Install & Enable systemd services | - [x] Install & Enable systemd services | ||
</markdown> | </markdown> | ||
Once DNS is set up, you can run:<syntaxhighlight lang="shell"> | Once DNS is set up, you can run the following as root:<syntaxhighlight lang="shell"> | ||
certbot certonly --standalone | certbot certonly --standalone | ||
</syntaxhighlight>to get SSL certs. Then restart nginx to load them. | </syntaxhighlight>to get SSL certs. Then restart nginx to load them. | ||
Line 59: | Line 61: | ||
* mastodon-sidekiq | * mastodon-sidekiq | ||
* mastodon-streaming | * mastodon-streaming | ||
== Configuration == | == Configuration == | ||
Line 84: | Line 78: | ||
(for SMTP_LOGIN literally just use "apikey") | (for SMTP_LOGIN literally just use "apikey") | ||
=== Restart services === | |||
Restart all 3 services after each change to .evn.production or config/settings.yml and you need to have root access for this to work<syntaxhighlight lang="bash"> | |||
sudo su | |||
cd /etc/systemd/system | |||
for service in mastodon-{web,sidekiq,streaming}; do service $service restart; done | |||
for service in mastodon-{web,sidekiq,streaming}; do service $service status; done | |||
</syntaxhighlight> | |||
== Setting up an admin account from CLI w/ email confirmation == | == Setting up an admin account from CLI w/ email confirmation == | ||
Line 96: | Line 97: | ||
* [[Category:Guide]] | * [[Category:Guide]] | ||
* [[Category:Mastodon]] | * [[Category:Mastodon]] | ||
== Discord == | |||
{{Message | |||
|Author=mannazsci | |||
|Avatar=https://cdn.discordapp.com/avatars/540104559079456770/12ce492294d6a3cd6f1ea00cbe8edb04.png?size=1024 | |||
|Date Sent=23-08-16 04:11:30 | |||
|Channel=technical-wg | |||
|Text=[[Mastodon/Setup]] useful commands to improve disk usage: | |||
`# Prune remote accounts that never interacted with a local user | |||
RAILS_ENV=production /home/mastodon/live/bin/tootctl accounts prune; | |||
# Remove remote statuses that local users never interacted with older than 4 days | |||
RAILS_ENV=production /home/mastodon/live/bin/tootctl statuses remove --days 4; | |||
# Remove media attachments older than 4 days | |||
RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove --days 4; | |||
# Remove all headers (including people I follow) | |||
RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove --remove-headers --include-follows --days 0; | |||
# Remove link previews older than 4 days | |||
RAILS_ENV=production /home/mastodon/live/bin/tootctl preview_cards remove --days 4; | |||
# Remove files not linked to any post | |||
RAILS_ENV=production /home/mastodon/live/bin/tootctl media remove-orphans;` | |||
|Link=https://discord.com/channels/1049136631065628772/1049184335514828860/1141222683388956812 | |||
}} |