
By Erik Peña
A plugin for uploading video and audio files to Mux and managing them within Strapi.
released October 22, 2026
npm install strapi-plugin-mux-video-uploaderA Strapi plugin for managing uploads to Mux.
This plugin provides the ability to upload content via a url or a direct file upload to Mux.
.vtt or .srt files) or Mux's auto-generated captionsFor installing with Strapi v5, install the latest—
npm i strapi-plugin-mux-video-uploader@latest
yarn add strapi-plugin-mux-video-uploader@latestFor installing with Strapi v4, install v2.0.0—
npm i strapi-plugin-mux-video-uploader@2.8.4
yarn add strapi-plugin-mux-video-uploader@2.8.4robots:*). See Mux RobotsIn order for this plugin to communicate with Mux, some configuration values need to be set for the plugin before it can be used.
Starting in v3.0.0 of this plugin, we have switch to Strapi's File Based Config. To increase the portability of clustered deployments, we have switched to this paradigm to manage app configs. This means that setting the configurations using the Settings view in the Strapi Admin UI will no longer be available.
In migrating to v3.0.0, you will need to transition to the Strapi File Based Config and copy the values that you had used to initially set up your plugin—
// Path: ./config/plugins.ts
export default ({env}) => ({
// ...
"mux-video-uploader": {
enabled: true,
config: {
accessTokenId: env('ACCESS_TOKEN_ID'),
secretKey: env('ACCESS_TOKEN_SECRET'),
webhookSigningSecret: env('WEBHOOK_SIGNING_SECRET'),
playbackSigningId: env('SIGNING_KEY_ID'),
playbackSigningSecret: env('SIGNING_KEY_PRIVATE_KEY'),
defaultDirectiveIds: env.array('MUX_DEFAULT_DIRECTIVE_IDS', []),
}
}
// ...
});// Path: ./config/plugins.js
module.exports = ({env}) => ({
// ...
"mux-video-uploader": {
enabled: true,
config: {
accessTokenId: env('ACCESS_TOKEN_ID'),
secretKey: env('ACCESS_TOKEN_SECRET'),
webhookSigningSecret: env('WEBHOOK_SIGNING_SECRET'),
playbackSigningId: env('SIGNING_KEY_ID'),
playbackSigningSecret: env('SIGNING_KEY_PRIVATE_KEY'),
defaultDirectiveIds: env.array('MUX_DEFAULT_DIRECTIVE_IDS', []),
}
}
// ...
});webhookSigningSecret must be set, or every webhook is rejected. See Webhooks.defaultDirectiveIds is optional: the Mux Robots directives to run on every new upload (see Directives on upload). Set MUX_DEFAULT_DIRECTIVE_IDS to a comma-separated list of directive ids, such as drv_abc123,drv_def456. Leave it empty or unset for none: the plugin trims each entry and ignores empty ones.Mux webhooks tell Strapi when a video is ready, and bring Mux Robots results: jobs, directive runs, their outputs, and the new captions or chapters they add to a video.
In the Mux Dashboard, create a webhook whose "URL to notify" is—
{STRAPI_BASE_URL}/mux-video-uploader/webhook-handlerWhere {STRAPI_BASE_URL} is the publicly accessible hostname of your Strapi instance.
Copy that webhook's signing secret into webhookSigningSecret, and restart Strapi.
webhookSigningSecret must be set. The plugin checks every webhook's signature with it. If it's empty or wrong, every webhook is rejected with a 401 and new uploads stay in "Preparing"; if it's empty, Strapi also logs a warning when it starts. Once it's right, resend the rejected events from Mux (for example with mux webhooks events replay) and the videos catch up.
Leave includeUnparsed on. Checking a signature needs the raw request body, so the plugin turns on includeUnparsed for strapi::body in your config/middlewares file. If you set includeUnparsed: false there, the plugin warns when Strapi starts, and rejects webhooks with a 500 and an error in the log. Keeping the raw body costs memory for the length of each JSON or form request; nothing else about request parsing changes.
The Mux CLI can forward webhooks to a local Strapi. It prints a signing secret to use as webhookSigningSecret—
mux webhooks listen --forward-to http://localhost:1337/mux-video-uploader/webhook-handlerMux Robots runs AI workflows on your Mux videos. Each run consumes Mux AI units: see Robots pricing.
robots:*) in the Mux Dashboard, and use it for accessTokenId / secretKey. Existing tokens can't gain new permissions.The Robots tab of a video's details lets you:
Captions, dubs and chapters are added to the Mux video itself. To see chapters in the player, read this FAQ.
description and tags, but only if they're empty. Anything already there stays, and the title never changes on its own.Entries of content types with a relation to Mux Asset show a Mux Robots panel in the Content Manager.
Only top-level relations are found, not ones inside components or dynamic zones. The panel reads the saved entry, so a video you link in the form shows after you save.
defaultDirectiveIds (see the plugin config).robots_outputs. The plugin's content API returns description, tags and robots_outputs, so any role with find or findOne can read them, moderation scores included.Set the plugin's permissions per role in Settings → Administration Panel → Roles → Plugins → Mux Video Uploader. Super Admin has all of them. The plugin's admin API enforces them as well as the admin panel—
Apply summary in the Content Manager follows the Content Manager's own permissions: anyone who can edit the entry can apply a summary to it.
Please note: End Users can only have read operation permissions (find, findOne and count). Write operations are not supported due to potential security reasons.
These endpoints follow Strapi's content API rules: filters, sort, fields and populate can't use private fields or the admin users behind createdBy/updatedBy (the request gets a 400), and find returns at most api.rest.maxLimit items (100 when unset), paginated with start/limit or pagination[page]/pagination[pageSize].
Your videos and captions are kept: Strapi only adds tables, columns and indexes (see Data stored by the plugin), and nothing is deleted or rewritten. There's no migration to run.
Update the package, then rebuild the admin—
npm install strapi-plugin-mux-video-uploader@^3.2.0
npm run buildCheck that webhookSigningSecret matches the signing secret of your webhook in the Mux Dashboard. Webhooks are now verified: with a missing or wrong secret they get a 401 and new uploads stay in "Preparing".
If your app's config/middlewares sets includeUnparsed: false on strapi::body, remove that option. Webhooks fail with 500 without it (see Webhooks).
Start Strapi. It creates the muxrobotjobs table and the new muxassets columns and indexes on its own.
If webhooks were rejected while the secret was wrong, resend them from Mux, for example with mux webhooks events replay.
To use Mux Robots, follow Set up Robots.
To see chapters in the player, make your app use one version of Mux Player (see Chapters don't show in the player).
What behaves differently—
known_track_ids.documentId instead of a sequential id, and gets the right file: before, every caption URL returned the first file stored.For reference: besides Strapi's own columns (id, document_id, created_at, updated_at, published_at, created_by_id, updated_by_id), the plugin keeps three tables.
muxassets: Mux Asset (plugin::mux-video-uploader.mux-asset), one row per video. Indexed on asset_id and upload_id (new in 3.2).
| Column | Type | Holds |
|---|---|---|
title | string | The video's title in Strapi |
upload_id, asset_id, playback_id | string | Mux ids |
signed | boolean | Signed playback |
is_ready | boolean | Mux finished processing the video |
error_message | string | Mux's error for a failed upload or asset |
duration, aspect_ratio | decimal, string | From Mux |
asset_data | json | The Mux asset as last read: tracks, playback ids, renditions |
description | text | New in 3.2. Filled by a summarize job when empty; editable |
tags | json | New in 3.2. A list of strings, filled by a summarize job when empty; editable |
robots_outputs | json | New in 3.2. The newest summarize (job_id, completed_at, title, description, tags) and moderate (job_id, completed_at, exceeds_threshold, max_scores) results |
muxrobotjobs: Mux Robot Job (plugin::mux-video-uploader.mux-robot-job), new in 3.2, hidden from the Content Manager. Indexed on mux_id and asset_id.
| Column | Type | Holds |
|---|---|---|
mux_id | string | rjob_… or drvrun_…; empty until Mux confirms a run started from Strapi |
is_directive_run | boolean | A directive run rather than a job |
workflow | string | The workflow, e.g. summarize (jobs) |
directive_id, directive_run_id | string | The directive and run that started a job, or the run's directive |
status | string | pending, processing, completed, errored, cancelled; runs also partial; requested or unconfirmed while Mux hasn't confirmed a run |
asset_id | string | The Mux asset id, matching a Mux Asset row's asset_id when this Strapi has the video |
parameters, outputs, errors | json | As Mux reported them |
units_consumed | integer | Mux AI units |
run_data | json | A directive run's steps and timestamps |
mux_created_at, mux_updated_at | datetime | Mux's timestamps |
detail_loaded | boolean | Outputs and units are stored |
request_id, requested_at, requested_by | string, datetime, integer | Who started a run from Strapi, and when |
muxtexttracks: Mux Text Track (plugin::mux-video-uploader.mux-text-track), unchanged: custom caption files (name, language_code, closed_captions, file) kept so Mux can download them from /mux-video-uploader/mux-text-tracks/:documentId.
Contributions, issues and feature requests are welcome!
Developers for this plugin should take a look at the README_INTERNAL.md document for details on setting up dev environments.
If you encounter an error or have questions, please feel free to file inquiries on the Issues page for strapi-plugin-mux-video-uploader.
Yes! However, in order to make it work, you'll need a "Webhook Relay" that runs from within your network. You can use a Webhook Relay service like Smee (https://smee.io/) or ngrok (https://ngrok.com/) to forward Webhook events to an instance of Strapi behind a firewall.
This happens when you need to rebuild your Strapi instance. To do this, you need delete the .cache, .strapi, and build folders (while Strapi is off) and restart to rebuild the instance.
Here is an example of how to do this on a unix-based operating system from within the Strapi application root—
rm -rf ./.cache ./build ./.strapiChapters from Generate chapters need Mux Player 3.5 or later, but the admin runs 3.1.0: Strapi's own Media Library (@strapi/upload) ships that version, loads first, and takes the <mux-player> element for the whole admin, plugin included. Make your app install a single version—
Add this to your app's package.json—
// npm
"overrides": { "@mux/mux-player-react": "^3.14.0" }
// yarn
"resolutions": { "@mux/mux-player-react": "^3.14.0" }
// pnpm
"pnpm": { "overrides": { "@mux/mux-player-react": "^3.14.0" } }Reinstall dependencies.
Delete node_modules/.strapi/vite.
Rebuild the admin (npm run build).
The Media Library's preview keeps working with the newer player.
The player loads those thumbnails from a storyboard VTT on image.mux.com. Strapi's default Content Security Policy only allows media from 'self' data: blob:, so the browser blocks it. Add https://image.mux.com to media-src (for the VTT) and img-src (for the images it points to) by replacing the 'strapi::security' entry of your config/middlewares file with this—
// Path: ./config/middlewares.js (in middlewares.ts, use `export default [`)
module.exports = [
'strapi::logger',
'strapi::errors',
{
name: 'strapi::security',
config: {
contentSecurityPolicy: {
useDefaults: true,
directives: {
'connect-src': ["'self'", 'https:'],
'img-src': ["'self'", 'data:', 'blob:', 'https://market-assets.strapi.io', 'https://image.mux.com'],
'media-src': ["'self'", 'data:', 'blob:', 'https://image.mux.com'],
upgradeInsecureRequests: null,
},
},
},
},
// ...the rest of your middlewares, unchanged
];Keep all of Strapi's defaults in the directives you change, as above: Strapi merges your list over its own entry by entry, so leaving them out drops some of them. Then restart Strapi.
When uploading a video with custom text tracks, Mux asks for an URL pointing to these files. This feature currently works only on deployed Strapi installations.
When developing locally with Strapi, we don't have a globally reachable URL. Unlike webhooks with which we can use a local webhook proxy (e.g. Smee.io or ngrok), the plugin currently offers no way to configure a base URL to receive Mux's caption download requests. You'll still be able to upload videos, but the tracks won't be properly parsed by Mux.
Another approach would be to use tunnel service such as Cloudflare ZeroTrust or Tailscale to route requests against a publicly accessible hostname to your local instance. If you go this route, you will need to ensure that you configure Strapi to use the hostname when generating the Mux's caption download requests. Here is an example of how to do that—
// Path: ./config/server.ts
export default ({ env }) => ({
// ... Existing properties set by Strapi
url: env('PUBLIC_URL', 'https://your_host.domain.tld'),
});// Path: ./config/server.js
module.exports = ({ env }) => ({
// ... Existing properties set by Strapi
url: env('PUBLIC_URL', 'https://your_host.domain.tld'),
});Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
