1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mastodon_ynh.git synced 2024-09-03 19:46:02 +02:00
Free, open-source social network for YunoHost
Find a file
panomaki 28593d5008
Update README.md
Extra sentence and link to screen tutorial.
2023-04-13 16:45:56 +02:00
.github [autopatch] Upgrade auto-updater 2023-02-23 23:37:42 +01:00
conf Update app.src 2023-04-04 20:00:49 +02:00
doc Patch mastodon for SSO 2022-01-11 20:31:25 +01:00
scripts Update _common.sh 2023-04-04 20:10:16 +02:00
sources/patches Delete app-blurhash-bugfix.patch 2023-04-04 19:55:17 +02:00
.travis.yml Adding automations 2019-05-10 11:37:32 +02:00
check_process Update check_process 2023-04-12 11:13:14 +02:00
LICENSE Initial commit 2017-04-08 04:04:27 +02:00
manifest.json Update manifest.json 2023-04-04 19:58:33 +02:00
README.md Update README.md 2023-04-13 16:45:56 +02:00
README_fr.md Update README_fr.md 2023-04-04 19:57:46 +02:00

Mastodon for YunoHost

Integration level Working status Maintenance status

Install Mastodon with YunoHost

Lire ce readme en français.

This package allows you to install Mastodon quickly and simply on a YunoHost server. If you don't have YunoHost, please consult the guide to learn how to install it.

Overview

Mastodon is a free, open-source microblogging social network. It is a decentralized alternative to commercial platforms like Twitter and avoids the risks of a single company monopolizing your communication for commercial purposes.

Shipped version: 4.1.2~ynh1

Demo: https://joinmastodon.org/

Screenshots

Screenshot of Mastodon

Disclaimers / important information

Important points to read before installing

  1. Mastodon require a dedicated root domain, eg. mastodon.domain.tld
  2. The user choosen during the installation is automatically created in Mastodon with admin rights
  3. At the end of the installation a mail is sent to the user with the automatically generated password
  4. It seems important to close the inscriptions for your Mastodon, so that it remains a private body. We invite you to block remote malicious instances from the administration interface. You can also add text on your home page.

Configuration

Install

Using screen in case of disconnect

Screen (or tmux) can be used to make sure your session is not interrupted in case of connection problems. See tutorial for more background information.

$ sudo apt-get install screen
$ screen
$ sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh.git

Recover after disconnect:

$ screen -d
$ screen -r

Update

Please use screen as the upgrade process can take a long time!

A note about backups

First of all: Mastodon uses a local cache to save media (such as posted images, videos etc.). This cache can grow huge. You could consider cleaning up your local cache first as otherwise your backup will be very big and you might run out of disk space:

To check your space usage, on a command line run:

$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media usage

If your cache is too big to backup, you can run the following command to clean up Attachments (the first line). Substitute X by the number of days you want to keep, e.g. 1 day. All older images will be deleted but will be refetched from the original server if necessary.

First dry-run to see how much space is freed up (without actually removing):

$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media remove --days=X --dry-run

If all looks good commit the cleanup:

$ sudo cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl media remove --days=X

Upgrade

The actual upgrade can be done using the following command:

$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug

Upgrading from 3.5.3 to 4.1.2 directly has not been integration-tested. It is recommended to do a two-step upgrade:

First upgrade to 4.0.2~ynh2:

$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/94381183ca2d14da72234b53c9a83972ffb16e54 --debug

Check your installation. If all looks well, upgrade to 4.1.2~ynh1:

$ sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh --debug

Administrate with tooctl

$ (cd /var/www/mastodon/live && sudo -u mastodon RAILS_ENV=production PATH=/opt/rbenv/versions/mastodon/bin bin/tootctl --help)

YunoHost specific features

Multi-users support

LDAP authentication is activated. All YunoHost users can authenticate.

Log-out from YunoHost's portal doesn't log out from Mastodon. See https://github.com/YunoHost/issues/issues/501

Documentation and resources

Developer info

Please send your pull request to the testing branch.

To try the testing branch, please proceed like that.

sudo yunohost app install https://github.com/YunoHost-Apps/mastodon_ynh/tree/testing --debug
or
sudo yunohost app upgrade mastodon -u https://github.com/YunoHost-Apps/mastodon_ynh/tree/testing --debug

More info regarding app packaging: https://yunohost.org/packaging_apps