Skip to content

v4.7.0-rc.1

Pre-release
Pre-release

Choose a tag to compare

@ClearlyClaire ClearlyClaire released this 14 Aug 16:04
· 29 commits to stable-4.7 since this release
3310566

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.7.0 stable release.

This version introduces very few user-facing changes but substantially reworks Mastodon's internals to increase security, support new protocols, and pave the way for new features. Updating to this version will be required for zero-downtime migration to the upcoming Mastodon 5.0.

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 (v4.7.0-rc.1)

Changed

Fixed

Changelog (v4.7.0-beta.1)

Added

Fixed

Changed

Removed

Upgrade notes

To get the code for v4.7.0-rc.1, use git fetch && git checkout v4.7.0-rc.1.

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 not changed since v4.6.0.

  • Ruby: 3.3 or newer
  • 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.0 or newer
  • Node: 22 or newer
  • libvips: 8.13 or newer
  • FFMpeg: 5.1 or newer

Cookies from pre-4.3.0 Mastodon

This version drops compatibility with cookies issued by Mastodon v4.2 and earlier. This means that any user who has not visited your server after you updated to Mastodon 4.3 or newer will be logged out.

Lengthy database migrations

This version includes very substantial database migrations. They do not require unusual update steps, but they can take a long time. Expect up to a couple hours for very large servers.

Update steps

The following instructions are for updating from 4.6.5 or 4.6.7-beta.1.

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.6.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, 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