If you’re wondering why hard links aren’t working or why a simple move is taking far longer than it should.
Here we will try to explains it.
The paths you use on the inside matter. Because of how Docker’s volumes work, passing in two or three volumes such as the commonly suggested `/tv`, `/movies` and `/downloads` makes them look like two or three file systems, even if they aren’t. This means hard links won’t work and instead of an instant move, a slower and more I/O intensive copy + delete is used.
So you want one of the following ?
- Instant moves (Atomic-Moves) during import of the *arr (useful when using Usenet)?
- You don't want to use twice the storage when using torrents. (hardlinks)?
- Short answer is "having a file in multiple folders" without using up your storage, [Long Answer](https://medium.com/@krisbredemeier/the-difference-between-hard-links-and-soft-or-symbolic-links-780149244f7d){:target="_blank"}.
(Spaceinvader One YouTube guides are great to learn how to start with unraid or how to setup certain applications, and yes I did and still do use them. Probably the main reason why he's using those path is because they are predefined in the template)
!!! attention
To get Hardlinks and Atomic-Moves working with Unraid you will need to make use of **ONE** share with subfolders.
Keep in mind regarding the use of the Cache drive, The mover can't move files that are in use, like when seeding with torrents. You will need to shutdown your client or stop/pause the torrents so the mover can move them to your Array.
The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin.
These subfolders you need to create your self, you can use krusader or winscp to create them or any other way you prefer.
After you created all the needed folders it's time to setup the paths in the docker containers.
Go to your dashboard and select your docker container you want to edit or if you're starting fresh add the docker containers you want to use or prefer.
Unraid makes it actually pretty clear what's the Host Path and what's the Container Path.
`Container Path:` => The path that will be used inside the container.
The reason why we use `/data/torrents` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`.
The reason why we use `/data/usenet` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`.
Sonarr, Radarr and Lidarr get's access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete.
Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders.
Then use a program like Putty and SSH to your Synology.
Login if you get a popup asking if you want to trust the key,
Just press `OK` or `ACCEPT`
Enter the login information of your main Synology user account.
![synology-id](images/synology-id.png)
Once logged in type `id`.
This will show your UID (aka PUID).
Which in this screenshot is `1026` for the administrator
and the GID (aka PGID) which is `100` for the users group.
Remember these values for later use.
!!! note
Yes we know it's not recommended to use the admin account but if you already know this then you wouldn't need to read this ;)
!!! attention
To get Hardlinks and Atomic-Moves working with your Synology you will need to make use of **ONE** share with subfolders.
##### Folder Structure
For this example we're going to make use of a share called `data`.
On the host (Synology) you will need to add `/volume1/` before it. So `/volume1/data`
The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin.
These subfolders you need to create your self.
```none
data
├── torrents
│ ├── movies
│ ├── music
│ └── tv
├── usenet
│ ├── movies
│ ├── music
│ └── tv
└── media
├── movies
├── music
└── tv
```
*I'm using lower case on all folder on purpose, being Linux is case sensitive.*
Download this [docker-compose.yml](https://gist.github.com/TRaSH-/6eddbc251b54b22acffba6baf5cbb5ed) to your `/volume1/docker/appdata` location so you got your important stuff together.
You will notice that all the images will be downloaded, and after that the containers will be started. If you get a error then look at the error what it says and try to fix it. If you still got issues then put your used docker-compose.yml on pastebin and join the guides-discord [here](https://trash-guides.info/discord){:target="_blank"} and provide the pastebin link with the error, have patience because of timezone differene.
I'm not going to explain how to get dockers installed and running, I will only explain which folder structure we recommend you to uses and also provide a docker-compose.
*I do recommend to use a non-root user with sudo permissions.*
!!! attention
It doesn't really matter which path you use for your media and appdata,
the only thing you should avoid is `/home`.
Because user folders in `/home` are expected to have some restrictive permissions.
It just could end up creating a permissions mess, so it's better to just avoid entirely.
##### Folder Structure
For this example we're going to make use of a share called `data`.
The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin.
```none
data
├── torrents
│ ├── movies
│ ├── music
│ └── tv
├── usenet
│ ├── movies
│ ├── music
│ └── tv
└── media
├── movies
├── music
└── tv
```
??? summary "Breakdown of the Folder Structure"
##### Breakdown of the Folder Structure
###### Torrent clients
qBittorrent, Deluge, ruTorrent
The reason why we use `/data/torrents` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`.
```none
data
└── torrents
├── movies
├── music
└── tv
```
###### Usenet clients
NZBGet or SABnzbd
The reason why we use `/data/usenet` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`.
```none
data
└── usenet
├── movies
├── music
└── tv
```
###### The arr(s)
Sonarr, Radarr and Lidarr
Sonarr, Radarr and Lidarr get's access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete.
```none
data
├── torrents
│ ├── movies
│ ├── music
│ └── tv
├── usenet
│ ├── movies
│ ├── music
│ └── tv
└── media
├── movies
├── music
└── tv
```
###### Media Server
Plex, Emby, JellyFin and Bazarr
Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders.
```none
data
└── media
├── movies
├── music
└── tv
```
*I'm using lower case on all folder on purpose, being Linux is case sensitive.*
##### Appdata
Your appdata will be stored in `/docker/appdata/{appname}`
These folders you need to create your self.
A docker-compose file exist of 1 file that holds all the needed info of all your docker containers.
this makes it easy to maintain and compare paths.
Download this [docker-compose.yml](https://gist.github.com/TRaSH-/73a2250c2645dfe1c97c61bb5fc46d59) to your `/docker/` location so you got your important stuff together.
You will notice that all the images will be downloaded, and after that the containers will be started. If you get a error then look at the error what it says and try to fix it. If you still got issues then put your used docker-compose.yml on pastebin and join the guides-discord [here](https://trash-guides.info/discord){:target="_blank"} and provide the pastebin link with the error, have patience because of timezone differene.
It doesn't really matter which path you use for your media and appdata,
the only thing you should avoid is `/home`.
Because user folders in `/home` are expected to have some restrictive permissions.
It just could end up creating a permissions mess, so it's better to just avoid entirely.
##### Folder Structure
For this example we're going to make use of a share called `data`.
The `data` folder has sub-folders for `torrents` and `usenet` and each of these have sub-folders for `tv`, `movie` and `music` downloads to keep things neat. The `media` folder has nicely named `TV`, `Movies` and `Music` sub-folders, this is your library and what you’d pass to Plex, Emby or JellyFin.
```none
data
├── torrents
│ ├── movies
│ ├── music
│ └── tv
├── usenet
│ ├── movies
│ ├── music
│ └── tv
└── media
├── movies
├── music
└── tv
```
??? summary "Breakdown of the Folder Structure"
##### Breakdown of the Folder Structure
###### Torrent clients
qBittorrent, Deluge, ruTorrent
The reason why we use `/data/torrents` for the torrent client is because it only needs access to the torrent files. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/torrents/{tv|movies|music}`.
```none
data
└── torrents
├── movies
├── music
└── tv
```
###### Usenet clients
NZBGet or SABnzbd
The reason why we use `/data/usenet` for the usenet client is because it only needs access to the usenet files. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like `/data/usenet/{tv|movies|music}`.
```none
data
└── usenet
├── movies
├── music
└── tv
```
###### The arr(s)
Sonarr, Radarr and Lidarr
Sonarr, Radarr and Lidarr get's access to everything because the download folder(s) and media folder will look like and be one file system. Hard links will work and moves will be atomic, instead of copy + delete.
```none
data
├── torrents
│ ├── movies
│ ├── music
│ └── tv
├── usenet
│ ├── movies
│ ├── music
│ └── tv
└── media
├── movies
├── music
└── tv
```
###### Media Server
Plex, Emby, JellyFin and Bazarr
Plex, Emby, JellyFin and Bazarr only needs access to your media library, which can have any number of sub folders like Movies, Kids Movies, TV, Documentary TV and/or Music as sub folders.
```none
data
└── media
├── movies
├── music
└── tv
```
*I'm using lower case on all folder on purpose, being Linux is case sensitive.*
Don't forget to look at the [Examples](#examples) how to setup the paths inside the containers.
Big Thnx to [fryfrog](https://github.com/fryfrog){:target="_blank"} for his [Docker Guide](https://wiki.servarr.com/Docker_Guide){:target="_blank"} that I used as basis for this guide.