diff --git a/docs/Misc/files/synology-docker-compose.yml b/docs/Misc/files/synology-docker-compose.yml new file mode 100644 index 000000000..ade24eb2d --- /dev/null +++ b/docs/Misc/files/synology-docker-compose.yml @@ -0,0 +1,147 @@ +version: "3.2" +services: +# Radarr - https://hotio.dev/containers/radarr/ + radarr: + container_name: radarr + image: ghcr.io/hotio/radarr:nightly + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 7878:7878 + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/radarr:/config # Change "/volume1/docker/radarr" with the path your config will be. + - /volume1/data:/data # Change "/volume1/data" with the path where your library + torrent/usenet downloads both are. +# Sonarr - https://hotio.dev/containers/sonarr/ + sonarr: + container_name: sonarr + image: ghcr.io/hotio/sonarr:nightly + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 8989:8989 + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/sonarr:/config # Change "/volume1/docker/sonarr" with the path your config will be. + - /volume1/data:/data # Change "/volume1/data" with the path where your library + torrent/usenet downloads both are. +# Bazarr - https://hotio.dev/containers/bazarr/ + bazarr: + container_name: bazarr + image: ghcr.io/hotio/bazarr:nightly + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 6767:6767 + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/bazarr:/config # Change "/volume1/docker/bazarr" with the path your config will be. + - /volume1/data/media:/data/media # Change "/volume1/data/media" with the path where your library are(sonarr+radarr). +# NZBGet - https://hotio.dev/containers/nzbget/ + nzbget: + container_name: nzbget + image: ghcr.io/hotio/nzbget:latest + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 6789:6789/tcp + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/nzbget:/config:rw # Change "/volume1/docker/nzbget" with the path your config will be. + - /volume1/data/usenet:/data/usenet:rw # Change "/volume1/data/usenet" with the path your usenet data ends up in. +# qBittorrent - https://docs.linuxserver.io/images/docker-qbittorrent + qbittorrent: + container_name: qbittorrent + image: ghcr.io/linuxserver/qbittorrent + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 6881:6881 + - 6881:6881/udp + - 8080:8080 + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + - UMASK_SET=022 + - WEBUI_PORT=8080 + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/qbittorrent:/config:rw # Change "/home/dockeruser/.config/qbittorrent" with the path your config will be. + - /volume1/data/torrents:/data/torrents:rw # Change "/volume1/data/torrents" with the path your usenet data ends up in. +# Plex - https://hotio.dev/containers/plex/ + plex: + container_name: plex + image: ghcr.io/hotio/plex + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 32400:32400 + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + - UMASK=002 + - ARGS= + - DEBUG=no + - PLEX_CLAIM= + - ADVERTISE_IP= + - ALLOWED_NETWORKS= + - PLEX_PASS=no + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/plex:/config:rw + - /volume1/data/media:/data/media:rw # Change "/volume1/data/media" with the path where your library are(sonarr+radarr). + - /tmp:/transcode:rw +# automatic docker container updater - https://github.com/containrrr/watchtower + watchtower: + container_name: watchtower + image: containrrr/watchtower + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + - UMASK=022 + - WATCHTOWER_CLEANUP=true + - WATCHTOWER_INCLUDE_STOPPED=false + - WATCHTOWER_MONITOR_ONLY=false + - WATCHTOWER_NOTIFICATIONS_LEVEL=info + - WATCHTOWER_NOTIFICATIONS=shoutrrr + - WATCHTOWER_NOTIFICATION_TEMPLATE={{range .}}{{.Message}}{{println}}{{end}} + - WATCHTOWER_SCHEDULE=0 0 4 * * * #use cron to change update interval set at 4am. + - WATCHTOWER_TIMEOUT=10s + - WATCHTOWER_NOTIFICATION_URL= + volumes: + - /etc/localtime:/etc/localtime:ro + - /var/run/docker.sock:/var/run/docker.sock \ No newline at end of file diff --git a/docs/Misc/how-to-set-up-hardlinks-and-atomic-moves.md b/docs/Misc/how-to-set-up-hardlinks-and-atomic-moves.md index 70f514512..35d256ed7 100644 --- a/docs/Misc/how-to-set-up-hardlinks-and-atomic-moves.md +++ b/docs/Misc/how-to-set-up-hardlinks-and-atomic-moves.md @@ -40,6 +40,7 @@ Then keep reading. - [DockSTARTer](#dockstarter) - [UnRaid](#unraid) +- [Synology](#synology) #### DockSTARTer @@ -72,7 +73,7 @@ Then keep reading. ##### Step 1 To accomplisch this we need to change first a few paths in your `.env` (Usually `~/.docker/compose/.env`) - ```yaml + ``` yaml # Global Settings COMPOSE_HTTP_TIMEOUT=60 DOCKERCONFDIR=~/.config/appdata @@ -192,13 +193,13 @@ Then keep reading. ![unraid-torrent-clients](images/image-20201112201012153.png) - `Container Path:` => `/data/torrent` + `Container Path:` => `/data/torrents` `Host Path`: => `/mnt/user/data/torrents` !!! info - The reason why we use `/data/torrent` 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/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 @@ -286,6 +287,271 @@ Then keep reading. [![final-results](images/image-20201112210400294.png)](https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Misc/images/image-20201112210400294.png){:target="_blank"} +#### Synology + +??? summary "Synology" + + !!! note + + 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. + + This works like 10x faster then the GUI and after adding it shows up in the GUI. + + We need to get some information that we need later to setup the docker-compose file. + + ###### PUID and PGID + + In order for the Docker container to access the shares on the Synology, + we need to give it the same permissions as your main user who has access to those shares. + For this we need to figure out the PUID and the PGID of the user having access to your shares. + + You will need to SSH into your Synology. + If you didn't already enable it you need to do that first + + [![synology-control-panel](images/synology-control-panel.png)](https://raw.githubusercontent.com/TRaSH-/Guides/master/docs/Misc/images/synology-control-panel.png){:target="_blank"} + + 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.* + + ##### Appdata + + Your appdata will be stored in `/volume1/docker/{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 [synology-docker-compose.yml](files/synology-docker-compose.yml) to your `/volume1/docker/` location so you got your important stuff together. + This docker-compose file will have the following docker containers included. + + - Radarr + - Sonarr + - Bazarr (Subtitle searcher and downloaded) + - NZBGet + - qBittorent + - Plex + - Watchtower (automatic docker container updater) + + I've added at the end of the Synology guide a few examples you can add/replace. + + ??? example "synology-docker-compose.yml" + + ``` yml + version: "3.2" + services: + # Radarr - https://hotio.dev/containers/radarr/ + radarr: + container_name: radarr + image: ghcr.io/hotio/radarr:nightly + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 7878:7878 + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/radarr:/config # Change "/volume1/docker/radarr" with the path your config will be. + - /volume1/data:/data # Change "/volume1/data" with the path where your library + torrent/usenet downloads both are. + # Sonarr - https://hotio.dev/containers/sonarr/ + sonarr: + container_name: sonarr + image: ghcr.io/hotio/sonarr:nightly + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 8989:8989 + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/sonarr:/config # Change "/volume1/docker/sonarr" with the path your config will be. + - /volume1/data:/data # Change "/volume1/data" with the path where your library + torrent/usenet downloads both are. + # Bazarr - https://hotio.dev/containers/bazarr/ + bazarr: + container_name: bazarr + image: ghcr.io/hotio/bazarr:nightly + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 6767:6767 + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/bazarr:/config # Change "/volume1/docker/bazarr" with the path your config will be. + - /volume1/data/media:/data/media # Change "/volume1/data/media" with the path where your library are(sonarr+radarr). + # NZBGet - https://hotio.dev/containers/nzbget/ + nzbget: + container_name: nzbget + image: ghcr.io/hotio/nzbget:latest + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 6789:6789/tcp + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/nzbget:/config:rw # Change "/volume1/docker/nzbget" with the path your config will be. + - /volume1/data/usenet:/data/usenet:rw # Change "/volume1/data/usenet" with the path your usenet data ends up in. + # qBittorrent - https://docs.linuxserver.io/images/docker-qbittorrent + qbittorrent: + container_name: qbittorrent + image: ghcr.io/linuxserver/qbittorrent + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 6881:6881 + - 6881:6881/udp + - 8080:8080 + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + - UMASK_SET=022 + - WEBUI_PORT=8080 + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/qbittorrent:/config:rw # Change "/home/dockeruser/.config/qbittorrent" with the path your config will be. + - /volume1/data/torrents:/data/torrents:rw # Change "/volume1/data/torrents" with the path your usenet data ends up in. + # Plex - https://hotio.dev/containers/plex/ + plex: + container_name: plex + image: ghcr.io/hotio/plex + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + ports: + - 32400:32400 + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + - UMASK=002 + - ARGS= + - DEBUG=no + - PLEX_CLAIM= + - ADVERTISE_IP= + - ALLOWED_NETWORKS= + - PLEX_PASS=no + volumes: + - /etc/localtime:/etc/localtime:ro + - /volume1/docker/plex:/config:rw + - /volume1/data/media:/data/media:rw # Change "/volume1/data/media" with the path where your library are(sonarr+radarr). + - /tmp:/transcode:rw + # automatic docker container updater - https://github.com/containrrr/watchtower + watchtower: + container_name: watchtower + image: containrrr/watchtower + restart: unless-stopped + logging: + driver: json-file + network_mode: bridge + environment: + - PUID=1026 # you must find out your PUID through SSH, type in terminal: id $user + - PGID=100 # you must find out your PGID through SSH, type in terminal: id $user + - TZ=Europe/Amsterdam # Change to your timezone + - UMASK=022 + - WATCHTOWER_CLEANUP=true + - WATCHTOWER_INCLUDE_STOPPED=false + - WATCHTOWER_MONITOR_ONLY=false + - WATCHTOWER_NOTIFICATIONS_LEVEL=info + - WATCHTOWER_NOTIFICATIONS=shoutrrr + - WATCHTOWER_NOTIFICATION_TEMPLATE={{range .}}{{.Message}}{{println}}{{end}} + - WATCHTOWER_SCHEDULE=0 0 4 * * * # use cron to change update interval set at 4am. + - WATCHTOWER_TIMEOUT=10s + - WATCHTOWER_NOTIFICATION_URL= + volumes: + - /etc/localtime:/etc/localtime:ro + - /var/run/docker.sock:/var/run/docker.sock + ``` + + ##### Changes you need to do + + 1. PUID/PGID (this info you got earlier) + 1. TZ (Change to your timezone) + + !!! importand + make sure you deleted/removed all your existing dockers from the GUI and also remove your native installs of these applications !!! + + ##### Run the Docker Compose + + ```bash + sudo docker-compose up -d + ``` + + 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. + + Don't forget to look at the [Examples](#examples) how to setup the paths inside the containers. + ------ ### Examples diff --git a/docs/Misc/images/synology-control-panel.png b/docs/Misc/images/synology-control-panel.png new file mode 100644 index 000000000..7f05029ed Binary files /dev/null and b/docs/Misc/images/synology-control-panel.png differ diff --git a/docs/Misc/images/synology-id.png b/docs/Misc/images/synology-id.png new file mode 100644 index 000000000..047db194c Binary files /dev/null and b/docs/Misc/images/synology-id.png differ