Beruflich Dokumente
Kultur Dokumente
Installation
User guide • Install a rewall and only whitelist SSH, HTTP and HTTPS ports
• System repositories
Installation
• Node.js
Con guration
• Yarn
Post-installation steps
Optional features
• Installing Ruby
Upgrading to a new release
• Setup
Migrating servers
• Setting up PostgreSQL
Troubleshooting
Development guide
• Creating a user
API Overview
• Setting up Mastodon
• Setting up nginx
https://docs.joinmastodon.org/administration/installation/ 1/11
3/19/2019 Installation - Mastodon documentation
First make sure you are actually logging in to the server using keys and
not via a password, otherwise this will lock you out. Many hosting
providers support uploading a public key and automatically set up key-
based root login on new machines for you.
https://docs.joinmastodon.org/administration/installation/ 2/11
3/19/2019 Installation - Mastodon documentation
[DEFAULT]
destemail = your@email.here
sendername = Fail2Ban
[sshd]
enabled = true
port = 22
[sshd-ddos]
enabled = true
port = 22
https://docs.joinmastodon.org/administration/installation/ 3/11
3/19/2019 Installation - Mastodon documentation
*filter
-A INPUT -i lo -j ACCEPT
-A OUTPUT -j ACCEPT
# The -dport number should be the same port number you set in
# Allow ping
-A INPUT -j REJECT
-A FORWARD -j REJECT
COMMIT
https://docs.joinmastodon.org/administration/installation/ 4/11
3/19/2019 Installation - Mastodon documentation
Pre-requisites
You will be running the commands as root. If you aren’t already root,
switch to root:
sudo -i
System repositories
Node.js
Yarn
System packages
apt update
apt install -y \
https://docs.joinmastodon.org/administration/installation/ 5/11
3/19/2019 Installation - Mastodon documentation
Installing Ruby
su - mastodon
https://docs.joinmastodon.org/administration/installation/ 6/11
3/19/2019 Installation - Mastodon documentation
exit
Setup
Setting up PostgreSQL
Creating a user
You will need to create a PostgreSQL user that Mastodon could use. It is
easiest to go with “ident” authentication in a simple setup, i.e. the
PostgreSQL user does not have a separate password and can be used by
the Linux user with the same username.
https://docs.joinmastodon.org/administration/installation/ 7/11
3/19/2019 Installation - Mastodon documentation
\q
Done!
Setting up Mastodon
su - mastodon
bundle install \
-j$(getconf _NPROCESSORS_ONLN) \
This will:
https://docs.joinmastodon.org/administration/installation/ 8/11
3/19/2019 Installation - Mastodon documentation
You’re done with the mastodon user for now, so switch back to root:
exit
Setting up nginx
Copy the con guration template for nginx from the Mastodon directory:
cp /home/mastodon/live/dist/nginx.conf /etc/nginx/sites-availa
ln -s /etc/nginx/sites-available/mastodon /etc/nginx/sites-ena
https://docs.joinmastodon.org/administration/installation/ 9/11
3/19/2019 Installation - Mastodon documentation
ssl_certificate_key lines.
At this point you should be able to visit your domain in the browser and
see the elephant hitting the computer screen error page. This is because
we haven’t started the Mastodon process yet.
cp /home/mastodon/live/dist/mastodon-*.service /etc/systemd/sy
Then edit the les to make sure the username and paths are correct:
• /etc/systemd/system/mastodon-web.service
• /etc/systemd/system/mastodon-sidekiq.service
• /etc/systemd/system/mastodon-streaming.service
Hurray! This is it. You can visit your domain in the browser now!
https://docs.joinmastodon.org/administration/installation/ 10/11
3/19/2019 Installation - Mastodon documentation
Merch
T-shirts and stickers
View source · CC BY-SA 4.0 · Imprint Join Mastodon · Find Twitter friends · Blog · · ·
https://docs.joinmastodon.org/administration/installation/ 11/11