«

»

How to install Mastodon on Debian server with Yunohost

When you search how to Install Mastodon, it is complicated. If you are like me you can be discouraged. This job is really for a sysadmin.

This is an easy way to install Mastodon.

Prerequis

Having a server with the latest Debian 9.5 actuel uptodate with a SSH acces. You can have a cheap VPS for that it works well.

 

On this example imagine you have a domain with the name domain.com. You will create 2 subdomains. yuno.domain.com and mastodon.domain.com

Installation of Yunohost

Just run one command.

bash <(wget -q -O- https://install.yunohost.org/)

Once it is done, you have Yunohost. At the end you have to choose where you want to install it. You can choose yuno.domain.com  Go to this site. You will see something like this

Prrparation

  • Create a user :  This part is quite esay no needs more explaination
  • Click Domains  and add –> I have a domain. –> add yuno.domain.com and mastodon.domain.com

Then return to the domain and edit.

configuration DNS

Change the dns according to the model.

; 1.2.3.4 is your IP address just replace it with the ip of your server
@ 3600 IN A 1.2.3.4
* 3600 IN A 1.2.3.4

; XMPP
_xmpp-client._tcp 3600 IN SRV 0 5 5222 domaine.com.
_xmpp-server._tcp 3600 IN SRV 0 5 5269 domaine.com.
muc 3600 IN CNAME @
pubsub 3600 IN CNAME @
vjud 3600 IN CNAME @

; Mail
@ 3600 IN MX 10 domaine.com.
@ 3600 IN TXT "v=spf1 a mx ip4:1.2.3.4 -all

Go to the DNS of your domaine and change it.

Attention a DNS change can need time. be patient.

Go to a command line to your server and run this command for you domain and subdomains

sudo yunohost domain yourdomain.tld cert-install --no-checks

Installation

Now the hardes part is done. Simply run this command

sudo yunohost app install mastodon

If it does not work you still can run this command

sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh.git

After replying to questions at the end you have your mastodon at

https://mastodon.domain.com

 

https://yunohost.org