Guide Getting started

Updating Flexarr

How to update the Flexarr server in Docker or on a Mac, what happens to your data when you do, and how to keep the apps up to date.

6 min read

Updating Flexarr replaces the program and leaves your data alone. Your settings, profiles, watch history and libraries live in the data folder (/config in Docker, ~/.flexarr/data on a Mac), which an update never overwrites.

Before you update

Read what's changed. Every release is listed, newest first, in:

Settings › Updates shows the version you're running now and the newest release, with what's changed in it.

Settings › Updates

Flexarr asks GitHub once a day whether there's a newer release, and Settings shows a dot beside Updates when there is. To look straight away, choose Check for updates. The check sends nothing about your server but its version.

What happens next depends on how you installed Flexarr:

  • On a Mac (installed with the install script), choose Update now. Flexarr downloads the new version, checks it against the checksum published with the release, brings the .NET runtime up to date if it needs to, and restarts to install it, which takes a minute or two. If anything is playing, being watched live or recording, it asks first, because the restart interrupts it.
  • In Docker, a container can't replace itself, so the page shows the commands to update it (see Docker below).
  • Anything else, such as running from source, is updated the way you installed it.

Automatic updates on a Mac

Turn on Install updates automatically to have a Mac install update itself. It's off unless you turn it on. Flexarr installs a new release between 4 and 5 in the morning, after the nightly backup, and only when nothing is playing, being watched live or recording. A busy night waits for the next. A release that failed to install isn't tried again by itself; you can still install it with Update now.

If an update doesn't start

Before swapping in the new version, Flexarr copies the database aside. If the new version doesn't answer within five minutes, the version you had is put back, with the database as it was, and Settings › Updates says what happened. The update's own log is ~/.flexarr/logs/update.log, and the version that didn't start is kept in ~/.flexarr/app.failed so you can report what went wrong.

The version before the last successful update is kept in ~/.flexarr/app.previous.

Each update also brings the .NET runtime Flexarr runs on (in ~/.dotnet) up to its latest patch, as the install script does, so your server gets Microsoft's security fixes. The download is checked against the checksum Microsoft publishes. If it can't be fetched, the update carries on with the runtime you have, unless the new version needs a newer one.

You don't need to make a backup by hand: Flexarr makes one itself whenever an update is about to change the database (see below). If you'd like an extra copy anyway, choose Back up now in Settings › Backup & restore.

Docker

Flexarr's image is ghcr.io/danleach-glitch/flexarr. Updating means downloading the newer image and making a new container from it, with the same settings and folders as before.

With Docker Compose

In the folder with your docker-compose.yml:

docker compose pull flexarr
docker compose up -d flexarr

Compose replaces the container only if the image has changed.

With docker run

Download the new image, remove the old container, and start a new one with the same command you used to install:

docker pull ghcr.io/danleach-glitch/flexarr:latest
docker stop flexarr
docker rm flexarr
docker run -d --name flexarr --restart unless-stopped \
  -e PUID=1000 -e PGID=1000 \
  -p 8383:8383 \
  -v ~/flexarr/config:/config \
  -v /path/to/media:/data/media \
  ghcr.io/danleach-glitch/flexarr:latest

Removing the container doesn't touch your data, as long as /config is a folder or volume you mounted. Use exactly the same options as before: the same -v paths, PUID and PGID, and --network host in place of -p 8383:8383 if you used it.

Note On a Synology or Unraid server, use the platform's own way to update a container. See Install on a Synology NAS or Install on Unraid.

Which tag to use

Images are published for every release with these tags:

Tag What it follows
latest The newest release. Every update you pull may be a bigger step.
0.57 The newest 0.57.x release: fixes, without moving to 0.58.
0.57.0 Exactly that release, never anything else.

To have containers updated automatically, a tool such as Watchtower can pull new images and recreate them.

Use latest to always get the newest Flexarr, or pin a version like 0.57 and change the number when you're ready to move on. Change the tag in your docker-compose.yml (image: ghcr.io/danleach-glitch/flexarr:0.57) or in your docker run command.

Images are built for 64-bit Intel/AMD and 64-bit ARM, and Docker picks the right one for your machine.

On a Mac

If you installed Flexarr natively on a Mac with the deploy script (see Install on a Mac), the easiest way is Update now in Settings › Updates. You can also update by checking out the newest release and running the same command again from the machine you deployed from:

cd flexarr
git fetch --tags
git checkout "$(git tag --list 'v*' --sort=-v:refname | head -1)"
make deploy DEPLOY_HOST=<your-mac>

The script builds the new version, replaces the program in ~/.flexarr/app, brings the .NET runtime up to its latest patch, and restarts the server. It waits for the server to come back before saying it's done, and shows the end of the log if it doesn't. Your settings in ~/.flexarr/data are never touched.

What happens to your data

When a new version starts for the first time, it updates the database to its new layout if it needs to. Before it does, it makes a pre-upgrade backup in your backups folder. The last three pre-upgrade backups are kept, alongside the nightly ones.

You'll find them in Settings › Backup & restore. If an update goes wrong, install the version you had before, then restore its pre-upgrade backup from that page. See Backups.

Important Don't try to run an older Flexarr on a database a newer one has already updated. Go back to the older version and restore the pre-upgrade backup instead. A backup made by a newer Flexarr is refused by an older one.

Note If your backups folder is on a drive that isn't connected when you update, the pre-upgrade backup can't be made. Flexarr carries on starting rather than staying down, and says so in its log.

Keeping the apps up to date

  • iPhone and iPad: the App Store updates Flexarr like any other app. To update by hand, open the App Store, tap your picture, and pull down to refresh the list of updates.
  • Apple TV: the App Store updates Flexarr by itself, as long as Settings › Apps › Automatically Update Apps is on. If you installed it from Xcode, check out the latest release and run make apple-install again. See Install the Apple TV app with Xcode.
  • Web: the web app comes with the server, so it's up to date as soon as the server is. Reload any open tabs.

It's best to keep the server and the apps roughly in step. When a release adds something to both, the app's side of it only works once the server has it too.

The apps work with servers from 0.50.0 on. If an app says Update your Flexarr server, the server is older than that: update it as above. Until you do, the app won't connect to it for the first time, and one that's connected already may not work properly.

Edit this page on GitHub Report something wrong or missing