Being I don't have a Synology myself and I kind of hate the Synology GUI for the dockers, I'm doing this with the use of docker-compose through a terminal.
And a very big thanks to [Bokkoman](https://www.buymeacoffee.com/bokkoman){:target="_blank" rel="noopener noreferrer"} and [BZwart](https://github.com/BaukeZwart){:target="_blank" rel="noopener noreferrer"} that updated this Guide for DSM 7 and also offered their help on discord as Synology Support Team.
This page will provide you with guidance on how to install several Docker images related to the Servarr apps to your Synology. We highly recommend to read the full guide, that way you have a better understanding of what you do, in case you later decide to make changes.
## Summary
1. We will create ***one*** share that will hold all your data. This ensures hardlinking and/or instant moves are possible.
1. Create one user which will be assigned to the docker images as the user they run as out of security reasons.
1. Create a folder structure on the `data` and `docker` share with a few commands (or manually).
1. Download and edit the `docker-compose.yml` and `.env` files to your system settings.
1. Set permissions to all folders related in the shares.
1. Run and execute docker commands to start the containers.
Though, we offer a short way out. This is intended as a quick way to do everything that is written on this page within one script. And is only for initial setup. After that, you need to manage it yourself. Rerunning the script can or will reset all personal changes made in the compose/env.
You need to install Docker / Container Manager from the `Package Center`. This should also create a share named `docker`, check File Station if it is present.
We are going to create a new user that only has access to the share(s) that we use for the containers to run as. You rather not have the containers run as an admin/root user.
Enter the login information of a Synology user account that has admin priveliges, as only members of the 'administrators' user group are able to use SSH.
In order for the Docker container to access the shares on the Synology, we need to know the user ID (PUID) and group ID (PGID) from the `docker` user we just created.
Download this [docker-compose.yml](https://raw.githubusercontent.com/TRaSH-/Guides-Synology-Templates/main/docker-compose/docker-compose.yml){:target="_blank" rel="noopener noreferrer"} to your `/volume1/docker/appdata` location so you got your important stuff together. Or use the command below:
We didn't add a download client to it, because it depends on what you prefer (usenet/torrent) and which client you prefer. We have a repository [Repository](https://github.com/TRaSH-/Guides-Synology-Templates/tree/main/templates){:target="_blank" rel="noopener noreferrer"} on Github where we provide and maintain some templates that are ready to use with the main `docker-compose.yml`.
The only thing you need to do is copy & paste what's inside the template file into to the main `docker-compose.yml` on the bottom, the templates also have a command what you need to use to create the [appdata](#appdata) folder that we explained earlier. Without the appdata folder for the application, the creation of the container will fail because of the missing folder.
Download this [.env](https://raw.githubusercontent.com/TRaSH-/Guides-Synology-Templates/main/docker-compose/.env){:target="_blank" rel="noopener noreferrer"} to your `/volume1/docker/appdata` location next to the `docker-compose.yml`. Or use this command:
If you need to edit docker-compose.yml or the .env file we advise to use [Notepad++](https://notepad-plus-plus.org/){:target="_blank" rel="noopener noreferrer"} or [Visual Studio Code](https://code.visualstudio.com/){:target="_blank" rel="noopener noreferrer"}
The `.env` file we downloaded holds the variables/information you need to change in order for everything to work. I added explanations in the `.env` file.
1. PUID/PGID (this info you got earlier from [HERE](#puid-and-pgid))
1. TZ (Change to your timezone, can be found [HERE](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones){:target="_blank" rel="noopener noreferrer"})
The `.env` holds more variables/information for other containers you don't need to remove those variables and will be only used when you install the other containers.
For Pullio to do it's job, you will need to create a Scheduled Task in your Task Scheduler that runs for example at 4am at night with **root** privileges.
It can be frustrating to test the script if no docker image updates are available, for that you can run command `sudo pullio --debug` and the script will behave as if an update is available. If you have set to receive notifications, you should receive them.
If you're using a different user than `docker` (the user generated in the beginning), then you need to change the `docker:users` part in the command below!!!
make sure you delete/remove all your existing dockers from the Docker GUI and also remove your native installs (in Package Center) of these applications !!!
You will notice that all the images will be downloaded, after that the containers will be started. If you get a error then read what error says and try to fix it (missing folders, permissions errors, etc). If you can't figure out the solution to your errors, join the guides-discord [here](https://trash-guides.info/discord){:target="_blank" rel="noopener noreferrer"} and create a support ticket.
If you need to do any changes, only edit the `docker-compose.yml` file. To activate the changes, [run the commands from here](#run-the-docker-compose)) again.
Due to some iptables configuration in DSM, you can get an incorrect IP reported in Plex or other apps that need an read/report the IP. To fix this, you need to add two rules to your iptables. unfortunately, those rules can sometimes be deleted at reboot or after DSM update.