A deep dive into Mastodon

Mastodon on Mobile

The mobile space supports dozens of clients for Mastodon (and other Fediverse services) [10]. The one you choose is a question of taste. I recommend choosing one that supports scheduling.

The ability to set a toot to be posted in the future, at a given time and on a given date, is baked into Mastodon's architecture and is thus available on all instances by default. You don't need a special scheduling service as you would on other platforms, but you do need a client that can leverage the feature.

My favorite client for Android is Fedilab [11]. Fedilab is free, it is powerful, and it easily maintains multiple accounts, and it does scheduling well (Figure 10).

Figure 10: Fedilab supports multiple accounts and toot scheduling.

Migrating

There may come a time when you need to move to another instance. It could be that the instance you are on is shutting down, or has gotten too busy, or it has been overtaken by trolls, or the new one simply fits your preferences better. Whatever the reason, Mastodon makes it relatively easy to take your configuration, the list of people you follow, and even your followers with you.

Before you migrate, bear in mind that Mastodon does not allow taking your old posts with you to your new instance. It would be theoretically possible to copy the contents from your toots from one database to another if you had system administrator access to both servers where the instances are hosted. But your posts are time-stamped, and not only on your instance, but also on every instance where people interacted with them. The timestamps of imported toots would not match the originals, and that would make an inconsistent mess in the federation. Besides, apparently all of your "new" old toots would be posted a second time all at once, flooding followers' timelines and in general wreaking havoc. So one thing you must not do is delete the old account, because that is where your original toots will and should stay.

There is a second good reason to not remove your old account entirely: Mastodon can automatically forward followers who visit your old account to the new account. If there is no old account, Mastodon will not know who to forward nor where to forward them to.

Let's say you are migrating your "JaneDoe" account from the mastodon.social instance to myinstance.org.

You can start by downloading your archive. To do that, in Preferences visit Import and export, choose Data export, and click Request your archive (Figure 11). If you have posted a lot, this may take some time, because it compiles all your toots and all their attachments into one compressed archive. The archive is not strictly necessary, because, as I said, you will not be able to import your toots into your new account. But it is a good backup, and the archive also contains content such as your profile and header image, the text you used in your bio, and so on. Having all these things in one place is just convenient when setting up your new account and making it look and read like your old one.

Figure 11: When migrating, start by downloading your archive from your old account.

While you are at it, and in the same screen, download the files in the Data export table:

  • Follows contains the list of people you follow.
  • Lists contains a list of the lists for grouping accounts you made.
  • You block contains a list of accounts you blocked.
  • You mute contains a list of accounts you muted.
  • Domain blocks contains a list of domains you blocked.
  • And Bookmarks contains a list of references to toots you have bookmarked.

You will be able to import these files into your new account.

In fact, you can do that now: Register your new account, and set up your profile from the contents of your archive. Then go to Preferences | Import and export | Import and use the CSV files you downloaded from your old account to update your new account.

Do not leave your new account. Visit Preferences | Account Settings and click on Create an account alias under the section called Moving from a different account located down towards the bottom of the page.

In the text box, write in the user name (with the instance name) of the old account, in this case, JaneDoe@mastodon.social, and click CREATE ALIAS.

Go back to your old account and visit Preferences | Account | Account settings. In the Move to a different account section, click on Configure it here.

Fill in the Handle of the new account field with the user name and instance of your new account, in this case, JaneDoe@myinstance.org, and type in the password of your old account in the Current password text box to confirm the move.

Click MOVE FOLLOWERS.

Two things to note: The first is that transferring followers takes time, sometimes several days. Moving happens as your followers log in to Mastodon, browse your stuff, or see your new posts. That is when they are transferred. It might be a good idea to warn users beforehand, so they don't think something nefarious is going on.

The other thing to notice is that, from the moment you press MOVE FOLLOWERS, posting from the old account will not be possible. That said, unless you delete your account, all your posts will still be available, so nobody's links will break.

Personal Instance

The Fediverse becomes stronger if more people support it with their own instances. More instances allows for better distribution of the load of sending posts. Instances with many accounts can get bogged down with traffic, so having the same number of accounts spread over a larger number of federated instances actually makes the whole system faster. Bigger instances also become more vulnerable to abuse and spam. Specialized instances encourage diversity. And, as the number of Mastodon users grow, more instances make it more difficult to imagine a centralized, controlling hub gaining influence over the platform.

The path to creating an instance begins with securing your server. I will not dwell on the general security issues, because many of these same issues apply to all Internet-facing servers. A couple of hints, though: Look into non-password access for accessing your machine over SSH, install and configure a decent firewall, and deploy something like Fail2Ban [12] to ward off brute-force attacks.

Once your machine is safe, you will need the NGINX web server to run your instance on and PostgreSQL for Mastodon's database, so install both:

apt install nginx postgresql postgresql-contrib

Enable and start NGINX with

systemctl start nginx; sudo systemctl enable nginx

It is also useful to install cURL and Wget, as you will need to download items during the installation. Also install gnuGP and CA certificates for keys and certificates:

apt install -y curl wget gnupg ca-certificates

Another necessary component is Node.js, which manages the live streaming of toots to different feeds:

curl -sL https://deb.nodesource.com/setup_16.x | bash - apt-get install -y nodejs

To satisfy some of Node.js's dependencies, also install Yarn, a package/project manager:

corepack enable
yarn set version classic

and then install several other packages to satisfy Mastodon's specific dependencies (see Listing 1).

Listing 1

Mastodon Dependencies

apt install -y imagemagick ffmpeg libpq-dev libxml2-dev libxslt1-dev file git-core g++ \
libprotobuf-dev protobuf-compiler pkg-config gcc autoconf bison build-essential libssl-dev \
libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm-dev redis-server \
redis-tools certbot python3-certbot-nginx libidn11-dev libicu-dev libjemalloc-dev

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Social Skills

    Creating a custom application that toots text to Mastodon (the Fediverse's version of Twitter) is simple and straightforward. But we can mix it up by adding images and video, scheduling posts, and changing privacy settings.

  • Mastodon Clients Post Line

    The open and simple Mastodon API makes it easy to create applications to interact with this federated microblogging platform. Here are some of the clients that the community has come up with and how you can use them.

  • toot

    If you are looking for a Twitter alternative, toot lets you interact with Mastodon from the command line.

  • Tutorial – Fediverse

    If you're looking for social media options where the user has more control, you'll find a range of options to explore in the Fediverse, including the popular Mastodon.

  • Status Quo

    Creating your own clients to interact with your friends in the Fediverse is easy. A bit of Python and an off-the-shelf module will do the trick.

comments powered by Disqus