Skip to main content

Announcement: Change of the CDN of 2023-07-13


Public service announcement
Change of the CDN of
Media from possibly not showing on remote instance(s)
Duration n/a

Call for action

Internal reference


We have been made aware of an issue associated with the recent migration of the Mastodon instance

The Mastodon instance has been migrated from the former hosting provider to the private infrastructure of the

All media files were formerly hosted by's CDN located at , and those remote media URLs are now no longer valid.

This means that every Fediverse instance that has formerly federated with now most likely has broken links for all remote media URLs related to posts and media from in their database. This results in previously cached media from not loading or not showing correctly when accessed by local users.

Sadly there is nothing we, the, can do about this, since we would need to implement a redirect to the new URL, which of course they won't be doing. Therefore, every instance owner must take action and fix the broken links on their instance by themselves. Please read on to learn how to do so.

Please excuse the inconvenience!


Since the Fediverse consists of a multitude of applications, we sadly can't provide an exact solution for each application. We currently have only received reports from Mastodon instances, so we have concentrated on providing a fix for Mastodon. If you happen to run a different service that is affected by this issue please get in contact with and we'll try to work with you and help mitigate the issue.

To identify if your instance is affected by the issue, please log into the PostgreSQL database of your instance and run the following query:

-- first connect to your mastodon schema, e.g.:
-- \CONNECT mastodon_production;

FROM   media_attachments
WHERE  remote_url LIKE '';

Query yields 0 results - you're good, you have no broken links on your instance. Thanks for checking!

Query yields 1 or more results - your instance is affected, please proceed to "Resolution" to fix the issue.


Resolving the issue is a two-step process: first the broken links need to be fixed in the database, and afterwards the media cache must be refreshed.

Updating outed URLs in the database schema

Please log into the PostgreSQL database of your instance and run the following query to update all outdated links:

-- first connect to your mastodon schema, e.g.:
-- \CONNECT mastodon_production;

UPDATE media_attachments
SET    remote_url = REGEXP_REPLACE(remote_url,
WHERE  remote_url LIKE '';

Refreshing cached media

To refresh the cached media run the following tootctl command via the Mastodon admin CLI:

# change to the Mastodon installation directory first, e.g.:
# "/opt/mastodon" or "/home/mastodon/live"

RAILS_ENV=production ./bin/tootctl media refresh

This should resolve the issue.

Thanks for your consideration and support!

The Fediverse Foundation