LibrePortal
Sponsor
Install

Mastodon

Social Network

Mastodon is a social network you run yourself. You and the people you invite post from your own server, and you can follow and talk to anyone else on the fediverse, the network of independent servers Mastodon belongs to.

On this page
  1. At a glance
  2. What it's good for
  3. Before you install: it needs a domain
  4. Signing in
  5. Adding people
  6. On your phone
  7. Following the rest of the fediverse
  8. Translating posts
  9. Good to know
  10. What the install asks
  11. Addresses and ports
  12. Settings
  13. In its config file
  14. Tools
  15. Works with
  16. Privacy and security
  17. What leaves this server
  18. What LibrePortal turns off
  19. Sources
  20. Under the hood

Good to know before you install

Needs a domain and Traefik before it installs, because its address is permanent and other servers only follow it over HTTPS; it uses about 1.2 GB of memory while idle.

At a glance#

What it is
Social Network Communication
Where it opens
Web Interface On its own port at http://your-server:port, or social.your-domain once you have a domain
Updates
When you choose New versions wait for you to press Update
Backups
Included Part of the daily backup when that's switched on
Copies
One per server
Needs
A domain, Traefik, memory

What it's good for#

Mastodon works a lot like the big social networks: you post short updates, follow people, reply, boost and favourite. The difference is that there's no single company in charge. Thousands of servers run it, each with its own rules, and they all talk to each other. Running your own means your account, your posts and your followers live on your hardware, and nobody can change the rules on you.

It suits a household, a club or a small community who want their own corner, and people who'd like their fediverse address to be their own domain rather than someone else's.

Mastodon or Friendica?

LibrePortal also has Friendica, which speaks the same fediverse language. Mastodon is short posts and a busy timeline, much like Twitter used to be. Friendica is closer to Facebook: longer posts, photo albums, events and groups. They can follow each other, so you don't have to choose for everyone.

Before you install: it needs a domain#

This is the decision you can't change later, so it's worth a minute before you press Install.

Mastodon builds every account around the address it was installed with: your handle is @you@ followed by that address, and it's written into every post that leaves the server. Mastodon's own developers are clear that it can't be changed afterwards without starting again from scratch.

So LibrePortal won't install Mastodon until you have a domain set up and Traefik running. Unlike most apps in the catalogue there's no home-network version to fall back on: Mastodon only answers on the one name it was installed as, and only over HTTPS. Opened on http://192.168.1.50:port, it shows nothing but an error.

The address is social.<your domain>, for example social.example.com. LibrePortal writes it down the first time, as Server Address in the Advanced settings, and never changes it again. If you change your domain later, Mastodon stays where it is, and Traefik keeps sending that name to it. Moving to a new name means uninstalling, which deletes every account and post, and installing again.

Installed Mastodon before 0.4.7?

With 0.4.6 or earlier, Mastodon never actually started, so an old install holds no accounts or posts. LibrePortal refuses to install the new one over it. Uninstall the old one first, then install it again.

Signing in#

A new Mastodon has sign-ups closed, and there's no page where the first visitor becomes the admin. LibrePortal makes the main account for you during the install, with Mastodon's own tool, and closes sign-ups again to be sure.

That account is the Owner, Mastodon's top role. Its username is admin, and you sign in with its email address, not the username. The install asks for that email (it's optional); leave it empty and it becomes admin@ followed by Mastodon's address, like admin@social.example.com. Mastodon checks that the part after the @ is a real domain, so a made-up one is refused. The email and the password are in the Login Details shown when the install finishes. Press Welcome on the app's page to see them again.

The first start takes a few minutes while Mastodon sets up its database. LibrePortal waits up to ten minutes for it before making the Owner.

Change the Owner's password with the tool

Use Reset Owner Password on the Tools tab. Leave it empty and one is made for you. Either way it signs the Owner out everywhere and keeps the Login Details right. Changing the Owner Password setting on the Config tab doesn't change the account.

Adding people#

Rather than opening sign-ups to the whole internet, which on a public server attracts spam accounts within days, make accounts for the people you want.

  1. Open Mastodon's page in LibrePortal and go to Tools.
  2. Run Create Account with a username (letters, digits and _), their email address and a password of 8 to 72 characters. Pick a Role: User for most people, Moderator or Admin for people who help run the server.
  3. Send them the address and their password, and ask them to change it once they're in.

The account is confirmed and approved already, so it can sign in straight away, even with sign-ups closed. List Accounts shows everyone, with their email and role. As the Owner you can also make invite links in Mastodon's own preferences.

If you'd rather let people sign up themselves, Open/Close Registrations has three choices: Closed, By approval (anyone can apply and staff approve each one) and Open. Anyone who signs up needs the email that confirms their address, so set up mail first (see below), or keep making accounts with Create Account.

On your phone#

Mastodon has official apps for Android and iPhone, and there are plenty of others: Tusky on Android, and Ivory or Ice Cubes on iPhone, among many. When an app asks for your server, give it your Mastodon's address, like social.example.com. Phone apps sign in through the browser, so you type your password on your own server's page, not in the app.

Following the rest of the fediverse#

If you also run Friendica, Funkwhale, Owncast or WriteFreely on this server, Mastodon's Works with list shows whether they can follow each other, with a Check button that tests what another server would need, and Follow links that open Mastodon's own follow page for the other app. LibrePortal never follows or posts anything for you. Both sides need a domain. See Apps that work together for how the list reads.

Translating posts#

Mastodon can put a Translate button on posts in other languages, using LibreTranslate on your own server, so nothing you read is sent to an outside translator.

All you do is install LibreTranslate. It's offered beside Mastodon under Also install, and whenever it's installed LibrePortal fills in Mastodon's Translation Server and a fresh Translation API Key for you, the key going straight into Mastodon's secrets and never shown in a log. The Translate button then appears. Remove LibreTranslate and LibrePortal empties those settings again, and the button goes away. Mastodon's and LibreTranslate's Works with lists show whether the two are connected.

Good to know#

  • Email is off until you add a mail server. Posting, following and federation all work without it, but Mastodon sends nothing: no sign-up confirmations, password reset links or notification emails. To send mail, fill in Mail Server and the settings beside it on the Config tab with the details of a mail account you have. Accounts made with Create Account don't need it.
  • Updates wait for you. Every Mastodon release changes its database the first time it starts, and some ask for extra steps in their release notes, with no going back. So LibrePortal pins an exact version and a new one arrives only when you press Update. Afterwards LibrePortal checks that every database change finished and that Mastodon reports the new version before it calls the update done. A backup is taken first.
  • Search is limited. Mastodon's full-text search needs a separate search engine, which LibrePortal leaves out. Search finds hashtags, accounts and your own posts, not everyone's.
  • Backups include the database and everything people have uploaded: avatars, headers and media attached to posts. Media cached from other servers is included too, and on a busy server that folder grows quickly.
  • The secrets that protect sign-ins are made at install and kept when you reinstall. Don't change them by hand: a new session key signs everyone out, and a new encryption key breaks everyone's two-factor sign-in.
  • It's a bigger app. Mastodon is five containers (the website, a live-updates server, a background worker, its database and its cache), and together they use about 1.2 GB of memory while idle.
  • One per server. Its address is its identity, so it can't run as several copies side by side.

What the install asks#

When you install Mastodon, LibrePortal asks for a little more than usual before it starts:

  • Owner email. The Owner signs in with this. Its password is made for you and shown with the app's logins. Empty uses admin@ the server's address. You can leave this one empty.

Addresses and ports#

Mastodon has one port. LibrePortal picks a free port number for each when you install, so yours will differ from anyone else's. The Config tab's Network section shows them, and the app's Open button uses the right one. "Anyone" means it's reachable from wherever your server is reachable; you can make it private later.

What it isWho can reach itWith a domain
Web Interface Anyone social.your-domain

Settings#

These are Mastodon's own settings on its Config tab. The settings every app shares, like backups, updates and where its data lives, are explained in App pages and settings.

SettingWhat it doesStarts as
Owner Username The Owner's @name, made at install. admin
Owner Email The address the Owner signs in with. Empty
Outgoing Mail Server Your own mail server for Mastodon's email. Filled in, it wins over the mail server on this machine; empty uses that one when it is on. Empty
Outgoing Mail Port 587 for STARTTLS; 465 is TLS from the start. 587
Outgoing Mail TLS From Start On for port 465. Off
Outgoing Mail Username The account Mastodon logs in to the mail server with. Empty
Outgoing Mail Sender The address Mastodon's mail comes from. Empty
Translation Server LibreTranslate's address, for the Translate button. Empty
Server Address Advanced Mastodon's permanent name, set once at install. Empty

In its config file#

A few more aren't on the Config tab yet. They live in the app's config file, described here so you know they exist. How to change them.

SettingWhat it doesStarts as
Name
CFG_MASTODON_DISPLAY_NAME
What this app is called on your dashboards. Leave empty to use its usual name Empty
Show on the LibrePortal Dashboard
CFG_MASTODON_SHOW_ON_DASHBOARD
Whether this app gets a shortcut on the front page of the LibrePortal WebUI, separate from any Dashy dashboard
Choices: true, false
true
Update Check
CFG_MASTODON_UPDATE_CHECK
Whether Mastodon may ask joinmastodon.org which version is current
Choices: true, false
false
Detailed logs
CFG_MASTODON_VERBOSE_LOGS
Whether Mastodon writes its normal, chattier logs, including who connected, instead of only warnings and errors.
Choices: true, false
false
Debug logging for 24 hours
CFG_MASTODON_DEBUG_LOGS
Turn on to see everything Mastodon is doing while you look for a problem; it turns itself off after 24 hours.
Choices: true, false
false

Tools#

Mastodon's Tools tab has 4 buttons for jobs you'd otherwise need a terminal for. Each one runs as a task, so you can watch it on the Tasks page and read what it did. More about Tools.

Reset Owner Password

Give the Owner a new password and sign it out everywhere. Blank makes one up; either way it is kept with the app's logins.

Asks for: New password (optional)
Create Account

Add a confirmed account that can sign in straight away, even with sign-ups closed.

Asks for: Username, Email, Password, Role (optional)
List Accounts

Every account on this server, with its email and role.

Open/Close Registrations

Choose who can sign up. Without a mail server, people who sign up cannot confirm their address.

Asks for: Sign-ups

Works with#

These are the other apps Mastodon knows how to work with. Once it's installed, its page shows the same list with whether each one is connected. How this works.

  • Email: Sends sign-up confirmations, password resets and notifications through your mail server, from an account of its own, unless a mail server is set in its own settings. LibrePortal sets this up by itself when both are installed.
  • Fediverse: Can follow each other, and anyone else on the fediverse. There's nothing to switch on; LibrePortal shows whether it can work and lets you check. It needs a domain.
  • Grafana: Shows dashboards for the apps that have one. works with every app
  • Home Assistant: Automations can post to your Mastodon account.
  • LibreTranslate: Powers Mastodon's Translate button on posts.
  • Prometheus: Collects metrics from the apps that can export them. works with every app
  • Uptime Kuma: Watches your apps and shows when one goes down. works with every app

Privacy and security#

All clear Mastodon is your own social network server. It talks to other Mastodon servers because that is how federation works, and LibrePortal switches off its update check.

What leaves this server#

  • Federation with other servers: your posts reach the servers of people who follow you
  • The server fetches link previews and remote media from other sites

What LibrePortal turns off#

  • Detailed logs and per-request access logging (switchable in Config)
  • Update check (switchable in Config)

Licence: AGPL-3.0. Audited: 21 October 2026. See the privacy of every app and the Promise.

Sources#

Under the hood#

  • It runs these images: ghcr.io/mastodon/mastodon:v4.7.2@sha256:48214e836a1c6d1c12ee90cba1fee70082b497a34853e1bb124fcfe7d24290fd, ghcr.io/mastodon/mastodon-streaming:v4.7.2@sha256:e5d3336fc4bafac98d71105836a69a77b7e98611e2b95417b116860cce395017, postgres:17.11-alpine@sha256:266d3c257594e195b309ae9d1805e54c788f1d7b375f56bf6c367aac6c917e7b, redis:7.4.11-alpine@sha256:d9436322172a5b482c187bf1f363d3c4fea086fcca6b9c8a94de8f0f39ed3193. The version is pinned, and moves only when you update it.
  • It can sit behind Authelia's sign-in once Authelia is installed.
  • Its own project and documentation: github.com/mastodon/mastodon

Ports, settings, tools and connections on this page are read from LibrePortal v0.10.97's app catalogue each time the guide is built.

Next steps