- Add audit logs for Hashtags
- Add search field to admin ip blocks
- Add notifications for out-of-support versions of Mastodon
- Add Elasticsearch request timeout of 10s configurable through ES_QUERY_TIMEOUT
- Add ActivityPub attributes to current span when processing Activities
- Add OTel span attribute to deprecated endpoints
- Add default permission check to admin area
- Add uniqueness constraint on Account uri
- Add new theme tokens bg-blend, bg-highlight, and border-strong
- Add support for Link objects in attachment per FEP-8967
- Add support for remote accounts changing handles using ActivityPub actor id as primary identifier
- Add outgoing RFC9421 HTTP Message Signatures as fallback to earlier draft
- Add support for expires in Linked Data Signatures and Object Integrity Proofs
- Add verification of FEP-8b32 Object Integrity Proofs supporting both eddsa-jcs-2022 and mldsa44-jcs-2024
- Add support for Ed25519 signatures in HTTP Message Signatures
- Add inbound support for FEP-521a
- Change how local users' keypairs are stored by moving to dedicated table with encryption at rest
- Fix performance of listing follow requests by adding appropriate index
- Fix missing on_delete cascade on GeneratedAnnualReport foreign key
- Fix DeleteAccountService purge_favourites only invalidating deprecated cache keys
[!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
Added
- Add audit logs for Hashtags (#39473, #39337 and #39670 by @arte7)
- Add search field to admin ip blocks (#39404 by @arte7)
- Add notifications for out-of-support versions of Mastodon (#39732 and #39734 by @ClearlyClaire)
- Add Elasticsearch request timeout of 10s (can be overridden through
ES_QUERY_TIMEOUT) (#40064 by @ClearlyClaire) - Add ActivityPub attributes to current span when processing Activities (#40041 by @jhbabon)
- Add OTel span attribute to deprecated endpoints (#40030 by @jhbabon)
- Add default permission check to admin area (#39974 by @oneiros)
- Add uniqueness constraint on Account
uri(#39882, #39999 and #39861 by @ClearlyClaire) - Add new theme tokens
bg-blend,bg-highlight, andborder-strong(#39786 by @diondiondion) - Add support for
Linkobjects inattachment(FEP-8967) (#36104, #39977 and #39983 by @Gargron, @TheEssem and @shleeable)- Mastodon will use the first
Linkattachment, if any, as preview card. - If there is no
Linkattachment, Mastodon will still scan the message content's to populate one. This may change in a later release. - Mastodon sets a
Linkattachment for outgoing posts with a preview card.
- Mastodon will use the first
- Add support for remote accounts changing handles (#39785, #39850, #39865 and #40045 by @ClearlyClaire)
- ActivityPub actor
idis now used as the primary identifier, instead of webfinger handle. - Remote actors that change handles are now renamed instead of a duplicate account being created then the two merged.
- Mastodon does not offer its users to change handles yet.
- The concept of “invalid handles” has been added to handle some edge cases. An account with an invalid handle
is an account for which the handle cannot be currently verified, but is otherwise valid.
In the REST API, they have their
usernameanddomainattribute overridden and this is made explicit through theinvalid_handleattribute.
- ActivityPub actor
- Add outgoing RFC9421 HTTP Message Signatures as fallback to earlier draft (#39756 by @ClearlyClaire)
- Change how local users' keypairs are stored (#39658, #39668, #39662, #39684, #39686 and #39690 by @ClearlyClaire)
- This moves local users' keypairs to the dedicated table that was created in 4.6.
- Private keys are now encrypted at rest, and the new infrastructure will allow for key rotation in the future.
- Add support for
expiresin Linked Data Signatures and Object Integrity Proofs (#39701 by @ClearlyClaire) - Add verification of FEP-8b32 Object Integrity Proofs (#39530, #39728, #39754, #39760, #39522 and #39747 by @ClearlyClaire)
- Both
eddsa-jcs-2022andmldsa44-jcs-2024are supported. mldsa44-jcs-2024verification requires OpenSSL >= 3.5 to be verified.
- Both
- Add support for Ed25519 signatures in HTTP Message Signatures (#39518 by @ClearlyClaire)
- Add inbound support for FEP-521a (#39497, #39618, and #39725 by @ClearlyClaire and @shleeable)
Fixed
- Fix performance of listing follow requests by adding appropriate index (#40033 by @ClearlyClaire)
- Fix missing
on_delete: :cascadeonGeneratedAnnualReportforeign key (#40063 by @ClearlyClaire) - Fix
DeleteAccountService#purge_favourites!only invalidating deprecated cache keys (#40048 by @shleeable) - Fix spam-filtered scheduled posts raising an error rather than being silently ignored (#40051 by @shleeable)
- Fix error when processing backups for deleted accounts (#40053 by @shleeable)
- Fix notification filter selection after settings change (#39872 by @sharlayan)
- Fix timeline unable to load more when the last item is a
inline-follow-suggestions(#39773 by @sharlayan) - Fix embedded videos restarting when interacting with post (or other posts in the same feed) (#39746 by @diondiondion)
- Fix N+1 queries when rendering accounts on the admin collection page (#39738 by @rubys)
- Fix authored posts not immediately appearing in timelines (#39733 by @ChaosExAnima)
- Fix newletter button display on some e-mail clients (#39634 by @diondiondion)
- Fix handling of
rdf:langStringin mediasummaryandname(#39590 by @ClearlyClaire) - Fix error when rejecting appeal of already-deleted user (#39490 by @shleeable)
- Fix navigation switching to user “Account” category when viewing appeal for moderation interface (#39476, #39619 and #40026 by @ClearlyClaire and @shleeable)
Changed
- Change follow recommendation materialized views to manually-maintained tables (#40039 by @ClearlyClaire)
- Change database schema to distinguish deleted-but-not-suspended accounts (#23617, #40027, #40029, #40034, #40083 and #40078 by @ClearlyClaire and @shleeable)
- Change reblogs to be deduplicated within the last 80 posts instead of the last 40 (#39784 by @ClearlyClaire)
- Change
AttachmentBatchto reset retry attempt counter for each S3 batch (#39979 by @shleeable) - Change featured tag recommendation criteria (#39567 by @renchap)
Removed
- Remove inbox processing of collections of activities (#39932 by @ClearlyClaire)
- Remove support for
RejectandAcceptofQuoteRequestthat cannot be found byid(#39833 by @ClearlyClaire) - Remove deprecated
bin/updatescript (#39443 by @mjankowski) - Remove support for pre-Mastodon 4.3.0 cookies (#38918 by @ClearlyClaire)
Upgrade notes
To get the code for v4.7.0-beta.1, use git fetch && git checkout v4.7.0-beta.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.
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_holmesgem may fail to build on some systems with recent versions of gcc. If you run into this issue, tryBUNDLE_BUILD__CHARLOCK_HOLMES="--with-cxxflags=-std=c++17" bundle install.
- If you are using
rbenv, update the list of available versions and install the proper Ruby version by doingRUBY_CONFIGURE_OPTS=--with-jemalloc rbenv installin the Mastodon install directory (e.g./home/mastodon/live) - Install dependencies with
bundle installandyarn install --immutable - Precompile the assets:
RAILS_ENV=production bundle exec rails assets:precompile - Run the pre-deployment database migrations by specifying the
SKIP_POST_DEPLOYMENT_MIGRATIONS=trueenvironment variable:SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate - Restart all Mastodon processes.
- Run the post-deployment database migrations:
RAILS_ENV=production bundle exec rails db:migrate
When using Docker
- Run the pre-deployment database migrations by specifying the
SKIP_POST_DEPLOYMENT_MIGRATIONS=trueenvironment variable:docker-compose run --rm -e SKIP_POST_DEPLOYMENT_MIGRATIONS=true web bundle exec rails db:migrate - Restart all Mastodon processes.
- Run the post-deployment database migrations:
docker-compose run --rm web bundle exec rails db:migrate