Self-Update for medialab Server — guide

Before you start

Self-Update updates medialab Server installed from the medialab-server and medialab-server-web packages (Debian or Ubuntu). Those packages bring the updater the plugin talks to: the script /usr/lib/medialab-server/update.sh, the systemd units medialab-update.path and medialab-update.service, and the folder /var/lib/medialab-update. On official Jellyfin, or on medialab Server installed from an archive or built locally, the plugin page only explains how to install from the packages; nothing can be updated from it until then. To install medialab Server, see Install medialab Server with apt or in a container.

In a container, update by pulling the new image tag (12.2-ml.N) and recreating the container; Self-Update by MediaLab shows the available versions but doesn't install packages in a container.

You also need a MediaLab Works account with a license that covers the plugin (an active subscription, a lifetime license within its update window, the Jellyfin bundle or the free 30-day trial) for updating and rolling back. Checking the versions works without a license.

Installation

From your plugin repository (recommended). Jellyfin then installs and updates the plugin by itself.

  1. In your MediaLab Works account open Licenses → Jellyfin plugin repository and click Create address. Copy it: it is private (it contains a token), so do not share it; you can regenerate or revoke it at any time.
  2. In Jellyfin open Dashboard → Plugins → Repositories, click +, give it a name (for example MediaLab Works), paste the address and save.
  3. In Dashboard → Plugins → Catalog find Self-Update by MediaLab, click Install, then restart the server.

From the public catalog. https://medialab.works/jellyfin/manifest.json lists every released MediaLab Works plugin with its public build; medialab Server adds it by itself. You can add it the same way to install a plugin before you have a key: the plugin then asks for the license, or starts the trial, on its License page. With a lifetime license whose update window has ended, keep to your private repository, which offers only the versions your license allows.

Manually, from a zip file.

  1. In Account → Licenses download jf-selfupdate_x.y.z.zip (the SHA-256 of the file is shown next to the button).
  2. Extract it into a new folder Self-Update by MediaLab_x.y.z.0 inside the plugins folder, /var/lib/jellyfin/plugins/ on a package install.
  3. Restart the server.

License activation

  1. Open Dashboard → Plugins → Self-Update by MediaLab and click License (the Server update page has a License button too).
  2. Paste your license key and click Activate with key. The plugin contacts the license server, binds the key to this server and shows the license as Active.
  3. No key yet? On the same page enter your e-mail and start the 30-day trial (card needed, nothing to pay today) or buy a license; the plugin activates itself when the payment is done.

The license is checked once a day and at every server start, and again before an update, a rollback or an automatic update, unless it was checked shortly before. Without internet the license stays valid for 7 days after the last successful check. Without a valid license, checking the versions still works, but updating, rolling back and the automatic update are refused with the reason; nothing is deleted. Move license (release this server) on the License page frees the key for another server.

Using it

Open Server update in the Jellyfin dashboard menu (administrators only).

  1. Installed version: the medialab revision, the installed package (for example 12.2+ml4+deb12), the Jellyfin version and the newest version found at the last check.
  2. Check now asks the updater to read the medialab repository. The list Available versions then shows every version, marked installed, newer or older.
  3. Update to x installs the newest version; Install next to a version installs that one. Roll back to the previous version goes to the version just below the installed one; Roll back next to an older version goes to that one. From medialab Server 12.2-ml.7 on, rolling back below 12.2-ml.7 is refused on purpose: older versions have the less secure updater.
  4. Every action asks for a confirmation first and reminds you that:
    • the server restarts, so playback in progress stops, and the page comes back by itself in 1–3 minutes;
    • the database and configuration are backed up first;
    • if the server does not start correctly, it returns to the current version by itself.
  5. Current operation follows the request: sent, running, The server is restarting…, then the page reloads when the server answers again. Last result shows how it ended: succeeded; failed, rolled back automatically (with the version the server returned to); refused (with the reason, for example a version that is not in the repository).

While an update is running, or while a request waits to be picked up, a new request is refused.

Automatic update

In Automatic update:

  • Install new versions automatically is off by default.
  • Update hour (server time): the hour at which a new version may be installed (04:00 unless you change it). Click Save.

The scheduled task Check for medialab Server updates (category medialab, every day at 03:00) only checks the repository. With the automatic update on and a valid license, when the last check found a version newer than the installed one, it is installed at the chosen hour, at most once a day, with the same backup and automatic rollback as a manual update. You can change the time of the check in Dashboard → Scheduled Tasks.

Updates and rollback of the plugin itself

  • From the repository: Jellyfin shows new versions of the plugin in Dashboard → Plugins and can update it automatically; restart the server to load the new version.
  • From the plugin's License page: with a valid license, Install update installs the newest version your license allows and Roll back to x.y.z goes back to the previous version of the plugin. Restart the server after either.
  • Lifetime license and automatic updates. The public Jellyfin catalog (https://medialab.works/jellyfin/manifest.json) always offers the newest version. When the update window of a lifetime license has ended, versions released after it are not licensed: if Jellyfin's automatic plugin updates install one, the plugin stops with "version not licensed" until you go back with Roll back to x.y.z on its License page or buy an update pass. To avoid it, don't let Jellyfin update this plugin automatically: add your private plugin repository, which offers only the versions your license allows, instead of the public catalog, or remove the triggers of the scheduled task Update Plugins in Dashboard → Scheduled Tasks (this stops automatic updates for every plugin).

Source code

The GPL-3.0 source code of each version is in Account → Licenses (Source code), next to the download, as a .tar.gz archive made from the exact commit of that version.

Troubleshooting

  • "This server runs official Jellyfin": the plugin works only on medialab Server; the page shows the commands to switch, which keep your data, users, libraries and plugins.
  • "medialab Server without the updater": medialab Server was installed from an archive or built locally, or the updater is incomplete. The page says what is missing: /usr/lib/medialab-server/update.sh, or the folder /var/lib/medialab-update (missing or not writable by the Jellyfin service). Install the medialab-server and medialab-server-web packages.
  • "The request has not been picked up for more than 2 minutes": the updater service is not watching for requests. On the server run systemctl status medialab-update.path.
  • "No result after 40 minutes": look at the updater log with journalctl -u medialab-update.
  • "The medialab apt repository is missing": the file /etc/apt/sources.list.d/medialab.sources is not on the server; reinstall the medialab repository package.
  • "Not enough disk space": free at least 1 GB in /usr/lib and try again.
  • "Updating to x failed; the server automatically returned to y": the new version did not start correctly and the server is back on the previous one, with the backup restored. Send us the plugin log (License page → Log).
  • "Updating to x failed and the server does not answer after returning to y": the message shows where the backup is. Check the server with journalctl -u jellyfin and journalctl -u medialab-update, and contact us.
  • Updating or rolling back is refused with a license message: activate the license on the License page; checking the versions works without it.

The build is public; using the plugin requires a license or the free 30-day trial.