Mastodon v4.4.0-Beta.2

5 hours ago 1

Warning

This is a pre-release! This has not been as widely tested as regular releases, although it is still tested on mastodon.social and some other servers. If you update to this release, you will not be able to safely downgrade to the existing stable releases. You will, however, be able to upgrade to later nightly releases or pre-releases, as well as the upcoming 4.4.0 stable release.

Upgrade overview

This release contains upgrade notes that deviate from the norm:

⚠️ The minimum supported version for Redis has been bumped to 6.2
⚠️ The minimum supported version for PostgreSQL has been bumped to 13
⚠️ The minimum supported version for Ruby has been bumped to 3.2
⚠️ The minimum supported version for Node.js has been bumped to 20
⚠️ Support for Redis namespaces has been dropped
⚠️ Requires updating the metadata for the Elasticsearch accounts index
⚠️ We moved from webpack to Vite, third-party themes may need changes
⚠️ Rolling updates from versions earlier than Mastodon 4.3 are not supported
⚠️ Import jobs from Mastodon versions earlier than Mastodon 4.2 are not supported
⚠️ ImageMagick is being deprecated and may be removed in a future version
ℹ️ Requires streaming server restart
ℹ️ Requires database migrations

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

Added

Changed

Removed

Fixed

Added

Changed

Removed

Fixed

Upgrade notes

To get the code for v4.4.0-beta.2, use git fetch && git checkout v4.4.0-beta.2.

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.3.0, with the Redis, Ruby, PostgreSQL and Node.js minimum versions being higher. In addition, libvips is now enabled by default, requiring a new dependency if you were not already using it.

  • Ruby: 3.2 or newer
  • PostgreSQL: 13 or newer
  • Elasticsearch (recommended, for full-text search): 7.x (OpenSearch should also work)
  • LibreTranslate (optional, for translations): 1.3.3 or newer
  • Redis: 6.2 or newer
  • Node: 20 or newer
  • libvips (optional, instead of ImageMagick): 8.13 or newer
  • ImageMagick (optional if using libvips): 6.9.7-7 or newer

ImageMagick deprecation and libvips replacement

ImageMagick support in Mastodon is being deprecated in favor of libvips, a more efficient library to process image attachments.

Libvips is now used in default instead of ImageMagick. This means that if you are not using the container image, and did not previously enable libvips through MASTODON_USE_LIBVIPS=true, you will need to install libvips 8.13 or newer (libvips-tools package on Debian and Ubuntu).

If you want to keep using ImageMagick for the time being, set the MASTODON_USE_LIBVIPS environment variable to false.

Support for ImageMagick will be dropped altogether in a future version.

Migration from Webpack to Vite

We have changed the build system for the assets, from Webpack to Vite. This should not affect most admins, but custom themes may need changes.

In particular, a known limitation is that themes’ main style file needs to have a very specific file name: app/javascript/styles/:name.scss where :name is the name of the theme in config/themes.yml

Migrating from Redis namespaces

As a result of one of our dependencies dropping support for Redis namespaces, we had to drop them as well. This means if you use REDIS_NAMESPACE, Mastodon will refuse to start, and you will have to perform an additional migration step.

You can find migration scripts as well as more details at https://github.com/mastodon/redis_namespace_migration

Ongoing import jobs from Mastodon 4.1 and earlier

The feature to import follows, bookmarks, lists, mutes and blocks was entirely rewritten in Mastodon 4.2, leading to two different implementations co-existing in Mastodon 4.2 and 4.3 to ensure a smooth upgrade.

Mastodon 4.4 removes the old implementation, so jobs started on 4.1 or earlier will not be able to proceed on Mastodon 4.4 and later. Therefore, if updating from an earlier version of Mastodon, we recommend running Mastodon 4.2 or 4.3 long enough for any pending ImportWorker or Import::RelationshipWorker job to finish. This should only be a matter of minutes, and should not be a concern if you are updating from Mastodon 4.2 or 4.3.

Update steps

The following instructions are for updating from 4.3.8.

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. If you are upgrading from a pre-4.3 version, please fully update to Mastodon 4.3 first or stop all Mastodon processes before updating, and please have a look at the “Ongoing import jobs from Mastodon 4.1 and earlier” section if you are updating from a pre-4.2 version.

If you are updating from 4.4.0-beta.1, only a few of these steps are relevant, see the next section.

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, 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
  7. If you use Elasticsearch or OpenSearch, rebuild the account search index mappings with RAILS_ENV=production bin/tootctl search deploy --only-mapping --only=accounts

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
  4. If you use Elasticsearch or OpenSearch, rebuild the account search index mappings with docker-compose run --rm web bin/tootctl search deploy --only-mapping --only=accounts

Update steps from 4.4.0-beta.1

The following instructions are for updating from 4.4.0-beta.1, see the section above if you are updating from an older version.

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. Install dependencies with bundle install and yarn install --immutable
  2. Precompile the assets: RAILS_ENV=production bundle exec rails assets:precompile
  3. 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
  4. Restart all Mastodon processes.

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.
Read Entire Article