Skip to content

v5.0.0

Latest

Choose a tag to compare

@ClearlyClaire ClearlyClaire released this 02 Dec 14:26

Upgrade overview

This release contains upgrade notes that deviate from the norm:

ℹ️ Requires assets recompilation
ℹ️ Requires streaming server restart
ℹ️ Requires database migrations

For more information, view the complete release notes and scroll down to the upgrade instructions section.

Changelog

New web interface

Mastodon has a new look!

This version contains a redesign of Mastodon's web interface. This includes a refreshed visual design (with a new color theme setting to personalise it further), a new page layout and a new composer.

This is only the start of the journey and this version is laying out the basis for many new things to come.

You can read all about it in our dedicated blog post.

Security

Added

Fixed

Changed

Removed

Upgrade notes

To get the code for v5.0.0, use git fetch && git checkout v5.0.0.

Note

As always, make sure you have backups of the database before performing any upgrades. If you are using docker-compose, this is how a backup command might look: docker exec mastodon_db_1 pg_dump -Fc -U postgres postgres > name_of_the_backup.dump

Dependencies

External dependencies have changed since v4.7.0, with new Ruby, Node and Redis version requirements.

  • Ruby: 4.0
  • PostgreSQL: 14 or newer
  • Elasticsearch (recommended, for full-text search): 7.x (OpenSearch should also work)
  • LibreTranslate (optional, for translations): 1.3.3 or newer
  • Redis: 7.2 or newer
  • Node: 24 or newer
  • libvips: 8.13 or newer
  • FFMpeg: 5.1 or newer

Zero-downtime migrations

Zero-downtime migrations to Mastodon 5.0 are only possible coming from Mastodon 4.7. Please update to 4.7 before 5.0 if you want to perform zero-downgrade updates.

Update steps

The following instructions are for updating from 4.7.6 or any 5.0 pre-release.

If you are upgrading directly from an earlier release, please carefully read the upgrade notes for the skipped releases as well, as they often require extra steps such as database migrations. In particular, it is very important to read the 4.7.0 release notes.

Non-Docker

Tip

The charlock_holmes gem may fail to build on some systems with recent versions of gcc.
If you run into this issue, try BUNDLE_BUILD__CHARLOCK_HOLMES="--with-cxxflags=-std=c++17" bundle install.

  1. If you are using rbenv and are updating from a version of Mastodon prior to 4.7.6, update the list of available versions and install the proper Ruby version by doing RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install in the Mastodon install directory (e.g. /home/mastodon/live)
  2. Install dependencies with bundle install and yarn install --immutable
  3. Precompile the assets: RAILS_ENV=production bundle exec rails assets:precompile
  4. Run the pre-deployment database migrations by specifying the SKIP_POST_DEPLOYMENT_MIGRATIONS=true environment variable: SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate
  5. Restart all Mastodon processes.
  6. Run the post-deployment database migrations: RAILS_ENV=production bundle exec rails db:migrate

When using Docker

  1. Run the pre-deployment database migrations by specifying the SKIP_POST_DEPLOYMENT_MIGRATIONS=true environment variable: docker-compose run --rm -e SKIP_POST_DEPLOYMENT_MIGRATIONS=true web bundle exec rails db:migrate
  2. Restart all Mastodon processes.
  3. Run the post-deployment database migrations: docker-compose run --rm web bundle exec rails db:migrate