Mastodon/Setup: Difference between revisions
No edit summary |
(Add certbot ssl cmds) |
||
Line 30: | Line 30: | ||
<markdown> | <markdown> | ||
- [ ] Add an `A` record pointing at the linode's IP Address | - [x] Add an `A` record pointing at the linode's IP Address | ||
- [ ] Set up rDNS pointing back at the domain | - [ ] Set up rDNS pointing back at the domain | ||
</markdown> | </markdown> | ||
Line 49: | Line 49: | ||
</markdown> | </markdown> | ||
Once DNS is set up, you can run:<syntaxhighlight lang="shell"> | |||
</ | certbot certonly --standalone | ||
</syntaxhighlight>to get SSL certs. | |||
Then restart nginx to load them. | |||
=== Variations === | === Variations === |
Revision as of 17:28, 28 November 2022
In this case we are using glitch-soc to run a Mastodon server.
- Neuromatch Fork: https://github.com/NeuromatchAcademy/mastodon
We will make:
- One "default" instance at neuromatch.social
- One Dev Instance at dev.neuromatch.social
We will be following the official Mastodon setup docs (except cloning our fork of glitch-soc instead of the base masto repo):
Prereqs
https://docs.joinmastodon.org/admin/prerequisites/
See also: Linode/Setup
- Turn off password SSH access
- Install fail2ban
- Configure iptables to only allow SSH and HTTP/HTTPS
DNS
Set up the domain name!
A
record pointing at the linode's IP Address
Add an - Set up rDNS pointing back at the domain
Installation
https://docs.joinmastodon.org/admin/install/
- Add apt repositories
- Install apt packages
mastodon
user
Make - Install Ruby
- Configure postgresql
- Configure nginx (config below)
- Get SSL Cert
- Install & Enable systemd services
Once DNS is set up, you can run:
certbot certonly --standalone
to get SSL certs.
Then restart nginx to load them.
Variations
- Using Node.js 18.12.1 rather than 16 as per docs
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs
Configuration
nginx
Configure the email server
Create a SendGrid account, go to Settings > API Keys, and generate an API key.
Then set up the config like this:
SMTP_SERVER=smtp.sendgrid.net
SMTP_PORT=587
SMTP_LOGIN=apikey
SMTP_PASSWORD=<your-api-key>
SMTP_FROM_ADDRESS=youremail@gmail.com
(for SMTP_LOGIN literally just use "apikey")