jellymove
Move movies and TV series between two Jellyfin servers, with their subtitles, artwork, NFOs, extras and everyone's watch history.
Built for a two-tier setup: a cloud server with fast but limited storage and a home server with slow but large storage, presented as one library by Jellyswarrm. Pick a film or series in the web UI and send it to the other side. jellymove copies it, checks it, gets the other Jellyfin to index it, carries the watch state across, and only then removes it from the source.
Status: early (v0.1). The whole move flow works end to end against a test double of Jellyfin. It has not yet been run against a real Jellyfin server. Try a dry run first, keep backups, and read "Not yet verified" below.
How a move works
One agent runs next to each Jellyfin and sees the same media folders. The destination pulls:
- Plan. The source checks that the item has its own folder, hashes every file (BLAKE3) and records each user's played state, resume points and favourites. The destination picks a library and refuses if the folder already exists. Dry runs stop here.
- Copy. Files stream into a hidden
.jellymove-partial/folder inside the destination library. Dropped connections resume from where they stopped, and each file is hash-checked. - Promote. Verified files are renamed into place, an atomic operation on the same filesystem.
- Index. The destination asks Jellyfin to scan that folder, then waits until the item and every episode appear.
- Restore watch history. Jellyfin gives moved files new item IDs, so jellymove re-applies each user's data to the new items, matching users by name.
- Clean up. The source moves its folder to
.jellymove-trash/in the same library and rescans. It is not deleted.
A crash or restart at any point resumes from the last completed step.
Quick look (no Jellyfin needed)
npm --prefix ui ci && npm --prefix ui run build
cargo run -p jm-server --example demo
# open http://127.0.0.1:8097 (cloud) and http://127.0.0.1:8098 (home)
Running it for real
Install one agent per server. Mount media at the same paths as the Jellyfin container, so the paths Jellyfin reports are the paths jellymove sees.
With Docker, copy deploy/docker-compose.yml,
fill in the environment: section, fix the volumes and user:, then:
mkdir jellymove-data && sudo chown 1000:1000 jellymove-data # same IDs as user:
docker compose run --rm jellymove check-config # prints the settings, secrets hidden
docker compose up -d
Every setting in config.example.toml can be set as
JELLYMOVE_<KEY>, with __ between a section and its key
([peer] token → JELLYMOVE_PEER__TOKEN). There's no config file in this
setup, so the "config file not found; using environment only" warning at
start-up is expected. If you'd rather use a file, mount it at
/config/jellymove.toml. Environment variables still override it.
Each release publishes an image (x86_64) to the Gitea container registry:
git.malgra.com/ixianpixel/jellymove:<version>, and :latest for anything
that isn't a pre-release. It's the same static binary as the systemd tarball,
on Alpine. If the package isn't public, log in once with a Gitea token that
only has read:package:
docker login git.malgra.com
To upgrade, run docker compose pull && docker compose up -d.
- Create an admin API key in Jellyfin (Dashboard → API Keys). jellymove reads every user's watch state.
- Use the same
peer.tokenon both agents (openssl rand -hex 32). - The agents talk over HTTP, and each must be able to reach the other: the destination pulls, so a move to the cloud needs the cloud agent to reach home. Put them on Tailscale/WireGuard (simplest), or behind your reverse proxy with TLS. An outbound-only mode for a home server behind NAT is on the roadmap.
- Run the container as the same user as Jellyfin (
user: "1000:1000") so moved files keep the right ownership. - Set a UI password (
[ui], orJELLYMOVE_UI__USERNAME/__PASSWORD) unless the port is only reachable privately. - The Status tab checks that every library folder is visible and writable.
Without Docker (systemd)
Each release has a static Linux binary (x86_64, musl, web UI built in), so it runs on any distro with no other dependencies:
tar -xzf jellymove-v0.1.0-x86_64-unknown-linux-musl.tar.gz
cd jellymove-v0.1.0-x86_64-unknown-linux-musl
sudo install -m 755 jellymove /usr/local/bin/jellymove
sudo install -D -m 640 -g jellyfin config.example.toml /etc/jellymove/jellymove.toml
sudo cp jellymove.service /etc/systemd/system/
sudo systemctl daemon-reload && sudo systemctl enable --now jellymove
Before starting it, edit /etc/jellymove/jellymove.toml and set
data_dir = "/var/lib/jellymove" (the unit's StateDirectory). If Jellyfin
runs as a different user, change User=/Group= in the unit and -g above.
To upgrade, replace /usr/local/bin/jellymove and run sudo systemctl restart jellymove.
Interrupted transfers resume after a restart.
Making a release
.github/workflows/release.yml runs on Gitea Actions. To cut a release:
- Bump
versionin the rootCargo.toml. - Add a
## v0.1.1section to the top ofCHANGELOG.md, using whichever of### Added,### Updated,### Fixedand### Removedapply. - Commit, then push a matching tag:
git tag v0.1.1 && git push origin v0.1.1
The workflow runs the tests, builds the UI and binary, attaches the tarball
and its .sha256 to a Gitea release for that tag, then pushes the Docker
image. It builds the image with crane, so the runner needs no Docker
socket. Gitea won't let the workflow's own token push packages, so the repo
needs two Actions secrets: REGISTRY_USER (your Gitea username) and
REGISTRY_TOKEN (a personal access token with only package read and write).
The workflow stops straight away if either is missing. The release notes
are that version's section of CHANGELOG.md; the workflow stops straight
away if there isn't one. Re-running it replaces the files and refreshes the
notes. Tags with a - (v0.2.0-rc1) are marked pre-release.
Library mapping
By default an item goes into the library with the same name on the other server. To file things elsewhere, configure this on the receiving agent:
[incoming_libraries]
"Movies" = "Movies (archive)"
Jellyswarrm
While a move is running the item exists on both servers, and Jellyswarrm v0.3.1+ shows it once with two versions. Jellyswarrm's merge cache can go stale when files move (#216). Until that is fixed upstream, restart Jellyswarrm after a move if the merged view looks wrong. A post-move hook can do it for you:
[hooks]
post_move = "docker restart jellyswarrm"
The hook runs with sh -c on the receiving agent, so it only helps if
Jellyswarrm runs on that machine. The Docker image has a shell but no Docker
CLI, and mounting /var/run/docker.sock gives the container root on the
host. Prefer a socket proxy that only allows restarts, or restart by hand.
Safety rules
- Nothing leaves the source until the destination has indexed every file.
- The source copy goes to
.jellymove-trash/. Empty it yourself once you're happy (automatic retention is on the roadmap). - Nothing at the destination is ever overwritten.
- A movie must be in its own folder. jellymove refuses flat folders like
Movies/Heat.mkv+Movies/Ronin.mkv, because moving "the folder" would take both. - Peers can only fetch files the source has explicitly exported, by index.
Not yet verified
- Against real Jellyfin, in particular user-data writes
(
POST /UserItems/{id}/UserData),/Library/Media/Updatedtiming on large libraries, and multi-version movies. - Against real Jellyswarrm.
- Running the published Docker image, and building from the
Dockerfile. The image's contents and config are checked, but it hasn't been started yet. - Windows and macOS. The code is cross-platform, but only Linux has been run.
Roadmap
- Season-level moves; "promote" (pre-warm) shortcuts
- Trash retention and a trash view in the UI
- Pairing codes and pinned TLS instead of a shared token
- Outbound-only control channel so a NATed home agent needs no inbound port
- Automatic tiering rules ("demote anything unwatched for 90 days when the cloud disk is over 80%")
- Sonarr/Radarr root-folder updates so the *arrs follow the move
- iroh transport (built-in NAT traversal); scheduled bandwidth windows
jellymove service install(systemd/launchd/Windows service)
Development
See CLAUDE.md for layout, commands and invariants, and docs/ARCHITECTURE.md for the design.