My Media Build logoMy Media Build

Tracearr with Docker Compose: Plex, Jellyfin and Emby Stats

Set up Tracearr with Docker Compose: watch history and stats for Plex, Jellyfin and Emby, with your Tautulli history brought across.

Time
About 15 minutes
Reading
8 min
Updated
2 December 2026
By
spikey1965
Tested with
Tracearr 3.2.1
Tracearr with Docker Compose: Plex, Jellyfin and Emby Stats

For educational purposes only. This guide shows how to install self-hosted software on your own hardware. I don't condone piracy: only use these apps with media you own or have the right to use, and follow the law where you live. Back up your data first. Full disclaimer

To run Tracearr in Docker, save the compose file below (Tracearr plus its TimescaleDB and Redis databases), make the two secrets with openssl, run docker compose up -d, then open http://YOUR-SERVER-IP:3000 to make your login and connect Plex, Jellyfin or Emby. It takes about 15 minutes.

Tracearr keeps a record of everything played on your media server: who watched what, when, on which device, and whether it played directly or had to be converted on the fly. It works with Plex, Jellyfin and Emby, so if you’ve outgrown Tautulli (which is Plex only), or you run more than one server, this is the one to look at.

This guide sets up Tracearr with Docker Compose in five short steps, connects it to your media server, and brings across your whole history from Tautulli.

Tracearr or Tautulli? Both keep your watch history and stats. Tautulli is older and Plex only. Tracearr follows Plex, Jellyfin and Emby in one place, spots one account being shared around, and can import your Tautulli history, so you don’t lose anything if you switch. You can also run both side by side while you decide.

Tracearr in Docker: quick answer

Before you start A computer or NAS running Docker, a Plex, Jellyfin or Emby server, and about 2 GB of memory to spare. Tautulli is optional, to bring in your old history.
Docker image ghcr.io/connorgallopo/tracearr:3.2.1 (plus timescale/timescaledb-ha:pg18.4-ts2.29.1, redis:8.4-alpine)
Web address http://YOUR-SERVER-IP:3000
Ports 3000:3000
Key settings NODE_ENV, HOST, TZ, DATABASE_URL, REDIS_URL, JWT_SECRET, COOKIE_SECRET
Folders /data/backup, /data/tracearr/image-cache
Time About 15 minutes
Tested with Tracearr 3.2.1

What do you need to run Tracearr in Docker?

  • A computer or NAS running Docker. New to Docker? My Docker install guide covers Windows, Mac and Linux.
  • A Plex, Jellyfin or Emby server. Mine is Plex, running on Plex with Docker Compose.
  • About 2 GB of memory to spare (mine uses around 550 MB when it’s quiet) and 4 GB of disk for the three containers.
  • Optional: Tautulli, if you want to bring your old history across.

Tracearr is three containers that work together: the app itself, a database (PostgreSQL with TimescaleDB, which is good at “what happened when” data) and Redis, a small fast cache. The compose file below starts all three.

1Make your compose file

Make a new folder, for example ~/tracearr, and save this as compose.yaml inside it. It’s Tracearr’s own recommended setup, with the version numbers pinned so nothing updates by surprise.

services:
  tracearr:
    image: ghcr.io/connorgallopo/tracearr:3.2.1
    container_name: tracearr
    ports:
      - "3000:3000"
    environment:
      - NODE_ENV=production
      - HOST=0.0.0.0
      - TZ=Europe/London
      - DATABASE_URL=postgres://tracearr:${DB_PASSWORD}@timescale:5432/tracearr
      - REDIS_URL=redis://redis:6379
      - JWT_SECRET=${JWT_SECRET}
      - COOKIE_SECRET=${COOKIE_SECRET}
    depends_on:
      timescale:
        condition: service_healthy
      redis:
        condition: service_healthy
    volumes:
      - tracearr_backups:/data/backup
      - tracearr_images:/data/tracearr/image-cache
    restart: unless-stopped

  timescale:
    image: timescale/timescaledb-ha:pg18.4-ts2.29.1
    container_name: tracearr-db
    shm_size: 512mb
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    command: postgres -c timescaledb.license=timescale -c timescaledb.max_tuples_decompressed_per_dml_transaction=100000 -c max_locks_per_transaction=4096 -c timescaledb.telemetry_level=off -c max_connections=150
    environment:
      - POSTGRES_USER=tracearr
      - POSTGRES_PASSWORD=${DB_PASSWORD}
      - POSTGRES_DB=tracearr
    volumes:
      - timescale_data:/home/postgres/pgdata/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U tracearr"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: unless-stopped

  redis:
    image: redis:8.4-alpine
    container_name: tracearr-redis
    command: redis-server --appendonly yes
    volumes:
      - redis_data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 5s
      retries: 5
    restart: unless-stopped

volumes:
  tracearr_backups:
  tracearr_images:
  timescale_data:
  redis_data:

Change TZ to your own time zone. If something else on your server already uses port 3000, change the first number, for example "3010:3000".

On TrueNAS, or want the data in your own folder? The file above keeps the data in Docker volumes, which just works. I wanted mine in my usual app folder so it’s in my snapshots, so I used folders instead. If you do the same, the database runs as user 1000 and Tracearr as user 1001, so give them their folders first, or they can’t write to them:
sudo mkdir -p /mnt/tank/configs/tracearr/{db,redis,backup,images}
sudo chown 1000 /mnt/tank/configs/tracearr/db
sudo chown 1001 /mnt/tank/configs/tracearr/backup /mnt/tank/configs/tracearr/images

Then swap the volume names for the folders, for example /mnt/tank/configs/tracearr/db:/home/postgres/pgdata/data.

2Make the secrets and start it

Tracearr needs three random secrets: two for signing people in, and the database password. In the same folder, run these to make a .env file with them:

cd ~/tracearr
echo "JWT_SECRET=$(openssl rand -hex 32)" > .env
echo "COOKIE_SECRET=$(openssl rand -hex 32)" >> .env
echo "DB_PASSWORD=$(openssl rand -hex 16)" >> .env
docker compose up -d

The first start downloads the three images (about 3.5 GB once unpacked), so give it a few minutes. When it’s done, all three should say healthy:

docker compose ps

Keep the .env file safe and don’t change it later: the database password is set the first time it starts.

3Open Tracearr and make your login

Open http://YOUR-SERVER-IP:3000 in a browser. The first time, Tracearr asks which media server you use (Plex, Jellyfin, Emby or tofa), then asks you to make the owner account. You can Continue with Plex, or fill in a display name, username, email and password.

I’d make a username and password even if you use Plex: then you can always get in, even if Plex’s sign-in is having a bad day. Use a strong password and keep it in your password manager, because this login can see everyone’s viewing history.

Tracearr first-run screen: create the owner account with Plex or a username and password

4Connect your media server

  • Plex: press Link Plex Account and allow Tracearr in the Plex window that opens (if you made the owner account with Plex, this part is already done). Tracearr lists your Plex servers. Click Custom URL, type your server’s IP address, for example http://192.168.1.10:32400, and press Connect. Don’t use localhost: inside its container, “localhost” means Tracearr itself.
  • Jellyfin or Emby: give it the server’s address (port 8096 by default) and an API key. Make one in Jellyfin under Dashboard → API Keys, or in Emby’s server settings under API Keys. Tracearr also has an optional plugin for Jellyfin and Emby that sends it live CPU and bandwidth figures.

If you skipped this during setup, it’s under Settings → Connections → Add Server.

Tracearr Add Server dialog with a Plex server and a custom URL typed in

Tracearr then reads your libraries (mine has 8,324 items). From now on, every play is recorded as it happens, and anything playing right now shows on the Dashboard:

Tracearr dashboard showing one stream playing now

5Bring your history across from Tautulli

If you’ve been running Tautulli, you don’t have to start from nothing. Tracearr offers the import as the last setup step, or later under Settings → Import (in the Data & API section). Give it:

  • Tautulli’s address, for example http://192.168.1.10:8181
  • Tautulli’s API key: in Tautulli go to Settings → Web Interface, tick Enable API if it isn’t already, and copy the API key.
Tracearr Import settings: Tautulli URL and API key

Press Test Connection, then start the import. Mine brought across 1,213 plays going back to June in a few minutes, with Tautulli carrying on as normal. It skipped a handful of plays from Tautulli’s built-in “Local” user, which is expected: that isn’t a real person.

Everything then shows under History: who watched what, on which device, whether it played directly, and how far they got.

Tracearr History page listing three plays with user, quality and progress

Optional: put your server on the map

Tracearr shows where streams come from on a map. It works this out from each viewer’s internet address, so it’s only ever a rough guess (usually the town their internet provider routes through, sometimes miles away), never their actual address. Plays at home have no location at all, so they show in odd places until you tell Tracearr where the server is: go to Settings → Connections, click the ⋯ next to your server, choose Edit, then Set location and Update. Nothing is looked up online; you just pick the spot.

Tracearr Edit Server dialog with the Location setting

Tracearr and Library Doctor

New in Library Doctor v0.3.4 ✓ (24 November)

  • Unwatched check with Tracearr: finds the films and shows nobody has played for a year, biggest first. It used to need Tautulli, so it only worked with Plex; since v0.3.4 it can read Tracearr instead. Add it in Library Doctor under Settings → Optional apps
  • Jellyfin and Emby too: because Tracearr follows all three, the Unwatched check works on Jellyfin and Emby, not just Plex
  • Plays count across servers: films and shows are matched by their IMDb, TMDB or TVDB id, so a film watched on Plex counts for the same film on Jellyfin

Why isn’t Tracearr working?

  • A container keeps restarting with “permission denied”. You’re using your own folders and they don’t belong to the right user. Give the database folder to user 1000 and Tracearr’s folders to user 1001 (see the TrueNAS box in Step 1).
  • Tracearr can’t reach Plex. Use the server’s real IP address, not localhost or 127.0.0.1.
  • The page won’t open on port 3000. Something else is using that port. Change the first number in ports and run docker compose up -d again.
  • An app says Tracearr’s API isn’t there. The address for other apps is http://YOUR-SERVER-IP:3000/api/v2/public/…, with a key from Settings → Data & API → API.
  • Locations on the map are wrong. That’s normal for addresses worked out from internet connections. Set your server’s location for plays at home (Settings → Connections → ⋯ → Edit).

How do you update Tracearr in Docker?

Change the version number on the tracearr line to the newest one on Tracearr’s releases page, then:

cd ~/tracearr
docker compose pull && docker compose up -d

Your history, settings and logins are kept, because they live in the database, not in the container. Leave the database line alone unless Tracearr’s own update notes say to change it: moving to a different PostgreSQL version needs a proper upgrade, not just a new number.

Frequently asked questions

Is Tracearr free?

Yes. Tracearr is free and open source under the AGPL-3.0 licence, and you run it on your own server.

Does Tracearr work with Jellyfin and Emby?

Yes. Tracearr follows Plex, Jellyfin and Emby, and can watch more than one server at once. Tautulli only works with Plex.

Can I keep Tautulli and run Tracearr too?

Yes. They don't get in each other's way. Tracearr can import Tautulli's history, so you can run both for a while and switch off Tautulli later if you like.

How much memory does Tracearr use?

Mine uses around 550 MB for all three containers when nothing is playing. Plan for about 2 GB to be safe, and more if you import a very large history.

Why is someone shown in the wrong place on Tracearr's map?

Locations come from each viewer's internet address, which is only a rough guess, often the town their provider routes through. Plays at home have no location until you set your server's location in Settings.

What port does Tracearr use?

Tracearr's web page is on port 3000: open http://YOUR-SERVER-IP:3000. To use a different port, change the left-hand number under ports: in compose.yaml, for example 3001:3000, then run docker compose up -d again.

Does this work on Synology, TrueNAS or Unraid?

Yes. It's standard Docker Compose, so it runs anywhere Docker Compose does: Synology Container Manager, TrueNAS, Unraid, or any Linux, Windows or Mac machine. Set the user ID, group ID and folder paths in .env to match your system.

How do I update Tracearr in Docker?

In the folder with compose.yaml, run docker compose pull and then docker compose up -d. Docker downloads the new version and restarts the container, and your settings are kept.

Thank you

Tracearr is free and open source (AGPL-3.0), made by connorgallopo and contributors at github.com/connorgallopo/Tracearr, with documentation at docs.tracearr.com. The Tracearr logo belongs to the Tracearr project. This site isn’t connected to it.

Related guides: Plex · Jellyfin · Emby · Library Doctor

Buy me a coffeeEverything here is freeEvery card, guide and download. This site keeps going thanks to people buying me a coffee. Without those donations, My Media Build wouldn’t be here. If something here saved you time or a headache, a coffee helps keep it running.☕ Buy me a coffee

Comments

No comments yet. Questions and tips are welcome.

Leave a comment

Comments appear once I've read them. See the privacy policy.

Get new guides by email

About one email a month: new guides and card releases. No spam, unsubscribe any time.

I'll send a confirmation email first. See the privacy policy.