v4.3.0
This is the first tagged glitch-soc release, corresponding to Mastodon's v4.3.0, which release notes are reproduced below.
Upgrade overview
This release contains upgrade notes that deviate from the norm:
ℹ️ 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
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 (mastodon#27792, mastodon#28902, and mastodon#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. - Fix ReDoS vulnerability on some Ruby versions (GHSA-jpxp-r43f-rhvx)
- Change
form-action
Content-Security-Policy directive to be more restrictive (mastodon#26897 and mastodon#32241 by @ClearlyClaire) - Update dependencies
Added
-
Add server-side notification grouping (mastodon#29889, mastodon#30576, mastodon#30685, mastodon#30688, mastodon#30707, mastodon#30776, mastodon#30779, mastodon#30781, mastodon#30440, mastodon#31062, mastodon#31098, mastodon#31076, mastodon#31111, mastodon#31123, mastodon#31223, mastodon#31214, mastodon#31224, mastodon#31299, mastodon#31325, mastodon#31347, mastodon#31304, mastodon#31326, mastodon#31384, mastodon#31403, mastodon#31433, mastodon#31509, mastodon#31486, mastodon#31513, mastodon#31592, mastodon#31594, mastodon#31638, mastodon#31746, mastodon#31652, mastodon#31709, mastodon#31725, mastodon#31745, mastodon#31613, mastodon#31657, mastodon#31840, mastodon#31610, mastodon#31929, mastodon#32089, mastodon#32085, mastodon#32243, mastodon#32179 and mastodon#32254 by @ClearlyClaire, @Gargron, @mgmn, and @renchap)
Group notifications of the same type for the same target, so that your notifications no longer get cluttered by boost and favorite notifications as soon as a couple of your posts get traction.
This is done server-side so that clients can efficiently get relevant groups without having to go through numerous pages of individual notifications.
As part of this, the visual design of the entire notifications feature has been revamped.
The API consists of:- a new
group_key
attribute toNotification
entities GET /api/v2/notifications
: https://docs.joinmastodon.org/methods/grouped_notifications/#get-groupedGET /api/v2/notifications/:group_key
: https://docs.joinmastodon.org/methods/grouped_notifications/#get-notification-groupGET /api/v2/notifications/:group_key/accounts
: https://docs.joinmastodon.org/methods/grouped_notifications/#get-group-accountsPOST /api/v2/notifications/:group_key/dimsiss
: https://docs.joinmastodon.org/methods/grouped_notifications/#dismiss-groupGET /api/v2/notifications/:unread_count
: https://docs.joinmastodon.org/methods/grouped_notifications/#unread-group-count
- a new
-
Add notification policies, filtered notifications and notification requests (mastodon#29366, mastodon#29529, mastodon#29433, mastodon#29565, mastodon#29567, mastodon#29572, mastodon#29575, mastodon#29588, mastodon#29646, mastodon#29652, mastodon#29658, mastodon#29666, mastodon#29693, mastodon#29699, mastodon#29737, mastodon#29706, mastodon#29570, mastodon#29752, mastodon#29810, mastodon#29826, mastodon#30114, mastodon#30251, mastodon#30559, mastodon#29868, mastodon#31008, mastodon#31011, mastodon#30996, mastodon#31149, mastodon#31220, mastodon#31222, mastodon#31225, mastodon#31242, mastodon#31262, mastodon#31250, mastodon#31273, mastodon#31310, mastodon#31316, mastodon#31322, mastodon#31329, mastodon#31324, mastodon#31331, mastodon#31343, mastodon#31342, mastodon#31309, mastodon#31358, mastodon#31378, mastodon#31406, mastodon#31256, mastodon#31456, mastodon#31419, mastodon#31457, mastodon#31508, mastodon#31540, mastodon#31541, mastodon#31723, mastodon#32062 and mastodon#32281 by @ClearlyClaire, @Gargron, @TheEssem, @mgmn, @oneiros, and @renchap)
The old “Block notifications from non-followers”, “Block notifications from people you don't follow” and “Block direct messages from people you don't follow” notification settings have been replaced by a new set of settings found directly in the notification column.
You can now separately filter or drop notifications from people you don't follow, people who don't follow you, accounts created within the past 30 days, as well as unsolicited private mentions, and accounts limited by the moderation.
Instead of being outright dropped, notifications that you chose to filter are put in a separate “Filtered notifications” box that you can review separately without it clogging your main notifications.
This adds the following REST API endpoints:GET /api/v2/notifications/policy
: https://docs.joinmastodon.org/methods/notifications/#get-policyPATCH /api/v2/notifications/policy
: https://docs.joinmastodon.org/methods/notifications/#update-the-filtering-policy-for-notificationsGET /api/v1/notifications/requests
: https://docs.joinmastodon.org/methods/notifications/#get-requestsGET /api/v1/notifications/requests/:id
: https://docs.joinmastodon.org/methods/notifications/#get-one-requestPOST /api/v1/notifications/requests/:id/accept
: https://docs.joinmastodon.org/methods/notifications/#accept-requestPOST /api/v1/notifications/requests/:id/dismiss
: https://docs.joinmastodon.org/methods/notifications/#dismiss-requestPOST /api/v1/notifications/requests/accept
: https://docs.joinmastodon.org/methods/notifications/#accept-multiple-requestsPOST /api/v1/notifications/requests/dismiss
: https://docs.joinmastodon.org/methods/notifications/#dismiss-multiple-requestsGET /api/v1/notifications/requests/merged
: https://docs.joinmastodon.org/methods/notifications/#requests-merged
In addition, accepting one or more notification requests generates a new streaming event:
notifications_merged
: an event of this type indicates accepted notification requests have finished merging, and the notifications list should be refreshed
-
Add notifications of severed relationships (mastodon#27511, mastodon#29665, mastodon#29668, mastodon#29670, mastodon#29700, mastodon#29714, mastodon#29712, and mastodon#29731 by @ClearlyClaire and @Gargron)
Notify local users when they lose relationships as a result of a local moderator blocking a remote account or server, allowing the affected user to retrieve the list of broken relationships.
Note that this does not notify remote users.
This adds thesevered_relationships
notification type to the REST API and streaming, with a newrelationship_severance_event
attribute. -
Add hover cards in web UI (mastodon#30754, mastodon#30864, mastodon#30850, mastodon#30879, mastodon#30928, mastodon#30949, mastodon#30948, mastodon#30931, and mastodon#31300 by @ClearlyClaire, @Gargron, and @renchap)
Hovering over an avatar or username will now display a hover card with the first two lines of the user's description and their first two profile fields.
This can be disabled in the “Animations and accessibility” section of the preferences. -
Add "system" theme setting (light/dark theme depending on user system preference) (mastodon#29748, mastodon#29553, mastodon#29795, mastodon#29918, mastodon#30839, and mastodon#30861 by @nshki, @ErikUden, @mjankowski, @renchap, and @vmstan)
Add a “system” theme that automatically switch between default dark and light themes depending on the user's system preferences.
Also changes the default server theme to this new “system” theme so that automatic theme selection happens even when logged out. -
Add timeline of public posts about a trending link (mastodon#30381 and mastodon#30840 by @Gargron)
You can now see public posts mentioning currently-trending articles from people who have opted into discovery features.
This adds a new REST API endpoint:GET /api/v1/timelines/link?url=:url
: https://docs.joinmastodon.org/methods/timelines/#link
-
Add author highlight for news articles whose authors are on the fediverse (mastodon#30398, mastodon#30670, mastodon#30521, mastodon#30846, mastodon#31819, mastodon#31900 and mastodon#32188 by @Gargron, @mjankowski and @oneiros)
This adds a mechanism to highlight the author of news articles shared on Mastodon.
Articles hosted outside the fediverse can indicate a fediverse author with a meta tag:<meta name="fediverse:creator" content="username@domain" />
On the API side, this is represented by a new
authors
attribute to thePreviewCard
entity: https://docs.joinmastodon.org/entities/PreviewCard/#authors\
Users can allow arbitrary domains to usefediverse:creator
to credit them by visiting/settings/verification
.
This is federated as a newattributionDomains
property in thehttp://joinmastodon.org/ns
namespace, containing an array of domain names: https://docs.joinmastodon.org/spec/activitypub/#properties-used-1 -
Add in-app notifications for moderation actions and warnings (mastodon#30065, mastodon#30082, and mastodon#30081 by @ClearlyClaire)
In addition to email notifications, also notify users of moderation actions or warnings against them directly within the app, so they are less likely to miss important communication from their moderators.
This adds themoderation_warning
notification type to the REST API and streaming, with a newmoderation_warning
attribute. -
Add domain information to profiles in web UI (mastodon#29602 by @Gargron)
Clicking the domain of a user in their profile will now open a tooltip with a short explanation about servers and federation. -
Add support for Redis sentinel (mastodon#31694, mastodon#31623, mastodon#31744, mastodon#31767, and mastodon#31768 by @ThisIsMissEm and @oneiros)
See https://docs.joinmastodon.org/admin/scaling/#redis-sentinel -
Add ability to reorder uploaded media before posting in web UI (mastodon#28456 and mastodon#32093 by @Gargron)
-
Add “A Mastodon update is available.” message on admin dashboard for non-bugfix updates (mastodon#32106 by @ClearlyClaire)
-
Add ability to view alt text by clicking the ALT badge in web UI (mastodon#32058 by @Gargron)
-
Add preview of followers removed in domain block modal in web UI (mastodon#32032 and mastodon#32105 by @ClearlyClaire and @Gargron)
-
Add reblogs and favourites counts to statuses in ActivityPub (mastodon#32007 by @Gargron)
-
Add moderation interface for searching hashtags (mastodon#30880 by @ThisIsMissEm)
-
Add ability for admins to configure instance favicon and logo (mastodon#30040, mastodon#30208, mastodon#30259, mastodon#30375, mastodon#30734, mastodon#31016, and mastodon#30205 by @ClearlyClaire, @FawazFarid, @JasonPunyon, @mgmn, and @renchap)
This is also exposed through the REST API: https://docs.joinmastodon.org/entities/Instance/#icon -
Add
api_versions
to/api/v2/instance
(mastodon#31354 by @ClearlyClaire)
Add API version number to make it easier for clients to detect compatible features going forward.
See API documentation at https://docs.joinmastodon.org/entities/Instance/#api-versions -
Add quick links to Administration and Moderation Reports from Web UI (mastodon#24838 by @ThisIsMissEm)
-
Add link to
/admin/roles
in moderation interface when changing someone's role (mastodon#31791 by @ClearlyClaire) -
Add recent audit log entries in federation moderation interface (mastodon#27386 by @ThisIsMissEm)
-
Add profile setup to onboarding in web UI (mastodon#27829, mastodon#27876, and mastodon#28453 by @Gargron)
-
Add prominent share/copy button on profiles in web UI (mastodon#27865 and mastodon#27889 by @ClearlyClaire and @Gargron)
-
Add optional hints for server rules (mastodon#29539 and mastodon#29758 by @ClearlyClaire and @Gargron)
Server rules can now be broken into a short rule name and a longer explanation of the rule.
This adds a newhint
attribute toRule
entities in the REST API. -
Add support for PKCE in OAuth flow (mastodon#31129 by @ThisIsMissEm)
-
Add CDN cache busting on media deletion (mastodon#31353 and mastodon#31414 by @ClearlyClaire and @tribela)
-
Add the OAuth application used in local reports (mastodon#30539 by @ThisIsMissEm)
-
Add hint to user that other remote statuses may be missing (mastodon#26910, mastodon#31387, and mastodon#31516 by @Gargron, @audiodude, and @renchap)
-
Add lang attribute on preview card title (mastodon#31303 by @c960657)
-
Add check for
Content-Length
inResponseWithLimitAdapter
(mastodon#31285 by @c960657) -
Add
Accept-Language
header to fetch preview cards in the server's default language (mastodon#31232 by @c960657) -
Add support for PKCE Extension in OmniAuth OIDC through the
OIDC_USE_PKCE
environment variable (mastodon#31131 by @ThisIsMissEm) -
Add API endpoints for unread notifications count (mastodon#31191 by @ClearlyClaire)
This adds the following REST API endpoints:GET /api/v1/notifications/unread_count
: https://docs.joinmastodon.org/methods/notifications/#unread-count
-
Add
/
keyboard shortcut to focus the search field (mastodon#29921 by @ClearlyClaire) -
Add button to view the Hashtag on the instance from Hashtags in Moderation UI (mastodon#31533 by @ThisIsMissEm)
-
Add list of pending releases directly in mail notifications for version updates (mastodon#29436 and mastodon#30035 by @ClearlyClaire)
-
Add “Appeals” link under “Moderation” navigation category in moderation interface (mastodon#31071 by @ThisIsMissEm)
-
Add badge on account card in report moderation interface when account is already suspended (mastodon#29592 by @ClearlyClaire)
-
Add admin comments directly to the
admin/instances
page (mastodon#29240 by @tribela) -
Add ability to require approval when users sign up using specific email domains (mastodon#28468, mastodon#28732, mastodon#28607, and mastodon#28608 by @ClearlyClaire)
-
Add banner for forwarded reports made by remote users about remote content (mastodon#27549 by @ClearlyClaire)
-
Add support HTML ruby tags in remote posts for east-asian languages (mastodon#30897 by @ThisIsMissEm)
-
Add link to manage warning presets in admin navigation (mastodon#26199 by @vmstan)
-
Add volume saving/reuse to video player (mastodon#27488 by @thehydrogen)
-
Add Elasticsearch index size, ffmpeg and ImageMagick versions to the admin dashboard (mastodon#27301, mastodon#30710, mastodon#31130, and mastodon#30845 by @vmstan)
-
Add
MASTODON_SIDEKIQ_READY_FILENAME
environment variable to use a file for Sidekiq to signal it is ready to process jobs (mastodon#30971 and mastodon#30988 by @renchap)
In the official Docker image, this is set tosidekiq_process_has_started_and_will_begin_processing_jobs
so that Sidekiq will touchtmp/sidekiq_process_has_started_and_will_begin_processing_jobs
to signal readiness. -
Add
S3_RETRY_LIMIT
environment variable to make S3 retries configurable (mastodon#23215 by @smiba) -
Add
S3_KEY_PREFIX
environment variable (mastodon#30181 by @S0yKaf) -
Add support for multiple
redirect_uris
when creating OAuth 2.0 Applications (mastodon#29192 by @ThisIsMissEm) -
Add Interlingue and Interlingua to interface languages (mastodon#28630 and mastodon#30828 by @Dhghomon and @renchap)
-
Add Kashubian, Pennsylvania Dutch, Vai, Jawi Malay, Mohawk and Low German to posting languages (mastodon#26024, mastodon#26634, mastodon#27136, mastodon#29098, mastodon#27115, and mastodon#27434 by @EngineerDali, @HelgeKrueger, and @gunchleoc)
-
Add option to use native Ruby driver for Redis through
REDIS_DRIVER=ruby
(mastodon#30717 by @vmstan) -
Add support for libvips in addition to ImageMagick (mastodon#30090, mastodon#30590, mastodon#30597, mastodon#30632, mastodon#30857, mastodon#30869, mastodon#30858 and mastodon#32104 by @ClearlyClaire, @Gargron, and @mjankowski)
Server admins can now use libvips as a faster and lighter alternative to ImageMagick for processing user-uploaded images.
This requires libvips 8.13 or newer, and needs to be enabled withMASTODON_USE_LIBVIPS=true
.
This is enabled by default in the official Docker images, and is intended to completely replace ImageMagick in the future. -
Add validations to
Web::PushSubscription
(mastodon#30540 and mastodon#30542 by @ThisIsMissEm) -
Add anchors to each authorized application in
/oauth/authorized_applications
(mastodon#31677 by @fowl2) -
Add active animation to header settings button (mastodon#30221, mastodon#30307, and mastodon#30388 by @daudix)
-
Add OpenTelemetry instrumentation (mastodon#30130, mastodon#30322, mastodon#30353, mastodon#30350 and mastodon#31998 by @julianocosta89, @renchap, @robbkidd and @timetinytim)
See https://docs.joinmastodon.org/admin/config/#otel for documentation -
Add API to get multiple accounts and statuses (mastodon#27871 and mastodon#30465 by @ClearlyClaire)
This addsGET /api/v1/accounts
andGET /api/v1/statuses
to the REST API, see https://docs.joinmastodon.org/methods/accounts/#index and https://docs.joinmastodon.org/methods/statuses/#index -
Add support for CORS to
POST /oauth/revoke
(mastodon#31743 by @ClearlyClaire) -
Add redirection back to previous page after site upload deletion (mastodon#30141 by @FawazFarid)
-
Add RFC8414 OAuth 2.0 server metadata (mastodon#29191 by @ThisIsMissEm)
-
Add loading indicator and empty result message to advanced interface search (mastodon#30085 by @ClearlyClaire)
-
Add
profile
OAuth 2.0 scope, allowing more limited access to user data (mastodon#29087 and mastodon#30357 by @ThisIsMissEm) -
Add the role ID to the badge component (mastodon#29707 by @renchap)
-
Add diagnostic message for failure during CLI search deploy (mastodon#29462 by @mjankowski)
-
Add pagination
Link
headers on API accounts/statuses when pinned true (mastodon#29442 by @mjankowski) -
Add support for specifying custom CA cert for Elasticsearch through
ES_CA_FILE
(mastodon#29122 and mastodon#29147 by @ClearlyClaire) -
Add groundwork for annual reports for accounts (mastodon#28693 by @Gargron)
This lays the groundwork for a “year-in-review”/“wrapped” style report for local users, but is currently not in use. -
Add notification email on invalid second authenticator (mastodon#28822 by @ClearlyClaire)
-
Add date of account deletion in list of accounts in the admin interface (mastodon#25640 by @tribela)
-
Add new emojis from
jdecked/twemoji
15.0 (mastodon#28404 by @TheEssem) -
Add configurable error handling in attachment batch deletion (mastodon#28184 by @vmstan)
This makes the S3 batch size configurable through theS3_BATCH_DELETE_LIMIT
environment variable (defaults to 1000), and adds some retry logic, configurable through theS3_BATCH_DELETE_RETRY
environment variable (defaults to 3). -
Add VAPID public key to instance serializer (mastodon#28006 by @ThisIsMissEm)
-
Add support for serving JRD
/.well-known/host-meta.json
in addition to XRD host-meta (mastodon#32206 by @c960657) -
Add
nodeName
andnodeDescription
to nodeinfometadata
(mastodon#28079 by @6543) -
Add Thai diacritics and tone marks in
HASHTAG_INVALID_CHARS_RE
(mastodon#26576 by @ppnplus) -
Add variable delay before link verification of remote account links (mastodon#27774 by @ClearlyClaire)
-
Add support for invite codes in the registration API (mastodon#27805 by @ClearlyClaire)
-
Add HTML lang attribute to preview card descriptions (mastodon#27503 by @srapilly)
-
Add display of relevant account warnings to report action logs (mastodon#27425 by @ClearlyClaire)
-
Add validation of allowed schemes on preview card URLs (mastodon#27485 by @mjankowski)
-
Add token introspection without read scope to
/api/v1/apps/verify_credentials
(mastodon#27142 by @ThisIsMissEm) -
Add support for cross-origin request to
/nodeinfo/2.0
(mastodon#27413 by @palant) -
Add variable delay before link verification of remote account links (mastodon#27351 by @ClearlyClaire)
-
Add PWA shortcut to
/explore
page (mastodon#27235 by @jake-anto)
Changed
- Change icons throughout the web interface (mastodon#27385, mastodon#27539, mastodon#27555, mastodon#27579, mastodon#27700, mastodon#27817, mastodon#28519, mastodon#28709, mastodon#28064, mastodon#28775, mastodon#28780, mastodon#27924, mastodon#29294, mastodon#29395, mastodon#29537, mastodon#29569, mastodon#29610, mastodon#29612, mastodon#29649, mastodon#29844, mastodon#27780, mastodon#30974, mastodon#30963, mastodon#30962, mastodon#30961, mastodon#31362, mastodon#31363, mastodon#31359, mastodon#31371, mastodon#31360, mastodon#31512, mastodon#31511, mastodon#31525, mastodon#32153, and mastodon#32201 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 (mastodon#28119, mastodon#29059, mastodon#29248, mastodon#29372, mastodon#29384, mastodon#29417, mastodon#29456, mastodon#29406, mastodon#29651, mastodon#29659, mastodon#31889 and mastodon#32033 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 modals in the web UI (mastodon#29576, mastodon#29614, mastodon#29640, mastodon#29644, mastodon#30131, mastodon#30884, mastodon#31399, mastodon#31555, mastodon#31752, mastodon#31801, mastodon#31883, mastodon#31844, mastodon#31864, and mastodon#31943 by @ClearlyClaire, @Gargron, @tribela and @vmstan)
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 (mastodon#29522, mastodon#29584, mastodon#29653, mastodon#29779, mastodon#29803, mastodon#29809, mastodon#29808, mastodon#29828, mastodon#31034, mastodon#31168, mastodon#31266, mastodon#31348, mastodon#31349, mastodon#31361, mastodon#31510 and mastodon#32128 by @ClearlyClaire, @Gargron, @mjankowski, @renchap, and @vmstan)
- Change onboarding prompt to follow suggestions carousel in web UI (mastodon#28878, mastodon#29272, and mastodon#31912 by @Gargron)
- Change email templates (mastodon#28416, mastodon#28755, mastodon#28814, mastodon#29064, mastodon#28883, mastodon#29470, mastodon#29607, mastodon#29761, mastodon#29760, mastodon#29879, mastodon#32073 and mastodon#32132 by @c960657, @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 (mastodon#28314, mastodon#28433, mastodon#29017, mastodon#29108, mastodon#29306, mastodon#29550, mastodon#29619, and mastodon#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 thesource
attribute inSuggestion
entities in the REST API, and replaces it with the newsources
attribute. - Change account search algorithm (mastodon#30803 by @Gargron)
- Change streaming server to use its own dependencies and its own docker image (mastodon#24702, mastodon#27967, mastodon#26850, mastodon#28112, mastodon#28115, mastodon#28137, mastodon#28138, mastodon#28497, mastodon#28548, mastodon#30795, mastodon#31612, and mastodon#31615 by @TheEssem, @ThisIsMissEm, @jippi, @renchap, @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.
Themastodon
image does not contain the streaming server anymore, as it has been moved to its ownmastodon-streaming
image.
Administrators may need to update their setup accordingly. - Change how content warnings and filters are displayed in web UI (mastodon#31365, and mastodon#31761 by @Gargron)
- Change preview card processing to ignore
undefined
as canonical url (mastodon#31882 by @oneiros) - Change embedded posts to use web UI (mastodon#31766, mastodon#32135 and mastodon#32271 by @Gargron)
- Change inner borders in media galleries in web UI (mastodon#31852 by @Gargron)
- Change design of media attachments and profile media tab in web UI (mastodon#31807, mastodon#32048, mastodon#31967, mastodon#32217, mastodon#32224 and mastodon#32257 by @ClearlyClaire and @Gargron)
- Change labels on thread indicators in web UI (mastodon#31806 by @Gargron)
- Change label of "Data export" menu item in settings interface (mastodon#32099 by @c960657)
- Change responsive break points on navigation panel in web UI (mastodon#32034 by @Gargron)
- Change cursor to
not-allowed
on disabled buttons (mastodon#32076 by @mjankowski) - Change OAuth authorization prompt to not refer to apps as “third-party” (mastodon#32005 by @Gargron)
- Change Mastodon to issue correct HTTP signatures by default (mastodon#31994 by @ClearlyClaire)
- Change zoom icon in web UI (mastodon#29683 by @Gargron)
- Change directory page to use URL query strings for options (mastodon#31980, mastodon#31977 and mastodon#31984 by @ClearlyClaire and @renchap)
- Change report action buttons to be disabled when action has already been taken (mastodon#31773, mastodon#31822, and mastodon#31899 by @ClearlyClaire and @ThisIsMissEm)
- Change width of columns in advanced web UI (mastodon#31762 by @Gargron)
- Change design of unread conversations in web UI (mastodon#31763 by @Gargron)
- Change Web UI to allow viewing and severing relationships with suspended accounts (mastodon#27667 by @ClearlyClaire)
This also adds awith_suspended
parameter toGET /api/v1/accounts/relationships
in the REST API. - Change preview card image size limit from 2MB to 8MB when using libvips (mastodon#31904 by @ClearlyClaire)
- Change avatars border radius (mastodon#31390 by @renchap)
- Change counters to be displayed on profile timelines in web UI (mastodon#30525 by @Gargron)
- Change disabled buttons color in light mode to make the difference more visible (mastodon#30998 by @renchap)
- Change design of people tab on explore in web UI (mastodon#30059 by @Gargron)
- Change sidebar text in web UI (mastodon#30696 by @Gargron)
- Change "Follow" to "Follow back" and "Mutual" when appropriate in web UI (mastodon#28452, mastodon#28465, and mastodon#31934 by @ClearlyClaire, @Gargron and @renchap)
- Change media to be hidden/blurred by default in report modal (mastodon#28522 by @ClearlyClaire)
- Change order of the "muting" and "blocking" list options in “Data Exports” (mastodon#26088 by @fixermark)
- Change admin and moderation notes character limit from 500 to 2000 characters (mastodon#30288 by @ThisIsMissEm)
- Change mute options to be in dropdown on muted users list in web UI (mastodon#30049 and mastodon#31315 by @ClearlyClaire and @Gargron)
- Change out-of-band hashtags design in web UI (mastodon#29732 by @Gargron)
- Change design of metadata underneath detailed posts in web UI (mastodon#29585, mastodon#29605, and mastodon#29648 by @ClearlyClaire and @Gargron)
- Change action button to be last on profiles in web UI (mastodon#29533 and mastodon#29923 by @ClearlyClaire and @Gargron)
- Change confirmation prompts in trending moderation interface to be more specific (mastodon#19626 by @tribela)
- Change “Trends” moderation menu to “Recommendations & Trends” and move follow recommendations there (mastodon#31292 by @ThisIsMissEm)
- Change irrelevant fields in account cleanup settings to be disabled unless automatic cleanup is enabled (mastodon#26562 by @c960657)
- Change dropdown menu icon to not be replaced by close icon when open in web UI (mastodon#29532 by @Gargron)
- Change back button to always appear in advanced web UI (mastodon#29551 and mastodon#29669 by @Gargron)
- Change border of active compose field search inputs (mastodon#29832 and mastodon#29839 by @vmstan)
- Change instances of Nokogiri HTML4 parsing to HTML5 (mastodon#31812, mastodon#31815, mastodon#31813, and mastodon#31814 by @flavorjones)
- Change link detection to allow
@
at the end of an URL (mastodon#31124 by @adamniedzielski) - Change User-Agent to use Mastodon as the product, and http.rb as platform details (mastodon#31192 by @ClearlyClaire)
- Change layout and wording of the Content Retention server settings page (mastodon#27733 by @vmstan)
- Change unconfirmed users to be kept for one week instead of two days (mastodon#30285 by @renchap)
- Change maximum page size for Admin Domain Management APIs from 200 to 500 (mastodon#31253 by @ThisIsMissEm)
- Change database pool size to default to Sidekiq concurrency settings in Sidekiq processes (mastodon#26488 by @sinoru)
- Change alt text to empty string for avatars (mastodon#21875 by @jasminjohal)
- Change Docker images to use custom-built libvips and ffmpeg (mastodon#30571, mastodon#30569, and mastodon#31498 by @vmstan)
- Change external links in the admin audit log to plain text or local administration pages (mastodon#27139 and mastodon#27150 by @ClearlyClaire and @ThisIsMissEm)
- Change YJIT to be enabled when available (mastodon#30310 and mastodon#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 deprecateddotenv-rails
gem todotenv
gem (mastodon#29173 and mastodon#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” (mastodon#27117 by @gunchleoc)
- Change encryption of OTP secrets to use ActiveRecord Encryption (mastodon#29831, mastodon#28325, mastodon#30151, mastodon#30202, mastodon#30340, and mastodon#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 usingbundle 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 regularStatus
entities (mastodon#26736 by @ClearlyClaire) - Change imports to convert case-insensitive fields to lowercase (mastodon#29739 and mastodon#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 (mastodon#29416 and mastodon#29841 by @mjankowski)
- Change materialized views to be refreshed concurrently to avoid locks (mastodon#29015 by @Gargron)
- Change compose form to use server-provided post character and poll options limits (mastodon#28928 and mastodon#29490 by @ClearlyClaire and @renchap)
- Change streaming server logging from
npmlog
topino
andpino-http
(mastodon#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 (mastodon#28777 by @ClearlyClaire)
- Change streaming API host to not be overridden to localhost in development mode (mastodon#28557 by @ClearlyClaire)
- Change cookie rotator to use SHA1 digest for new cookies (mastodon#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 (mastodon#28183 by @vmstan)
- Change
img-src
andmedia-src
CSP directives to not includehttps:
(mastodon#28025 and mastodon#28561 by @ClearlyClaire) - Change self-destruct procedure (mastodon#26439, mastodon#29049, and mastodon#29420 by @ClearlyClaire and @zunda)
Instead of enqueuing deletion jobs immediately,tootctl self-destruct
now outputs a value for theSELF_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 unused E2EE messaging code and related
crypto
OAuth scope (mastodon#31193, mastodon#31945, mastodon#31963, and mastodon#31964 by @ClearlyClaire and @mjankowski) - Remove StatsD integration (replaced by OpenTelemetry) (mastodon#30240 by @mjankowski)
- Remove
CacheBuster
default options (mastodon#30718 by @mjankowski) - Remove home marker updates from the Web UI (mastodon#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) (mastodon#29702 by @mjankowski)
- Remove setting for unfollow confirmation modal (mastodon#29373 by @ClearlyClaire)
Instead, the unfollow confirmation modal will always be displayed. - Remove support for Capistrano (mastodon#27295 and mastodon#30009 by @mjankowski and @renchap)
Fixed
- Fix link preview cards not always preserving the original URL from the status (mastodon#27312 by @Gargron)
- Fix log out from user menu not working on Safari (mastodon#31402 by @renchap)
- Fix various issues when in link preview card generation (mastodon#28748, mastodon#30017, mastodon#30362, mastodon#30173, mastodon#30853, mastodon#30929, mastodon#30933, mastodon#30957, mastodon#30987, and mastodon#31144 by @adamniedzielski, @oneiros, @phocks, @timothyjrogers, and @tribela)
- Fix handling of missing links in Webfinger responses (mastodon#31030 by @adamniedzielski)
- Fix error when accepting an appeal for sensitive posts deleted in the meantime (mastodon#32037 by @ClearlyClaire)
- Fix error when encountering reblog of deleted post in feed rebuild (mastodon#32001 by @ClearlyClaire)
- Fix Safari browser glitch related to horizontal scrolling (mastodon#31960 by @Gargron)
- Fix unresolvable mentions sometimes preventing processing incoming posts (mastodon#29215 by @tribela and @ClearlyClaire)
- Fix too many requests caused by relationship look-ups in web UI (mastodon#32042 by @Gargron)
- Fix links for reblogs in moderation interface (mastodon#31979 by @ClearlyClaire)
- Fix the appearance of avatars when they do not load (mastodon#31966 and mastodon#32270 by @Gargron and @renchap)
- Fix spurious error notifications for aborted requests in web UI (mastodon#31952 by @c960657)
- Fix HTTP 500 error in
/api/v1/polls/:id/votes
when requiredchoices
parameter is missing (mastodon#25598 by @danielmbrasil) - Fix security context sometimes not being added in LD-Signed activities (mastodon#31871 by @ClearlyClaire)
- Fix cross-origin loading of
inert.css
polyfill (mastodon#30687 by @louis77) - Fix wrapping in dashboard quick access buttons (mastodon#32043 by @renchap)
- Fix recently used tags hint being displayed in profile edition page when there is none (mastodon#32120 by @mjankowski)
- Fix checkbox lists on narrow screens in the settings interface (mastodon#32112 by @mjankowski)
- Fix the position of status action buttons being affected by interaction counters (mastodon#32084 by @renchap)
- Fix the summary of converted ActivityPub object types to be treated as HTML (mastodon#28629 by @Menrath)
- Fix cutoff of instance name in sign-up form (mastodon#30598 by @oneiros)
- Fix invalid date searches returning 503 errors (mastodon#31526 by @notchairmk)
- Fix invalid
visibility
values inPOST /api/v1/statuses
returning 500 errors (mastodon#31571 by @c960657) - Fix some components re-rendering spuriously in web UI (mastodon#31879 and mastodon#31881 by @ClearlyClaire and @Gargron)
- Fix sort order of moderation notes on Reports and Accounts (mastodon#31528 by @ThisIsMissEm)
- Fix email language when recipient has no selected locale (mastodon#31747 by @ClearlyClaire)
- Fix frequently-used languages not correctly updating in the web UI (mastodon#31386 by @c960657)
- Fix
POST /api/v1/statuses
silently ignoring invalidmedia_ids
parameter (mastodon#31681 by @c960657) - Fix handling of the
BIND
environment variable in the streaming server (mastodon#31624 by @ThisIsMissEm) - Fix empty
aria-hidden
attribute value in logo resources area (mastodon#30570 by @mjankowski) - Fix “Redirect URI” field not being marked as required in “New application” form (mastodon#30311 by @ThisIsMissEm)
- Fix right-to-left text in preview cards (mastodon#30930 by @ClearlyClaire)
- Fix rack attack
match_type
value typo in logging config (mastodon#30514 by @mjankowski) - Fix various cases of duplicate, missing, or inconsistent borders or scrollbar styles (mastodon#31068, mastodon#31286, mastodon#31268, mastodon#31275, mastodon#31284, mastodon#31305, mastodon#31346, mastodon#31372, mastodon#31373, mastodon#31389, mastodon#31432, mastodon#31391, mastodon#31445, mastodon#32091, mastodon#32147 and mastodon#32137 by @ClearlyClaire, @mjankowski, @valtlai and @vmstan)
- Fix editing description of media uploads with custom thumbnails (mastodon#32221 by @ClearlyClaire)
- Fix race condition in
POST /api/v1/push/subscription
(mastodon#30166 by @ClearlyClaire) - Fix post deletion not being delayed when those are part of an account warning (mastodon#30163 by @ClearlyClaire)
- Fix rendering error on
/start
when not logged in (mastodon#30023 by @timothyjrogers) - Fix unneeded requests to blocked domains when receiving relayed signed activities from them (mastodon#31161 by @ClearlyClaire)
- Fix logo pushing header buttons out of view on certain conditions in mobile layout (mastodon#29787 by @ClearlyClaire)
- Fix notification-related records not being reattributed when merging accounts (mastodon#29694 by @ClearlyClaire)
- Fix results/query in
api/v1/featured_tags/suggestions
(mastodon#29597 by @mjankowski) - Fix distracting and confusing always-showing scrollbar track in boost confirmation modal (mastodon#31524 by @ClearlyClaire)
- Fix being able to upload more than 4 media attachments in some cases (mastodon#29183 by @mashirozx)
- Fix preview card player getting embedded when clicking on the external link button (mastodon#29457 by @ClearlyClaire)
- Fix full date display not respecting the locale 12/24h format (mastodon#29448 by @renchap)
- Fix filters title and keywords overflow (mastodon#29396 by @GeopJr)
- Fix incorrect date format in “Follows and followers” (mastodon#29390 by @JasonPunyon)
- Fix navigation item active highlight for some paths (mastodon#32159 by @mjankowski)
- Fix “Edit media” modal sizing and layout when space-constrained (mastodon#27095 by @ronilaukkarinen)
- Fix modal container bounds (mastodon#29185 by @nico3333fr)
- Fix inefficient HTTP signature parsing using regexps and
StringScanner
(mastodon#29133 by @ClearlyClaire) - Fix moderation report updates through
PUT /api/v1/admin/reports/:id
not being logged in the audit log (mastodon#29044, mastodon#30342, and mastodon#31033 by @mjankowski, @tribela, and @vmstan) - Fix moderation interface allowing to select rule violation when there are no server rules (mastodon#31458 by @ThisIsMissEm)
- Fix redirection from paths with url-encoded
@
to their decoded form (mastodon#31184 by @timothyjrogers) - Fix Trending Tags pending review having an unstable sort order (mastodon#31473 by @ThisIsMissEm)
- Fix the emoji dropdown button always opening the dropdown instead of behaving like a toggle (mastodon#29012 by @jh97uk)
- Fix processing of incoming posts with bearcaps (mastodon#26527 by @kmycode)
- Fix support for IPv6 redis connections in streaming (mastodon#31229 by @ThisIsMissEm)
- Fix search form re-rendering spuriously in web UI (mastodon#28876 by @Gargron)
- Fix
RedownloadMediaWorker
not being called on transient S3 failure (mastodon#28714 by @ClearlyClaire) - Fix ISO code for Canadian French from incorrect
fr-QC
tofr-CA
(mastodon#26015 by @gunchleoc) - Fix
.opus
file uploads being misidentified by Paperclip (mastodon#28580 by @vmstan) - Fix loading local accounts with extraneous domain part in WebUI (mastodon#28559 by @ClearlyClaire)
- Fix destructive actions in dropdowns not using error color in light theme (mastodon#28484 by @logicalmoody)
- Fix call to inefficient
delete_matched
cache method in domain blocks (mastodon#28374 by @ClearlyClaire) - Fix status edits not always being streamed to mentioned users (mastodon#28324 by @ClearlyClaire)
- Fix onboarding step descriptions being truncated on narrow screens (mastodon#28021 by @ClearlyClaire)
- Fix duplicate IDs in relationships and familiar_followers APIs (mastodon#27982 by @KevinBongart)
- Fix modal content not being selectable (mastodon#27813 by @pajowu)
- Fix Web UI not displaying appropriate explanation when a user hides their follows/followers (mastodon#27791 by @ClearlyClaire)
- Fix format-dependent redirects being cached regardless of requested format (mastodon#27632 by @ClearlyClaire)
- Fix confusing screen when visiting a confirmation link for an already-confirmed email (mastodon#27368 by @ClearlyClaire)
- Fix explore page reloading when you navigate back to it in web UI (mastodon#27489 by @Gargron)
- Fix missing redirection from
/home
to/deck/home
in the advanced interface (mastodon#27378 by @Signez) - Fix empty environment variables not using default nil value (mastodon#27400 by @renchap)
- Fix language sorting in settings (mastodon#27158 by @gunchleoc)
Upgrade notes
To get the code for v4.3.0, use git fetch && git checkout v4.3.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.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. PostgreSQL versions 14.0 to 14.3 are not supported as they contain a critical data-corruption bug (see below)
- 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
PostgreSQL 14.0 to 14.3 bug
PostgreSQL versions 14.0 to 14.3 are not supported as they contain a critical data-corruption bug.
If you run one of those versions, please upgrade to the latest PostgreSQL 14 minor version (14.13 at the time of the release) before upgrading Mastodon. Upgrading a PostgreSQL without bumping the major version should only a require a restart of your database after your packages/containers have been updated, not any data migration.
If you are using Docker Compose to run PostgreSQL, please ensure that the image
field does not specify the patch version (for example, it can be 14
, or 14-alpine
, to tell Docker to use the latest image with this tag), then:
- stop the database service:
docker compose down db
- pull the latest version for this tag:
docker compose pull db
- restart the service:
docker compose up -d
If you want to use this opportunity to upgrade to a later PostgreSQL major version, then you will need to migrate your PostgreSQL data directory. You can find more informations about this process in the official documentation.
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. Do not change them once they are set.
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 anymoreghcr.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, 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, 4.3.0-beta.2 or 4.3.0-rc.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 such an issue, try BUNDLE_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 install
in the Mastodon install directory (e.g./home/mastodon/live
) - Install yarn 4 (if you use
corepack
, just docorepack prepare
). See the “Yarn 4 and corepack” section for more information. - Install dependencies with
bundle install
andyarn install --immutable
- 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) - Precompile the assets:
RAILS_ENV=production bundle exec rails assets:precompile
- 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
- 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.
- Run the post-deployment database migrations:
RAILS_ENV=production bundle exec rails db:migrate
- If you use Elasticsearch or OpenSearch, rebuild the account search index with
RAILS_ENV=production bin/tootctl search deploy --only=accounts
When using docker
- 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) - 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
- Make sure your Docker configuration has been updated to take the Docker image split into account (See the “Docker image split” section above)
- 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.
- Run the post-deployment database migrations:
docker-compose run --rm web bundle exec rails db:migrate
- 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, 4.3.0-beta.2 or 4.3.0-rc.1
The following instructions are for updating from 4.3.0-beta.1, 4.3.0-beta.2 or 4.3.0-rc.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 such an issue, try BUNDLE_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 install
in the Mastodon install directory (e.g./home/mastodon/live
) - Install dependencies with
bundle install
andyarn 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=true
environment variable:SKIP_POST_DEPLOYMENT_MIGRATIONS=true RAILS_ENV=production bundle exec rails db:migrate
- 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.
- 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=true
environment variable:docker-compose run --rm -e SKIP_POST_DEPLOYMENT_MIGRATIONS=true web bundle exec rails db:migrate
- 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.
- Run the post-deployment database migrations:
docker-compose run --rm web bundle exec rails db:migrate