Moving Tautulli from a Mac (Python) to a Synology NAS (Docker)
Detailed steps for moving a Tautulli installation from Python on a Mac to docker in a Synology NAS
This tutorial assumes you have some basic knowledge of the command line/terminal and
ssh
ing into a machine to run commands. Docker familiarity is helpful as well, but I’ll explain thedocker compose
commands we’ll be running if you’re unfamiliar.
Intro
What is this post about?
In my previous post, I explained how I moved my Plex Library from a Mac to a Synology NAS. This post will build off of that and guide you through how I moved Tautulli from my Mac (running in Python) to a Synology NAS (running in docker).
What is Tautulli?
Tautulli is a 3rd party application that you can run alongside your Plex Media Server to monitor activity and track various statistics. Most importantly, these statistics include what has been watched, who watched it, when and where they watched it, and how it was watched. The only thing missing is “why they watched it”, but who am I to question your 42 plays of Frozen. All statistics are presented in a nice and clean interface with many tables and graphs, which makes it easy to brag about your server to everyone else. Source
I use Tautulli to historically see who is playing content and how that content was watched (direct play vs transcoding). This way, if there are any comments or questions on quality, I can look back and easily see what happened and debug.
I also love statistics and Tautulli gives some great quantitative visuals on your server’s usage.
Moving Tautulli from a Mac to Synology NAS
Backing up old Tautulli Data
Let’s get into it and start moving Tautuilli. We’ll start by following this question in their FAQ:
To back up your Tautulli data, you need to go into Tautulli on web –> gear (top right) –> Settings –> Help & Info
- Under “Tautulli Configuration”, click on
/config/config.ini
to download your Tautulli configuration - Under “Tautulli Configuration”, click on
/config/tautulli.db
to download your Tautulli database
We have now backed up everything we need from Tautulli.
Installing Tautulli via Docker in Synology NAS
If you haven’t already, install Container Manager to your Synology NAS. This will install docker in your Synology NAS. You can do this by going to the Package Center in your Synology NAS, then search for and install Container Manager.
Personally, I want to create a new user account for Tautulli. This is recommended and will make access control easier (restricting access to certain files, permissions, etc.). Here’s how to create a new user in Synology’s OS: DiskStation Manager (DSM):
- In DSM go to Control Panel –> User & Group –> Under “User”, click Create
- I gave the name of
tautulli
- Description:
Tautulli user account
(optional) - Uncheck “Send a notification mail to the newly created user” (optional)
- Click “Next”
- Click “Next”
- For permissions, I gave Read/Write access to the
docker
folder, left it at “Default” forhomes
, and “No Access” for everything else- This way, the
tautulli
user will only be able to access thedocker
folder (and its home directory).
- This way, the
- Click “Next” through the rest of the prompts
- I gave the name of
Then we will need to create a folder for Tautulli. I’ll be making mine as /volume1/docker/tautulli
, similar to what I did for Plex, but you are welcome to place it wherever you’d like. The tautulli
folder will also need a config
folder inside of it:
1
2
3
|-- docker
| |-- tautulli
| | `-- config
In the tautulli
folder, we’ll create the docker-compose
file. I named mine tautulli-docker-compose.yaml
. You can find Tautulli’s template for their docker-compose
here.
We have a few configuration changes to make in Tautulli’s docker-compose
file:
- We need to mount Tautulli’s config in
/config
- Set the timezone to
America/Denver
just as we did for Plex’sdocker-compose
.- Other time zones can be found here.
- If you created a
tautulli
user above, give the container its user ID (UID) and group ID (GID):- Here’s how to get the
tautulli
user’s user id and group id: 1 2 3 4
user@nas $ id -u tautulli 1033 user@nas $ id -g tautulli 100
- Here’s how to get the
After all that, my tautulli-docker-compose.yaml
looked like this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
version: '3'
services:
tautulli:
image: ghcr.io/tautulli/tautulli
container_name: tautulli
restart: unless-stopped
volumes:
- /volume1/docker/tautulli/config:/config
environment:
# Matches Tautulli user created on Synology's DiskStation Manager
- PUID=1033 # Match `id -u tautulli`
- PGID=100 # Match `id -g tautulli`
- TZ=America/Denver
ports:
- 8181:8181
Note that you can specify the Tautulli version after the
image:
tag (Ex.image: ghcr.io/tautulli/tautulli:v2.13.4
). This can be a smart idea in case future updates break things. However, nothing really “depends” on Tautulli and I don’t foresee any issues with future Tautulli updates. Thus, I will leave the image without mentioning the version (which is effectively the same asimage: ghcr.io/tautulli/tautulli:latest
). This will pull the latest image available and will make updating very easy in the future.
Now it’s time to launch Tautulli with Docker Compose:
1
2
3
user@nas $ # The path that I use for the below line is /volume1/docker/tautulli/
user@nas $ cd /path/to/folder/with/tautulli-docker-compose-file
user@nas $ sudo docker-compose -f tautulli-docker-compose.yaml up
Note that Synology’s Container Manager is supplying us an older version of docker compose that uses
docker-compose
. Newer versions call docker compose viadocker compose
.Note the space vs a hyphen.
Afterwards, you should now be able to access Tautulli in a web browser at <NAS_IP>:8181
.
Connecting Tautulli to our Plex server
Once you’re in Tautulli, go into Tautulli on web –> gear (top right) –> Settings –> Plex Media Server. We will need to connect a new server. To do this, click on “Fetch New Token”, and sign in. I can’t remember exactly but the rest might auto populate? If not, put in the IP of your NAS, port (32400
by default), and I checked “use secure connection” because why not?
Then I streamed a few videos in Plex and saw it show up in Tautulli so I think the connection between Plex and Tautulli is good to go!
To import your old database and config go into Tautulli on web –> gear (top right) –> Settings –> Import & Backups. From here, click on the respective buttons for importing a Tautulli database and a Tautulli configuration. Once you do that, verify that the history tab is populated just as it was. That will confirm a successful database import.
If Tautulli is not “linking” old content with new content, look into the FAQ below for a solution. Luckily, I didn’t have any issues.
Updating Tautulli
If you gave a specific Tautulli image version in the tatutulli-docker-compose.yaml
(Ex. image: ghcr.io/tautulli/tautulli:v2.14.6
), you will need to manually update that version number, then bring Tautulli down then back up:
1
2
user@nas $ sudo docker-compose -f tautulli-docker-compose.yaml down
user@nas $ sudo docker-compose -f tautulli-docker-compose.yaml up -d
If you did not specify a specific Tautulli image version (Ex. image: ghcr.io/tautulli/tautulli
), you just need to “re-pull” the latest version, then restart Tautulli:
1
2
user@nas $ sudo docker-compose -f tautulli-docker-compose.yaml pull
user@nas $ sudo docker-compose -f tautulli-docker-compose.yaml up -d
Comments powered by Disqus.