Skip to content

v4.3.0-rc.1

Pre-release
Pre-release

Choose a tag to compare

@ClearlyClaire ClearlyClaire released this 30 Sep 11:01
· 4009 commits to main since this release
0321008

Mastodon

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, prereleases as well as the upcoming 4.3.0 stable release.

Upgrade overview

This release contains upgrade notes that deviate from the norm:

‼️ Requires new encryption secrets environment variables
⚠️ The minimal supported version for PostgreSQL has been bumped to 12
⚠️ The minimal supported version for Ruby has been bumped to 3.1
⚠️ The minimal supported version for Node.js has been bumped to 18
⚠️ Requires rebuilding Elasticsearch accounts index
⚠️ We switched from yarn 1 to yarn 4, and recommend using corepack
⚠️ The Docker image has been split in two separate images
⚠️ Rolling updates from versions earlier than Mastodon 4.2 are not supported
⚠️ StatsD integration has been removed, replaced by OpenTelemetry integration
⚠️ ImageMagick is being deprecated and may be removed in a future version
ℹ️ Requires streaming API restart
ℹ️ Requires database migrations
ℹ️ The logging format of the streaming server has changed

For more information, scroll down to the upgrade instructions section.

Changelog (v4.3.0-rc.1)

Security

Added

  • Add “A Mastodon update is available.” message on admin dashboard for non-bugfix updates (#32106 by @ClearlyClaire)
  • Add ability to view alt text by clicking the ALT badge in web UI (#32058 by @Gargron)
  • Add preview of followers removed in domain block modal in web UI (#32032 and #32105 by @ClearlyClaire and @Gargron)
  • Add server-side notification grouping for follow notifications (#32085 by @renchap)
  • Add reblogs and favourites counts to statuses in ActivityPub (#32007 by @Gargron)
  • Add OTEL_SERVICE_NAME_SEPARATOR to further customize OpenTelemetry service names (#31998 by @timetinytim)

Changed

Fixed

  • Fix missing permission on new embeds making them unclickable (#32135 by @Gargron)
  • Fix missing border in some admin UI tables (#32128 by @mjankowski)
  • Fix recently used tags hint being displayed in profile edition page when there is none (#32120 by @mjankowski)
  • Fix checkbox lists on narrow screens in the settings interface (#32112 by @mjankowski)
  • Fix scrollbar width (#32091 by @ClearlyClaire)
  • Fix typo causing incorrect error being raised in blurhash processing failure (#32104 by @ClearlyClaire)
  • Fix the position of status action buttons being affected by interaction counters (#32084 by @renchap)
  • Fix too many requests caused by relationship look-ups in web UI (#32042 by @Gargron)
  • Fix wrapping in dashboard quick access buttons (#32043 by @renchap)
  • Fix the summary of converted ActivityPub object types to be treated as HTML (#28629 by @Menrath)
  • Fix error when accepting an appeal for sensitive posts deleted in the meantime (#32037 by @ClearlyClaire)
  • Fix multiple bugs in notification requests and notification policies (#32062 by @ClearlyClaire)
  • Fix error when encountering reblog of deleted post in feed rebuild (#32001 by @ClearlyClaire)
  • Fix links for reblogs in moderation interface (#31979 by @ClearlyClaire)
  • Fix Safari browser glitch related to horizontal scrolling (#31960 by @Gargron)
  • Fix the appearance of avatars when they do not load (#31966 by @renchap)
  • Fix spurious error notifications for aborted requests in web UI (#31952 by @c960657)

Removed

Changelog (v4.3.0-beta.2)

Security

Added

Changed

Fixed

Changelog (v4.3.0-beta.1)

The following changelog entries focus on changes visible to users, administrators, client developers or federated software developers, but there has also been a lot of code modernization, refactoring, and tooling work, in particular by @mjankowski.

Security

  • Add confirmation interstitial instead of silently redirecting logged-out visitors to remote resources (#27792, #28902, and #30651 by @ClearlyClaire and @Gargron)
    This fixes a longstanding open redirect in Mastodon, at the cost of added friction when local links to remote resources are shared.

Added

Changed

  • Change icons throughout the web interface (#27385, #27539, #27555, #27579, #27700, #27817, #28519, #28709, #28064, #28775, #28780, #27924, #29294, #29395, #29537, #29569, #29610, #29612, #29649, #29844, #27780, #30974, #30963, #30962, #30961, #31362, #31363, #31359, #31371, #31360, #31512, #31511, and #31525 by @ClearlyClaire, @Gargron, @arbolitoloco1, @mjankowski, @nclm, @renchap, @ronilaukkarinen, and @zunda)
    This changes all the interface icons from FontAwesome to Material Symbols for a more modern look, consistent with the official Mastodon Android app.
    In addition, better care is given to pixel alignment, and icon variants are used to better highlight active/inactive state.
  • Change design of compose form in web UI (#28119, #29059, #29248, #29372, #29384, #29417, #29456, #29406, #29651, and #29659 by @ClearlyClaire, @Gargron, @eai04191, @hinaloe, and @ronilaukkarinen)
    The compose form has been completely redesigned for a more modern and consistent look, as well as spelling out the chosen privacy setting and language name at all times.
    As part of this, the “Unlisted” privacy setting has been renamed to “Quiet public”.
  • Change design of confirmation modals in the web UI (#29576, #29614, #29640, #29644, #30131, #30884, and #31399 by @ClearlyClaire, @Gargron, and @tribela)
    The mute, block, and domain block confirmation modals have been completely redesigned to be clearer and include more detailed information on the action to be performed.
    They also have a more modern and consistent design, along with other confirmation modals in the application.
  • Change colors throughout the web UI (#29522, #29584, #29653, #29779, #29803, #29809, #29808, #29828, #31034, #31168, #31266, #31348, #31349, #31361, and #31510 by @ClearlyClaire, @Gargron, @renchap, and @vmstan)
  • Change onboarding prompt to follow suggestions carousel in web UI (#28878 and #29272 by @Gargron)
  • Change email templates (#28416, #28755, #28814, #29064, #28883, #29470, #29607, #29761, #29760, and #29879 by @ClearlyClaire, @Gargron, @hteumeuleu, and @mjankowski)
    All emails to end-users have been completely redesigned with a fresh new look, providing more information while making them easier to read and keeping maximum compatibility across mail clients.
  • Change follow recommendations algorithm (#28314, #28433, #29017, #29108, #29306, #29550, #29619, and #31474 by @ClearlyClaire, @Gargron, @kernal053, @mjankowski, and @wheatear-dev)
    This replaces the “past interactions” recommendation algorithm with a “friends of friends” algorithm that suggests accounts followed by people you follow, and a “similar profiles” algorithm that suggests accounts with a profile similar to your most recent follows.
    In addition, the implementation has been significantly reworked, and all follow recommendations are now dismissable.
    This change deprecates the source attribute in Suggestion entities in the REST API, and replaces it with the new sources attribute.
  • Change account search algorithm (#30803 by @Gargron)
  • Change streaming server to use its own dependencies and its own docker image (#24702, #27967, #26850, #28112, #28115, #28137, #28138, #28497, #28548, and #30795 by @TheEssem, @ThisIsMissEm, @jippi, @timetinytim, and @vmstan)
    In order to reduce the amount of runtime dependencies, the streaming server has been moved into a separate package and Docker image.
    The mastodon image does not contain the streaming server anymore, as it has been moved to its own mastodon-streaming image.
    Administrators may need to update their setup accordingly.
  • Change how content warnings and filters are displayed in web UI (#31365 by @Gargron)
  • Change Web UI to allow viewing and severing relationships with suspended accounts (#27667 by @ClearlyClaire)
    This also adds a with_suspended parameter to GET /api/v1/accounts/relationships in the REST API.
  • Change avatars border radius (#31390 by @renchap)
  • Change counters to be displayed on profile timelines in web UI (#30525 by @Gargron)
  • Change disabled buttons color in light mode to make the difference more visible (#30998 by @renchap)
  • Change design of people tab on explore in web UI (#30059 by @Gargron)
  • Change sidebar text in web UI (#30696 by @Gargron)
  • Change "Follow" to "Follow back" and "Mutual" when appropriate in web UI (#28452 and #28465 by @Gargron and @renchap)
  • Change media to be hidden/blurred by default in report modal (#28522 by @ClearlyClaire)
  • Change order of the "muting" and "blocking" list options in “Data Exports” (#26088 by @fixermark)
  • Change admin and moderation notes character limit from 500 to 2000 characters (#30288 by @ThisIsMissEm)
  • Change mute options to be in dropdown on muted users list in web UI (#30049 and #31315 by @ClearlyClaire and @Gargron)
  • Change out-of-band hashtags design in web UI (#29732 by @Gargron)
  • Change design of metadata underneath detailed posts in web UI (#29585, #29605, and #29648 by @ClearlyClaire and @Gargron)
  • Change action button to be last on profiles in web UI (#29533 and #29923 by @ClearlyClaire and @Gargron)
  • Change confirmation prompts in trending moderation interface to be more specific (#19626 by @tribela)
  • Change “Trends” moderation menu to “Recommendations & Trends” and move follow recommendations there (#31292 by @ThisIsMissEm)
  • Change irrelevant fields in account cleanup settings to be disabled unless automatic cleanup is enabled (#26562 by @c960657)
  • Change dropdown menu icon to not be replaced by close icon when open in web UI (#29532 by @Gargron)
  • Change back button to always appear in advanced web UI (#29551 and #29669 by @Gargron)
  • Change border of active compose field search inputs (#29832 and #29839 by @vmstan)
  • Change link detection to allow @ at the end of an URL (#31124 by @adamniedzielski)
  • Change User-Agent to use Mastodon as the product, and http.rb as platform details (#31192 by @ClearlyClaire)
  • Change layout and wording of the Content Retention server settings page (#27733 by @vmstan)
  • Change unconfirmed users to be kept for one week instead of two days (#30285 by @renchap)
  • Change maximum page size for Admin Domain Management APIs from 200 to 500 (#31253 by @ThisIsMissEm)
  • Change database pool size to default to Sidekiq concurrency settings in Sidekiq processes (#26488 by @sinoru)
  • Change alt text to empty string for avatars (#21875 by @jasminjohal)
  • Change Docker images to use custom-built libvips and ffmpeg (#30571, #30569, and #31498 by @vmstan)
  • Change external links in the admin audit log to plain text or local administration pages (#27139 and #27150 by @ClearlyClaire and @ThisIsMissEm)
  • Change YJIT to be enabled when available (#30310 and #27283 by @ClearlyClaire and @mjankowski)
    Enable Ruby's built-in just-in-time compiler. This improves performances substantially, at the cost of a slightly increased memory usage.
  • Change .env file loading from deprecated dotenv-rails gem to dotenv gem (#29173 and #30121 by @mjankowski)
    This should have no effect except in the unlikely case an environment variable included a newline.
  • Change “Panjabi” language name to the more common spelling “Punjabi” (#27117 by @gunchleoc)
  • Change encryption of OTP secrets to use ActiveRecord Encryption (#29831, #28325, #30151, #30202, #30340, and #30344 by @ClearlyClaire and @mjankowski)
    This requires a manual step from administrators of existing servers. Indeed, they need to generate new secrets, which can be done using bundle exec rails db:encryption:init.
    Furthermore, there is a risk that the introduced migration fails if the server was misconfigured in the past. If that happens, the migration error will include the relevant information.
  • Change /api/v1/announcements to return regular Status entities (#26736 by @ClearlyClaire)
  • Change imports to convert case-insensitive fields to lowercase (#29739 and #29740 by @ThisIsMissEm)
  • Change stats in the admin interface to be inclusive of the full selected range, from beginning of day to end of day (#29416 and #29841 by @mjankowski)
  • Change materialized views to be refreshed concurrently to avoid locks (#29015 by @Gargron)
  • Change compose form to use server-provided post character and poll options limits (#28928 and #29490 by @ClearlyClaire and @renchap)
  • Change streaming server logging from npmlog to pino and pino-http (#27828 by @ThisIsMissEm)
    This changes the Mastodon streaming server log format, so this might be considered a breaking change if you were parsing the logs.
  • Change media “ALT” label to use a specific CSS class (#28777 by @ClearlyClaire)
  • Change streaming API host to not be overridden to localhost in development mode (#28557 by @ClearlyClaire)
  • Change cookie rotator to use SHA1 digest for new cookies (#27392 by @ClearlyClaire)
    Note that this requires that no pre-4.2.0 Mastodon web server is running when this code is deployed, as those would not understand the new cookies.
    Therefore, zero-downtime updates are only supported if you're coming from 4.2.0 or newer. If you want to skip Mastodon 4.2, you will need to completely stop Mastodon services before updating.
  • Change preview card deletes to be done using batch method (#28183 by @vmstan)
  • Change img-src and media-src CSP directives to not include https: (#28025 and #28561 by @ClearlyClaire)
  • Change self-destruct procedure (#26439, #29049, and #29420 by @ClearlyClaire and @zunda)
    Instead of enqueuing deletion jobs immediately, tootctl self-destruct now outputs a value for the SELF_DESTRUCT environment variable, which puts a server in self-destruct mode, processing deletions in the background, while giving users access to their export archives.

Removed

  • Remove StatsD integration (replaced by OpenTelemetry) (#30240 by @mjankowski)
  • Remove CacheBuster default options (#30718 by @mjankowski)
  • Remove home marker updates from the Web UI (#22721 by @davbeck)
    The web interface was unconditionally updating the home marker to the most recent received post, discarding any value set by other clients, thus making the feature unreliable.
  • Remove support for Ruby 3.0 (reaching EOL) (#29702 by @mjankowski)
  • Remove setting for unfollow confirmation modal (#29373 by @ClearlyClaire)
    Instead, the unfollow confirmation modal will always be displayed.
  • Remove support for Capistrano (#27295 and #30009 by @mjankowski and @renchap)

Fixed

  • Fix link preview cards not always preserving the original URL from the status (#27312 by @Gargron)
  • Fix log out from user menu not working on Safari (#31402 by @renchap)
  • Fix various issues when in link preview card generation (#28748, #30017, #30362, #30173, #30853, #30929, #30933, #30957, #30987, and #31144 by @adamniedzielski, @oneiros, @phocks, @timothyjrogers, and @tribela)
  • Fix handling of missing links in Webfinger responses (#31030 by @adamniedzielski)
  • Fix HTTP 500 error in /api/v1/polls/:id/votes when required choices parameter is missing (#25598 by @danielmbrasil)
  • Fix cross-origin loading of inert.css polyfill (#30687 by @louis77)
  • Fix cutoff of instance name in sign-up form (#30598 by @oneiros)
  • Fix empty aria-hidden attribute value in logo resources area (#30570 by @mjankowski)
  • Fix “Redirect URI” field not being marked as required in “New application” form (#30311 by @ThisIsMissEm)
  • Fix right-to-left text in preview cards (#30930 by @ClearlyClaire)
  • Fix rack attack match_type value typo in logging config (#30514 by @mjankowski)
  • Fix various cases of duplicate, missing, or inconsistent borders or scrollbar styles (#31068, #31286, #31268, #31275, #31284, #31305, #31346, #31372, #31373, #31389, #31432, #31391, and #31445 by @valtlai and @vmstan)
  • Fix race condition in POST /api/v1/push/subscription (#30166 by @ClearlyClaire)
  • Fix post deletion not being delayed when those are part of an account warning (#30163 by @ClearlyClaire)
  • Fix rendering error on /start when not logged in (#30023 by @timothyjrogers)
  • Fix logo pushing header buttons out of view on certain conditions in mobile layout (#29787 by @ClearlyClaire)
  • Fix notification-related records not being reattributed when merging accounts (#29694 by @ClearlyClaire)
  • Fix results/query in api/v1/featured_tags/suggestions (#29597 by @mjankowski)
  • Fix distracting and confusing always-showing scrollbar track in boost confirmation modal (#31524 by @ClearlyClaire)
  • Fix being able to upload more than 4 media attachments in some cases (#29183 by @mashirozx)
  • Fix preview card player getting embedded when clicking on the external link button (#29457 by @ClearlyClaire)
  • Fix full date display not respecting the locale 12/24h format (#29448 by @renchap)
  • Fix filters title and keywords overflow (#29396 by @GeopJr)
  • Fix incorrect date format in “Follows and followers” (#29390 by @JasonPunyon)
  • Fix “Edit media” modal sizing and layout when space-constrained (#27095 by @ronilaukkarinen)
  • Fix modal container bounds (#29185 by @nico3333fr)
  • Fix inefficient HTTP signature parsing using regexps and StringScanner (#29133 by @ClearlyClaire)
  • Fix moderation report updates through PUT /api/v1/admin/reports/:id not being logged in the audit log (#29044, #30342, and #31033 by @mjankowski, @tribela, and @vmstan)
  • Fix moderation interface allowing to select rule violation when there are no server rules (#31458 by @ThisIsMissEm)
  • Fix redirection from paths with url-encoded @ to their decoded form (#31184 by @timothyjrogers)
  • Fix Trending Tags pending review having an unstable sort order (#31473 by @ThisIsMissEm)
  • Fix the emoji dropdown button always opening the dropdown instead of behaving like a toggle (#29012 by @jh97uk)
  • Fix processing of incoming posts with bearcaps (#26527 by @kmycode)
  • Fix support for IPv6 redis connections in streaming (#31229 by @ThisIsMissEm)
  • Fix search form re-rendering spuriously in web UI (#28876 by @Gargron)
  • Fix RedownloadMediaWorker not being called on transient S3 failure (#28714 by @ClearlyClaire)
  • Fix ISO code for Canadian French from incorrect fr-QC to fr-CA (#26015 by @gunchleoc)
  • Fix .opus file uploads being misidentified by Paperclip (#28580 by @vmstan)
  • Fix loading local accounts with extraneous domain part in WebUI (#28559 by @ClearlyClaire)
  • Fix destructive actions in dropdowns not using error color in light theme (#28484 by @logicalmoody)
  • Fix call to inefficient delete_matched cache method in domain blocks (#28374 by @ClearlyClaire)
  • Fix status edits not always being streamed to mentioned users (#28324 by @ClearlyClaire)
  • Fix onboarding step descriptions being truncated on narrow screens (#28021 by @ClearlyClaire)
  • Fix duplicate IDs in relationships and familiar_followers APIs (#27982 by @KevinBongart)
  • Fix modal content not being selectable (#27813 by @pajowu)
  • Fix Web UI not displaying appropriate explanation when a user hides their follows/followers (#27791 by @ClearlyClaire)
  • Fix format-dependent redirects being cached regardless of requested format (#27632 by @ClearlyClaire)
  • Fix confusing screen when visiting a confirmation link for an already-confirmed email (#27368 by @ClearlyClaire)
  • Fix explore page reloading when you navigate back to it in web UI (#27489 by @Gargron)
  • Fix missing redirection from /home to /deck/home in the advanced interface (#27378 by @Signez)
  • Fix empty environment variables not using default nil value (#27400 by @renchap)
  • Fix language sorting in settings (#27158 by @gunchleoc)

Upgrade notes

To get the code for v4.3.0-rc.1, use git fetch && git checkout v4.3.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 changed since v4.2.12, with the Ruby, PostgreSQL and Node.js minimum version being higher. In addition, an optional dependency on libvips has been introduced to replace ImageMagick.

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

Active Record encryption secrets configuration

Mastodon now requires new environment variables for secret keys to be set.
Generate new secrets and set ACTIVE_RECORD_ENCRYPTION_DETERMINISTIC_KEY, ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT, and ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY accordingly before restarting Mastodon.

All Mastodon processes need to have access to them, so if you use multiple puma (mastodon-web) and sidekiq (mastodon-sidekiq) nodes, make sure to copy the secrets to all of them.

Such secrets can be generated by running bin/rails db:encryption:init.

Docker image split

The official Docker image has now been split in two smaller images:

  • ghcr.io/mastodon/mastodon, which does not contain the streaming server anymore
  • ghcr.io/mastodon/mastodon-streaming, which contains only the streaming server

The docker-compose.yml file shipped with Mastodon has been updated accordingly. If you use something else, you will need to update your configuration.

Cookies and rolling updates

Cookies issued by Mastodon are now using SHA256 digests. To ensure you are not losing user sessions, do not perform a rolling update from versions of Mastodon earlier than v4.2.0.

That is, either completely stop Mastodon before updating it, or update to the latest v4.2 then update to v4.3.

Yarn 4 and corepack

We have switched from Yarn 1 to the more modern and more efficient Yarn 4.

The recommended way is to use corepack, which is normally distributed with NodeJS. To do so, do corepack enable, then, in Mastodon's directory, once you have checked out v4.3.0-rc.1, corepack prepare.

You can also install yarn 4 directly if you don't want to or can't use corepack.

ImageMagick deprecation and libvips replacement

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

To use libvips instead of ImageMagick, install libvips 8.13 or newer, and set the MASTODON_USE_LIBVIPS environment variable to true.

The official Mastodon docker images use libvips instead of ImageMagick, and we recommend you do the same, but ImageMagick is still supported in this version for older distributions that do not include a recent enough version of libvips.

StatsD removal and OpenTelemetry integration

StatsD support has been removed, after being deprecated in 4.2.0.

If you want to have metrics for your Sidekiq queues (queue size, latency…), you can use https://github.com/Strech/sidekiq-prometheus-exporter

Mastodon now also supports exporting tracing data using OpenTelemetry. This can be used to get detailed performance data, as well as monitoring for backend errors. More informations on how to configure it in our docs (https://docs.joinmastodon.org/admin/config/#otel)

Update steps

The following instructions are for updating from 4.2.12.

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.2 version, please check the “Cookies and rolling updates” section above.

If you are updating from 4.3.0-beta.1 or 4.3.0-beta.2, 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 such an 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 yarn 4 (if you use corepack, just do corepack prepare). See the “Yarn 4 and corepack” section for more information.
  3. Install dependencies with bundle install and yarn install --immutable
  4. Generate secrets by running RAILS_ENV=production bin/rails db:encryption:init, then copy them to your .env.production (copy it across all your nodes if you use multiple ones)
  5. Precompile the assets: RAILS_ENV=production bundle exec rails assets:precompile
  6. 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
  7. Restart all Mastodon processes. If you are updating directly from a Mastodon version earlier than 4.2.0, see the “Cookies and rolling updates” section.
  8. Run the post-deployment database migrations: RAILS_ENV=production bundle exec rails db:migrate
  9. If you use Elasticsearch or OpenSearch, rebuild the account search index with RAILS_ENV=production bin/tootctl search deploy --only=accounts

When using docker

  1. Generate secrets by running docker-compose run --rm web bin/rails db:encryption:init, then copy them to your .env.production (make sure to copy them across all your Mastodon nodes as they will all need access to these secrets)
  2. 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
  3. Make sure your Docker configuration has been updated to take the Docker image split into account (See the “Docker image split” section above)
  4. Restart all Mastodon processes. If you are updating directly from a Mastodon version earlier than 4.2.0, see the “Cookies and rolling updates” section.
  5. Run the post-deployment database migrations: docker-compose run --rm web bundle exec rails db:migrate
  6. If you use Elasticsearch or OpenSearch, rebuild the account search index with docker-compose run --rm web bin/tootctl search deploy --only=accounts

Update steps from 4.3.0-beta.1 or 4.3.0-beta.2

The following instructions are for updating from 4.3.0-beta.1 or 4.3.0-beta.2, 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 such an 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. If you are updating directly from a Mastodon version earlier than 4.2.0, see the “Cookies and rolling updates” section.
  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. If you are updating directly from a Mastodon version earlier than 4.2.0, see the “Cookies and rolling updates” section.
  3. Run the post-deployment database migrations: docker-compose run --rm web bundle exec rails db:migrate