Skip to main content
Jellyfin’s plugin system allows you to extend the server with custom functionality, metadata providers, and integrations.

Plugin Architecture

Jellyfin plugins are .NET assemblies that implement the plugin interface and can:
  • Add metadata providers (movies, TV shows, music)
  • Implement custom authentication providers
  • Add new API endpoints
  • React to server events
  • Provide custom configuration pages
  • Extend media scanning and organization

Plugin Structure

Plugins are located in the plugins/ directory within the Jellyfin data folder and follow this structure:

Creating a Plugin

1

Create a New .NET Project

Create a new class library targeting .NET 9.0:
2

Add Jellyfin Dependencies

Add references to Jellyfin packages:
MyPlugin.csproj
Check the Jellyfin NuGet feed for the latest package versions.
3

Implement the Plugin Class

Create your main plugin class by inheriting from BasePlugin:
Plugin.cs
Generate a unique GUID for your plugin. Never reuse GUIDs from other plugins.
4

Create Plugin Configuration

Define your plugin’s configuration class:
PluginConfiguration.cs
5

Build Your Plugin

Plugin Interface Reference

All plugins must implement the IPlugin interface defined in MediaBrowser.Common/Plugins/IPlugin.cs:
IPlugin Interface

BasePlugin Class

The BasePlugin<TConfigurationType> class (from MediaBrowser.Common/Plugins/BasePlugin.cs) provides:
  • Configuration Management: Automatic XML serialization/deserialization
  • Data Folder Access: Isolated storage for plugin data
  • Lifecycle Hooks: OnUninstalling() method
  • Plugin Info: Automatic PluginInfo generation
Inherit from BasePlugin<TConfigurationType> rather than implementing IPlugin directly.

Example: TMDb Metadata Plugin

Here’s how the built-in TMDb plugin is structured (see MediaBrowser.Providers/Plugins/Tmdb/Plugin.cs):
TMDb Plugin Example

Adding Configuration Pages

Implement IHasWebPages to provide a web-based configuration UI:
1

Implement IHasWebPages

2

Create Configuration HTML

Add an HTML file as an embedded resource:
Configuration/config.html
3

Embed the Resource

Update your .csproj file:

Plugin API Management

The Plugin API is managed through the PluginsController (see Jellyfin.Api/Controllers/PluginsController.cs):

Available Endpoints

Returns all installed plugins sorted by name.

Advanced Plugin Features

Implementing Metadata Providers

Create custom metadata providers for movies, TV shows, or music:

Reacting to Server Events

Subscribe to server events using dependency injection:

Adding Scheduled Tasks

Installing Your Plugin

  1. Build your plugin in Release mode:
  2. Copy the DLL to the plugins folder:
  3. Restart Jellyfin Server

Debugging Plugins

1

Build with Debug Symbols

2

Attach Debugger

In Visual Studio or VS Code, attach to the running Jellyfin process.VS Code launch.json:
3

Set Breakpoints

Set breakpoints in your plugin code and trigger the functionality.
Enable verbose logging in Jellyfin to see plugin initialization messages and errors.

Plugin Best Practices

Handle Errors Gracefully

Always catch and log exceptions. Don’t crash the server with unhandled exceptions.

Use Dependency Injection

Request dependencies through constructor injection rather than creating instances directly.

Implement IDisposable

Clean up resources (event handlers, file handles, connections) when your plugin is unloaded.

Version Your Plugin

Use semantic versioning and test compatibility with different Jellyfin versions.

Document Configuration

Provide clear descriptions for all configuration options in your UI.

Respect Cancellation Tokens

Honor CancellationToken parameters to allow graceful task cancellation.

Plugin Examples

Study these built-in plugins in the Jellyfin source:
  • TMDb Plugin: MediaBrowser.Providers/Plugins/Tmdb/ - Metadata provider
  • MusicBrainz Plugin: MediaBrowser.Providers/Plugins/MusicBrainz/ - Music metadata
  • Studio Images Plugin: MediaBrowser.Providers/Plugins/StudioImages/ - Image provider
  • AudioDB Plugin: MediaBrowser.Providers/Plugins/AudioDb/ - Audio metadata

Testing Your Plugin

Create unit tests for your plugin:

Next Steps

API Overview

Learn about the Jellyfin API your plugin can use

Contributing Guide

Submit your plugin to the official repository

Building from Source

Set up a development environment

Plugin Repository

Browse existing plugins and submission guidelines