Skip to content

Strapi Plugin IOReal-time Strapi 5, permission-aware

Socket.IO events for your content, delivered only to the roles and API tokens that may read it. With admin settings, monitoring and live presence built from the Strapi Design System.

Quick start ​

bash
npm install @strapi-community/plugin-io
js
// config/plugins.js
module.exports = {
  io: { enabled: true, config: { contentTypes: ['api::article.article'] } },
};

Give the Public role find on Article, then:

js
import { io } from 'socket.io-client';

const socket = io('http://localhost:1337');
socket.on('article:publish', ({ data }) => console.log('Published:', data.attributes.title));

Full getting started guide →

Built like a native Strapi screen ​

Settings and Monitoring live under Settings > Socket.IO and follow the layout of Strapi's own settings pages: Save in the header, an unsaved-changes guard, inline validation, confirmation dialogs and RBAC-aware actions, in light and dark mode and five languages.

Settings > Socket.IO > Settings

Monitoring in dark mode

Monitoring at 390 px width

The homepage gets two widgets through Strapi's Widget API, and the Content Manager edit view shows who else is editing.

Socket.IO homepage widget

Live presence panel in the edit view

Screenshots come from a local test host with synthetic data.

Who receives what ​

ClientJoinsReceives
No tokenio-role-publicTypes the Public role may find (unless authentication is required)
Users & Permissions JWTio-role-<role type>Types the user's role may find
Content API tokenio-token-<id>Read-only and full-access: all watched types; custom: types it may find
Admin (presence panel)io-admin-<id>Presence only, never content events

Security and performance ​

  • Admin routes need an authenticated admin plus the plugin permission. Monitoring responses contain counts and display names only.
  • Content events are sanitized per audience; rooms without listeners are skipped before sanitizing.
  • Socket re-checks run in one batch per kind (one query for all users, tokens or admins), triggered right away when a user, token, admin or Strapi session changes.
  • Strapi's Data Transfer WebSocket (strapi transfer) keeps working next to Socket.IO (#112).

Requirements ​

  • Strapi 5.38 or later (tested with 5.62)
  • Node.js 22.21+ or 24.9+ (up to 26)
  • Socket.IO 4.8 clients (socket.io-client)

Community ​


Made with ❤️ by @ComfortablyCoding and @hrdunn. Updated and made better by @Schero94.

Released under the MIT License. Updated and made better by @Schero94 · llms.txt