Mastodon script operation details

[Update: April 28, 2017]

Information on operation of the startup script “Mastodon” provided in SAKURA Cloud. All of the following information is current as of the last update of this page.

1. OS

This information assumes installation of a public archive provided by our company for CentOS7.x. For information on the public archives provided by our company, please refer to the release notes.

2. Debug log

/tmp/startup_script.log

The debug log is output to /tmp/startup_script.log when the startup script is executed. Errors at the time of execution are also recorded to this file. Please use the file for sorting.

3. Repository

Use the following command to enable the epel repository.

yum install -y yum-utils
yum-config-manager --enable epel

Use the following command to add a repository.

yum install -y http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
curl -sL https://rpm.nodesource.com/setup_6.x | bash -

4. Package

The following package is (updated/installed). The version is the latest version recorded to the repository.

yum

ImageMagick
ffmpeg
redis
postgresql-server
postgresql-devel
authd
nodejs
openssl-devel
readline-devel
zlib-devel
nginx
jq
bind-utils

npm

yarn

*Items installed using bundle install are omitted.

5. DNS

A Record, MX Record, and TXT Record (SPF) are registered to Zone APEX that was specified via the SAKURA Cloud API.

6. Ruby

Use rbenv to install 2.4.1.

7. PostgreSQL

Change the character code to UTF-8.

8. Mastodon

Directory

/home/mastodon/live

Installed in /home/mastodon/live.

Configuration file

/home/mastodon/live/.env.production

です。

When you change the details of the configuration file, in order to update settings after the changes, use the root account.

systemctl restart mastodon*

to execute systemctl restart mastodon* and then restart mastodon.

cron

The cron required for mastodon is listed in the file below.

/etc/cron.d/mastodon

How to check the version

The Mastodon version can be checked using the following command.

# su - mastodon -c "cd live && git branch"
* (detached from v1.3.1)
  master

9. nginx

Configuration file

/etc/nginx/nginx.conf
/etc/nginx/conf.d/https.conf

です。

10. Specify settings for Let’s Encrypt.

The certificate is automatically updated via cron. The cron required for updating of the certificate is listed in the following file.

/etc/cron.d/certbot-auto

11. Reference

The startup script lists the customer API key, so it is deleted from the server after execution. If you want to refer to content executed by the startup script, please refer from the control panel. The latest release version at the time of startup script execution is installed. Our company assumes absolutely no responsibility for bugs or problems in Mastodon.