<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikiold.servarr.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fryfrog</id>
	<title>Servarr - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wikiold.servarr.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Fryfrog"/>
	<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/Special:Contributions/Fryfrog"/>
	<updated>2026-05-18T22:36:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=System_status&amp;diff=2684</id>
		<title>System status</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=System_status&amp;diff=2684"/>
		<updated>2020-12-11T16:39:50Z</updated>

		<summary type="html">&lt;p&gt;Fryfrog: Clarified and added detail to the movie removed from tmdb system message.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== System ==&lt;br /&gt;
=== Health ===&lt;br /&gt;
==== Overview ====&lt;br /&gt;
====== Radarr ======&lt;br /&gt;
&amp;lt;section begin=radarr_system_status_health_overview /&amp;gt;&lt;br /&gt;
This page contains a list of health checks errors. These health checks are periodically performed performed by Radarr and on certain events. The resulting warnings and errors are listed here to give advice on how to resolve them.&lt;br /&gt;
&amp;lt;section end=radarr_system_status_health_overview /&amp;gt;&lt;br /&gt;
====== Sonarr ======&lt;br /&gt;
&amp;lt;section begin=sonarr_system_status_health_overview /&amp;gt;&lt;br /&gt;
This page contains a list of health checks errors. These health checks are periodically performed performed by Sonarr and on certain events. The resulting warnings and errors are listed here to give advice on how to resolve them.&lt;br /&gt;
&amp;lt;section end=sonarr_system_status_health_overview /&amp;gt;&lt;br /&gt;
====== Lidarr ======&lt;br /&gt;
&amp;lt;section begin=lidarr_system_status_health_overview /&amp;gt;&lt;br /&gt;
This page contains a list of health checks errors. These health checks are periodically performed performed by Lidarr and on certain events. The resulting warnings and errors are listed here to give advice on how to resolve them.&lt;br /&gt;
&amp;lt;section end=lidarr_system_status_health_overview /&amp;gt;&lt;br /&gt;
====== Readarr ======&lt;br /&gt;
&amp;lt;section begin=readarr_system_status_health_overview /&amp;gt;&lt;br /&gt;
This page contains a list of health checks errors. These health checks are periodically performed performed by Readarr and on certain events. The resulting warnings and errors are listed here to give advice on how to resolve them.&lt;br /&gt;
&amp;lt;section end=readarr_system_status_health_overview /&amp;gt;&lt;br /&gt;
==== System Warnings ====&lt;br /&gt;
===== Radarr =====&lt;br /&gt;
&amp;lt;section begin=radarr_system_status_health_system_warnings /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;update-to-net-core-version&amp;quot;&amp;gt;'''[[#update-to-net-core-version|Update to .NET Core version]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Newer versions of Radarr are targeted for .NET Core. We provide legacy mono builds for those platforms that cannot use .NET Core. You are running one of these legacy builds but your platform supports .NET Core.&lt;br /&gt;
** Fixing Docker installs&lt;br /&gt;
*** Re-pull your container&lt;br /&gt;
** Fixing Standalone installs&lt;br /&gt;
*** This should only happen on Linux hosts.  &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;'''Do not install .net core runtime or SDK from microsoft.'''&amp;lt;/span&amp;gt; To remedy, download the correct build for your architecture: &lt;br /&gt;
****[https://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64 x64]&lt;br /&gt;
****[https://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=arm64 arm64]&lt;br /&gt;
****[https://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=arm arm]&lt;br /&gt;
***&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;'''Back-Up your existing configuration'''&amp;lt;/span&amp;gt; before the next step.&lt;br /&gt;
*** '''Delete your existing binaries' (contents or folder of /opt/Radarr)''' and replace with the contents of the &amp;lt;code&amp;gt;.tar.gz&amp;lt;/code&amp;gt; you just downloaded.&lt;br /&gt;
***&amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;'''DO NOT JUST EXTRACT THE DOWNLOAD OVER THE TOP OF YOUR EXISTING BINARIES.&amp;lt;br&amp;gt; YOU MUST DELETE THE OLD ONES FIRST'''.&amp;lt;/span&amp;gt; &lt;br /&gt;
**** Update your startup script to call &amp;lt;code&amp;gt;Radarr&amp;lt;/code&amp;gt; instead of calling it with mono like &amp;lt;code&amp;gt;mono --debug Radarr.exe&amp;lt;/code&amp;gt;. In other words you want, as an example, &amp;lt;code&amp;gt;/opt/Radarr/Radarr&amp;lt;/code&amp;gt; and '''not''' &amp;lt;code&amp;gt;mono  --debug /opt/Radarr/Radarr&amp;lt;/code&amp;gt;.&lt;br /&gt;
*** If Radarr doesn’t start, ensure you have the dependencies listed [https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?tabs=netcore31&amp;amp;pivots=os-linux here] installed.&lt;br /&gt;
** Managed/tooled installs&lt;br /&gt;
*** For instructions for Swizzin installs, please read the [https://swizzin.ltd/applications/radarr/#migrating-to-v3-on-net-core Swizzin Docs article]&lt;br /&gt;
*** For instructions on Whatbox, please see the [https://whatbox.ca/wiki/Radarr#radarr_v3_(unstable) WB Wiki article]&lt;br /&gt;
*&amp;lt;span id=&amp;quot;Mono_version_is_less_than_3_10_upgrade_for_improved_stability&amp;quot;&amp;gt;'''[[#Mono_version_is_less_than_3_10_upgrade_for_improved_stability|Mono version is less than 3.10, upgrade for improved stability]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Radarr is written in .Net and requires Mono to run. Versions of 3.10 and above resolved various stability issues we experienced in the past and is considered the minimum supported version.&amp;lt;br /&amp;gt;&lt;br /&gt;
** Mono version 4.x and higher are also available and provides a better experience on certain platforms.&lt;br /&gt;
** See &amp;quot;Update to .NET Core version above&amp;quot;&lt;br /&gt;
*&amp;lt;span id=&amp;quot;New_update_is_available&amp;quot;&amp;gt;'''[[#New_update_is_available|New update is available]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Rejoice, the developers have released a new update. This generally means awesome new features and squashed piles of bugs (right?). Apparently you don’t have Auto-Updating enabled, so you’ll have to figure out how to update on your platform. Pressing the Install button on the System -&amp;amp;gt; Updates page is probably a good starting point.&lt;br /&gt;
**''(This warning will not appear if your current version is less than 14 days old)''&lt;br /&gt;
*&amp;lt;span id=&amp;quot;Cannot_install_update_because_startup_folder_is_not_writable_by_the_user&amp;quot;&amp;gt;'''[[#Cannot_install_update_because_startup_folder_is_not_writable_by_the_user|Cannot install update because startup folder is not writable by the user]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** This means Radarr will be unable to update itself. You’ll have to update Radarr manually or set the permissions on Radarr’s Startup directory (the installation directory) to allow Radarr to update itself.&lt;br /&gt;
*&amp;lt;span id=&amp;quot;Updating_will_not_be_possible_to_prevent_deleting_AppData_on_Update&amp;quot;&amp;gt;'''[[#Updating_will_not_be_possible_to_prevent_deleting_AppData_on_Update|Updating will not be possible to prevent deleting AppData on Update]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Radarr detected that AppData folder for your Operating System is located inside the directory that contains the Radarr binaries. Normally it would be &amp;lt;code&amp;gt;C:\ProgramData&amp;lt;/code&amp;gt; for Windows and, &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt; for linux.&lt;br /&gt;
** Please look at System -&amp;amp;gt; Info to see the current AppData &amp;amp;amp; Startup directories.&lt;br /&gt;
** This means Radarr will be unable to update itself without risking data-loss.&lt;br /&gt;
** If you’re on linux, you’ll probably have to change the home directory for the user that is running Radarr and copy the current contents of the &amp;lt;code&amp;gt;~/.config/Radarr&amp;lt;/code&amp;gt; directory to preserve your database.&lt;br /&gt;
*&amp;lt;span id=&amp;quot;Branch_is_for_a_previous_version&amp;quot;&amp;gt;'''[[#Branch_is_for_a_previous_version|Branch is for a previous version]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** The update branch setup in Settings/General is for a previous version of Radarr, therefore the instance will not see correct update information in the System/Updates feed and may not receive new updates when released.&lt;br /&gt;
**'''Note:''' Please note that v0.2 will only have critical bugs resolved as of August 2020. Any additional development or features will be solely in V3. Each push to the “develop” branch creates a build on “nightly” release channel (release channel is the “branch” within radarr’s settings), once we push a build to Github it will show up on “develop” release channel.&lt;br /&gt;
*&amp;lt;span id=&amp;quot;Could_not_connect_to_signalR&amp;quot;&amp;gt;'''[[#Could_not_connect_to_signalR|Could not connect to signalR]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** signalR drives the dynamic UI updates, so if your browser cannot connect to signalR on your server you won’t see any real time updates in the UI.&lt;br /&gt;
** The most common occurrence of this is on V3 combined with an nginx reverse proxy. Nginx requires the following addition to the location block for radarr:&lt;br /&gt;
*::&amp;lt;code&amp;gt;proxy_http_version 1.1;&amp;lt;/code&amp;gt;&lt;br /&gt;
*::&amp;lt;code&amp;gt;proxy_set_header Upgrade $http_upgrade;&amp;lt;/code&amp;gt;&lt;br /&gt;
*::&amp;lt;code&amp;gt;proxy_set_header Connection $http_connection;&amp;lt;/code&amp;gt;&lt;br /&gt;
** Make sure you &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;'''do not'''&amp;lt;/span&amp;gt; include &amp;lt;code&amp;gt;proxy_set_header Connection &amp;quot;Upgrade&amp;quot;;&amp;lt;/code&amp;gt; as suggested by the nginx documentation. &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;'''THIS WILL NOT WORK'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** See https://github.com/aspnet/AspNetCore/issues/17081&lt;br /&gt;
** For apache reverse proxy you need to add to the configuration:&lt;br /&gt;
*::&amp;lt;code&amp;gt;Include /etc/apache2/mods-available/proxy_wstunnel.load&amp;lt;/code&amp;gt;&lt;br /&gt;
*::&amp;lt;code&amp;gt;ProxyPass &amp;quot;/socket&amp;quot; &amp;quot;ws://127.0.0.1:7878/socket&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
*::&amp;lt;code&amp;gt;ProxyPassReverse &amp;quot;/socket&amp;quot; &amp;quot;ws://127.0.0.1:7878/socket&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;missing-root-folder&amp;quot;&amp;gt;'''[[#missing-root-folder|Missing Root Folder]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** This error is typically identified if a Movie is looking for a root folder but that root folder is no longer available. &lt;br /&gt;
*** If you would like to remove this warning simply find the movie that is still using the old root folder and edit it to the correct root Folder&lt;br /&gt;
*** Easiest way to find this is to go to the Movies (Library) Tab and create a custom filter with the old root folder path and then mass edit these movies to the new path.&lt;br /&gt;
&amp;lt;section end=radarr_system_status_health_system_warnings /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Sonarr =====&lt;br /&gt;
&amp;lt;section begin=sonarr_system_status_health_system_warnings /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Currently_installed_Net_Framework_is_old_and_unsupported&amp;quot;&amp;gt;'''[[#Currently_installed_Net_Framework_is_old_and_unsupported|Currently installed .Net Framework is old and unsupported]]&amp;lt;/span&amp;gt;'''&lt;br /&gt;
** Sonarr uses the .Net Framework. We need to build Sonarr against the lowest supported version still used by our users. Occasionally we increase the version we build against to be able to utilize new features. Apparently you haven't applied the appropriate Windows updates in a while and need to upgrade .Net to be able to use newer versions of Sonarr.&lt;br /&gt;
** Upgrading the .Net Framework is very straightforward on Windows, although it often requires a restart. Please follow the instructions here: https://dotnet.microsoft.com/download/dotnet-framework.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Currently_installed_Net_Framework_is_supported_but_upgrading_is_recommended&amp;quot;&amp;gt;'''[[#Currently_installed_Net_Framework_is_supported_but_upgrading_is_recommended|Currently installed .Net Framework is supported but upgrading is recommended]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Sonarr uses the .Net Framework. We need to build Sonarr against the lowest supported version still used by our users. Upgrading to newer versions allows us to build against newer versions and use new Framework features.&lt;br /&gt;
** Upgrading the .Net Framework is very straightforward on Windows, although it often requires a restart. Please follow the instructions here: https://dotnet.microsoft.com/download/dotnet-framework.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Currently_installed_mono_version_is_old_and_unsupported&amp;quot;&amp;gt;'''[[#Currently_installed_mono_version_is_old_and_unsupported|Currently installed mono version is old and unsupported]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Sonarr is written in .Net and requires Mono to run. Various versions of Sonarr have different minimum versions of Mono to operate correctly. The ideal version of Mono varies per platform.&amp;lt;br /&amp;gt;&lt;br /&gt;
** Mono 5.4 is the absolute minimum for Sonarr v3 but Mono 5.20 is currently recommended.&lt;br /&gt;
** The upgrade procedure for Mono varies per platform.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Currently_installed_mono_version_is_supported_but_upgrading_is_recommended&amp;quot;&amp;gt;'''[[#Currently_installed_mono_version_is_supported_but_upgrading_is_recommended|Currently installed mono version is supported but upgrading is recommended]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Sonarr uses the .Net Framework which Mono implements for your system. We need to build Sonarr against the lowest supported version still used by our users. Upgrading to newer versions allows us to build against newer versions and use new Framework features.&lt;br /&gt;
** The upgrade procedure for Mono varies per platform.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;New_update_is_available&amp;quot;&amp;gt;'''[[#New_update_is_available|New update is available]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Rejoice, the developers have released a new update. This generally means awesome new features and squashed piles of bugs (right?). Apparently you don't have Auto-Updating enabled, so you'll have to figure out how to update on your platform. Pressing the Install button on the System -&amp;amp;gt; Updates page is probably a good starting point. But while you're at it, read the change log to find out what the relevant changes were.&lt;br /&gt;
** ''(This warning will not appear if your current version is less than 14 days old)''&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Cannot_install_update_because_startup_folder_is_not_writable_by_the_user&amp;quot;&amp;gt;'''[[#Cannot_install_update_because_startup_folder_is_not_writable_by_the_user|Cannot install update because startup folder is not writable by the user]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** This means Sonarr will be unable to update itself. You'll have to update Sonarr manually or set the permissions on Sonarr's Startup directory (the installation directory) to allow Sonarr to update itself.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Updating_will_not_be_possible_to_prevent_deleting_AppData_on_Update&amp;quot;&amp;gt;'''[[#Updating_will_not_be_possible_to_prevent_deleting_AppData_on_Update|Updating will not be possible to prevent deleting AppData on Update]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
**Sonarr detected that AppData folder for your Operating System is located inside the directory that contains the Sonarr binaries. Normally it would be &amp;lt;code&amp;gt;C:\ProgramData&amp;lt;/code&amp;gt; for Windows and, &amp;lt;code&amp;gt;~/.config&amp;lt;/code&amp;gt; for linux.&amp;lt;br /&amp;gt;&lt;br /&gt;
** Please look at System -&amp;amp;gt; About to see the current AppData &amp;amp;amp; Startup directories.&lt;br /&gt;
** This means Sonarr will be unable to update itself without risking data-loss.&lt;br /&gt;
** If you're on linux, you'll probably have to change the home directory for the user that is running Sonarr and copy the current contents of the &amp;lt;code&amp;gt;~/.config/Sonarr&amp;lt;/code&amp;gt; directory to preserve your database.&lt;br /&gt;
&amp;lt;section end=sonarr_system_status_health_system_warnings /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Lidarr =====&lt;br /&gt;
&amp;lt;section begin=lidarr_system_status_health_system_warnings /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=lidarr_system_status_health_system_warnings /&amp;gt;&lt;br /&gt;
===== Readarr =====&lt;br /&gt;
&amp;lt;section begin=readarr_system_status_health_system_warnings /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=readarr_system_status_health_system_warnings /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Download Clients ====&lt;br /&gt;
===== Radarr =====&lt;br /&gt;
&amp;lt;section begin=radarr_system_status_health_download_clients /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;no_download_client_is_available&amp;gt;'''[[#no_download_client_is_available|No download client is available]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** A properly configured and enabled download client is required for Radarr to be able to download media. Since Radarr supports different download clients, you should determine which best matches your requirements. If you already have a download client installed, you should configure Radarr to use it and create a category. See Settings -&amp;amp;gt; Download Client.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;unable-to-communicate-with-download-client&amp;quot;&amp;gt;'''[[#unable-to-communicate-with-download-client|Unable to communicate with download client]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Radarr was unable to communicate with the configured download client. Please verify if the download client is operational and double check the url. This could also indicate an authentication error.&lt;br /&gt;
** This is typically due to improperlly configured download client. Things you can typically check:&lt;br /&gt;
*** Your download clients IP Address if its on the same bare metal machien this is typically &amp;lt;code&amp;gt;127.0.0.1&amp;lt;/code&amp;gt;&lt;br /&gt;
*** The Port number of that your download client is using these are filled out with the default port number but if you've changed it you'll need to have the same one entered into Radarr.&lt;br /&gt;
*** Ensure SSL encryption is not turned on if you're using both your Radarr instance and your download client on a local network. See [[Radarr FAQ#Invalid Certificate and other HTTPS or SSL issues|here]] for more information on this one in our FAQ.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Download_clients_are_unavailable_due_to_failure&amp;quot;&amp;gt;'''[[#Download_clients_are_unavailable_due_to_failure|Download clients are unavailable due to failure]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** One or more of your download clients is not responding to requests made by Radarr. Therefore Radarr has decided to temporarily stop querying the download client on it’s normal 1 minute cycle, which is normally used to track active downloads and import finished ones. However, Radarr will continue to attempt to send downloads to the client, but will in all likeliness fail.&lt;br /&gt;
** You should inspect System-&amp;amp;gt;Logs to see what the reason is for the failures.&lt;br /&gt;
** If you no longer use this download client, disable it in Radarr to prevent the errors.&lt;br /&gt;
*  &amp;lt;span id=&amp;quot;enable_complete_download_handling&amp;quot;&amp;gt;'''[[#enable_complete_download_handling|Enable Completed Download Handling]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Radarr requires Completed Download Handling to be able to import files that were downloaded by the download client. It is recommended to enable Completed Download Handling.&lt;br /&gt;
** ''(Completed Download Handling is enabled by default for new users.)''&lt;br /&gt;
* &amp;lt;span id=&amp;quot;docker-bad-remote-path-mapping&amp;quot;&amp;gt;'''[[#docker-bad-remote-path-mapping|Docker bad remote path mapping]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** This error is typically associated with bad docker paths within either your download client or Radarr&lt;br /&gt;
*** An example of this would be:&lt;br /&gt;
**** Download client: &amp;lt;code&amp;gt;Download Path: /downloads:/mnt/user/downloads&amp;lt;/code&amp;gt;&lt;br /&gt;
**** Radarr: &amp;lt;code&amp;gt;Download Path: /data:/mnt/user/downloads&amp;lt;/code&amp;gt;&lt;br /&gt;
**** Within this example the download client places its downloads into &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; and therefore tells Radarr when its complete that the finished movie is in &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt;. Radarr then comes along and says &amp;quot;Okay, cool, let me check in &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt;&amp;quot; Well, inside Radarr you did not allocate a &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; path you allocated a &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; path so it throws this error.&lt;br /&gt;
**** The easiest fix for this is  '''CONSISTENCY''' if you use one scheme in your download client, use it across the board.&lt;br /&gt;
**** Team Radarr is a big fan of simply using &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt;.&lt;br /&gt;
***** Download client: &amp;lt;code&amp;gt;/data:/mnt/user/data&amp;lt;/code&amp;gt;&lt;br /&gt;
***** Radarr: &amp;lt;code&amp;gt;/data:/mnt/user/data&amp;lt;/code&amp;gt;&lt;br /&gt;
***** Now within the download client you can specify where in &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; you'd like to place your downloads, now this varies depending on the client but you should be able to tell it &amp;quot;Yeah download client place my files into.&amp;quot; &amp;lt;code&amp;gt;/data/torrents (or usenet)/movies&amp;lt;/code&amp;gt; and since you used &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; in Radarr when the download client tells Radarr it's done Radarr will come along and say &amp;quot;Sweet, I have a &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; and I also can see &amp;lt;code&amp;gt;/torrents (or usenet)/movies&amp;lt;/code&amp;gt; all is right in the world.&amp;quot;&lt;br /&gt;
*** There are many great write ups by some very talented people one on our wiki [[Docker Guide]] and the other by TRaSH with his [https://trash-guides.info/Misc/how-to-set-up-hardlinks-and-atomic-moves/ How To Set Up Hardlinks and Atomic-Moves] Now these guides place heavy emphasis on Hardlinks and Atomic moves (if you're using torrents you SERIOUSLY need to be using this) but the general concept of containers and how path mapping works is the core of these discussions.&lt;br /&gt;
&amp;lt;section end=radarr_system_status_health_download_clients /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Sonarr =====&lt;br /&gt;
&amp;lt;section begin=sonarr_system_status_health_download_clients /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;No_download_client_is_available&amp;quot;&amp;gt;'''[[#No_download_client_is_available|No download client is available]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** A properly configured and enabled download client is required for Sonarr to be able to download media. Since Sonarr supports different download clients, you should determine which best matches your requirements. If you already have a download client installed, you should configure Sonarr to use it and create a category. See Settings -&amp;amp;gt; Download Client.&lt;br /&gt;
*&amp;lt;span id=&amp;quot;unable-to-communicate-with-download-client&amp;quot;&amp;gt;'''[[#unable-to-communicate-with-download-client|Unable to communicate with download client]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Sonarr was unable to communicate with the configured download client. Please verify if the download client is operational and double check the url. This could also indicate an authentication error.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Download_clients_are_unavailable_due_to_failure&amp;quot;&amp;gt;'''[[#Download_clients_are_unavailable_due_to_failure|Download clients are unavailable due to failure]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** One or more of your download clients is not responding to requests made by Sonarr. Therefore Sonarr has decided to temporarily stop querying the download client on it's normal 1 minute cycle, which is normally used to track active downloads and import finished ones. However, Sonarr will continue to attempt to send downloads to the client, but will in all likeliness fail.&lt;br /&gt;
** You should inspect System-&amp;amp;gt;Logs to see what the reason is for the failures.&lt;br /&gt;
** If you no longer use this download client, disable it in Sonarr to prevent the errors.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Enable_Completed_Download_Handling_or_configure_Drone_Factory&amp;quot;&amp;gt;'''[[#Enable_Completed_Download_Handling_or_configure_Drone_Factory|Enable Completed Download Handling or configure Drone Factory]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Sonarr requires Completed Download Handling or a properly configured Drone Factory to be able to import files that were downloaded by the download client. It is recommended to enable Completed Download Handling.&lt;br /&gt;
** ''(Completed Download Handling is enabled by default for new users.)''&lt;br /&gt;
&amp;lt;section end=sonarr_system_status_health_download_clients /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Lidarr =====&lt;br /&gt;
&amp;lt;section begin=lidarr_system_status_health_download_clients /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=lidarr_system_status_health_download_clients /&amp;gt;&lt;br /&gt;
===== Readarr =====&lt;br /&gt;
&amp;lt;section begin=readarr_system_status_health_download_clients /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=readarr_system_status_health_download_clients /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Completed/Failed Download Handling ====&lt;br /&gt;
===== Radarr =====&lt;br /&gt;
&amp;lt;section begin=radarr_system_status_health_complete_failed_download_handling /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Completed_Download_Handling_is_disabled&amp;quot;&amp;gt;'''[[#Completed_Download_Handling_is_disabled|Completed Download Handling is disabled]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** ''(This warning is only generated for existing users before when the Completed Download Handling feature was implemented. This feature is disabled by default to ensure the system continued to operate as expected for current configurations.)''&lt;br /&gt;
** It’s recommended to switch to Completed Download Handling since it provides better compatibility for the unpacking and post-processing logic of various download clients. With it, Radarr will only import a download once the download client reports it as ready.&lt;br /&gt;
** If you don’t wish to enable Completed Download Handling at all and wants to remove the warning. You can enable and then disable Completed Download Handling. This obviously isn’t recommended.&lt;br /&gt;
** If you wish to enable Completed Download Handling you should verify the following: * '''Warning''': Completed Download Handling only works properly if the download client and Radarr are on the same machine since it gets the path to be imported directly from the download client. * If you added a post-processing script to Sabnzbd/NzbGet to notify Radarr that it should scan the Drone Factory. You ''SHOULD'' disable this script to prevent conflicts. * Completed Download Handling and the Drone Factory cannot be configured for the same directory. If Completed Download Handling detects a download resides in the Drone Factory it will be ignored. (again to prevent conflicts)&amp;lt;br /&amp;gt;&lt;br /&gt;
** You should reconfigure Radarr to use a different Drone Factory Folder or disable it altogether.&amp;lt;br /&amp;gt;&lt;br /&gt;
** Alternatively you can change the output folder for the Category, as long as that output folder is not a subdirectory of the Drone Factory Folder.&lt;br /&gt;
** Both Completed Download Handling and the Drone Factory logic generates Import Events in history while importing files. However, only Completed Download Handling associates this Import event with a Download Client history item. If Completed Download Handling was enabled recently, your download client may still contain history items that were already imported but do not have a history event with the same unique id. Radarr attempts to resolve this issue automatically, occassionally Radarr may be unable to make that association and cause a ‘Completed’ download to be listed in the History -&amp;amp;gt; Queue table forever. The easiest way to resolve this is to clear your Download Client history, or only those individual items. Alternatively you can rename the category.&lt;br /&gt;
&amp;lt;section end=radarr_system_status_health_complete_failed_download_handling /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Sonarr =====&lt;br /&gt;
&amp;lt;section begin=sonarr_system_status_health_complete_failed_download_handling /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Completed_Download_Handling_is_disabled&amp;quot;&amp;gt;'''[[#Completed_Download_Handling_is_disabled|Completed Download Handling is disabled]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
**''(This warning is only generated for existing users before when the Completed Download Handling feature was implemented. This feature is disabled by default to ensure the system continued to operate as expected for current configurations.)''&lt;br /&gt;
** It's recommended to switch to Completed Download Handling since it provides better compatibility for the unpacking and post-processing logic of various download clients. With it, Sonarr will only import a download once the download client reports it as ready.&lt;br /&gt;
** If you don't wish to enable Completed Download Handling at all and wants to remove the warning. You can enable and then disable Completed Download Handling. This obviously isn't recommended.&lt;br /&gt;
** If you wish to enable Completed Download Handling you should verify the following:&lt;br /&gt;
*** '''Warning''': Completed Download Handling only works properly if the download client and Sonarr are on the same machine since it gets the path to be imported directly from the download client.&lt;br /&gt;
*** If you added a post-processing script to Sabnzbd/NzbGet to notify Sonarr that it should scan the Drone Factory. You ''SHOULD'' disable this script to prevent conflicts.&lt;br /&gt;
*** Completed Download Handling and the Drone Factory cannot be configured for the same directory. If Completed Download Handling detects a download resides in the Drone Factory it will be ignored. (again to prevent conflicts)&amp;lt;br /&amp;gt;&lt;br /&gt;
Alternatively you can change the output folder for the Category, as long as that output folder is not a subdirectory of the Drone Factory Folder.&lt;br /&gt;
** Both Completed Download Handling and the Drone Factory logic generates Import Events in history while importing files. However, only Completed Download Handling associates this Import event with a Download Client history item. If Completed Download Handling was enabled recently, your download client may still contain history items that were already imported but do not have a history event with the same unique id. Sonarr attempts to resolve this issue automatically, occassionally Sonarr may be unable to make that association and cause a 'Completed' download to be listed in the History -&amp;amp;gt; Queue table forever. The easiest way to resolve this is to clear your Download Client history, or only those individual items. Alternatively you can rename the category.&lt;br /&gt;
&amp;lt;section end=sonarr_system_status_health_complete_failed_download_handling /&amp;gt;&lt;br /&gt;
===== Lidarr =====&lt;br /&gt;
&amp;lt;section begin=lidarr_system_status_health_complete_failed_download_handling /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=lidarr_system_status_health_complete_failed_download_handling /&amp;gt;&lt;br /&gt;
===== Readarr =====&lt;br /&gt;
&amp;lt;section begin=readarr_system_status_health_complete_failed_download_handling /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=readarr_system_status_health_complete_failed_download_handling /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Indexers ====&lt;br /&gt;
===== Radarr =====&lt;br /&gt;
&amp;lt;section begin=radarr_system_status_health_indexers /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;No_indexers_are_enabled&amp;quot;&amp;gt;'''[[#No_indexers_are_enabled|No indexers are enabled]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Radarr requires indexers to be able to discover new releases. Please read the wiki on instructions how to add indexers.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Enabled_indexers_do_not_support_searching&amp;quot;&amp;gt;'''[[#Enabled_indexers_do_not_support_searching|Enabled indexers do not support searching]]''' &amp;lt;/span&amp;gt;&lt;br /&gt;
** None of the indexers you have enabled support searching. This means Radarr will only be able to find new releases via the RSS feeds. But searching for movies (either Automatic Search or Manual Search) will never return any results. Obviously, the only way to remedy it is to add another indexer.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Indexers_are_unavailable_due_to_failures&amp;quot;&amp;gt;'''[[#Indexers_are_unavailable_due_to_failures|Indexers are unavailable due to failures]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Errors occurs while Radarr tried to use one of your indexers. To limit retries, Radarr will not use the indexer for an increasing amount of time (up to 24h).&lt;br /&gt;
** This mechanism is triggered if Radarr was unable to get a response from the indexer (could be dns, connection, authentication or indexer issue), or unable to fetch the nzb/torrent file from the indexer. Please inspect the logs to determine what kind of error causes the problem.&lt;br /&gt;
** You can prevent the warning by disabling the affected indexer.&lt;br /&gt;
** Run the Test on the indexer to force Radarr to recheck the indexer, please note that the Health Check warning will not always disappear immediately.&lt;br /&gt;
&amp;lt;section end=radarr_system_status_health_indexers /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Sonarr =====&lt;br /&gt;
&amp;lt;section begin=sonarr_system_status_health_indexers /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;No_indexers_are_enabled&amp;quot;&amp;gt;'''[[#No_indexers_are_enabled|No indexers are enabled]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Sonarr requires indexers to be able to discover new releases. Please read the wiki on instructions how to add indexers.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Enabled_indexers_do_not_support_searching&amp;quot;&amp;gt;'''[[#Enabled_indexers_do_not_support_searching|Enabled indexers do not support searching]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** None of the indexers you have enabled support searching. This means Sonarr will only be able to find new releases via the RSS feeds. But searching for episodes (either Automatic Search or Manual Search) will never return any results. Obviously, the only way to remedy it is to add another indexer.&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Indexers_are_unavailable_due_to_failures&amp;quot;&amp;gt;'''[[#Indexers_are_unavailable_due_to_failures|Indexers are unavailable due to failures]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** Errors occurs while Sonarr tried to use one of your indexers. To limit retries, Sonarr will not use the indexer for an increasing amount of time (up to 24h).&amp;lt;br /&amp;gt;&lt;br /&gt;
** This mechanism is triggered if Sonarr was unable to get a response from the indexer (could be dns, connection, authentication or indexer issue), or unable to fetch the nzb/torrent file from the indexer. Please inspect the logs to determine what kind of error causes the problem.&lt;br /&gt;
** You can prevent the warning by disabling the affected indexer.&lt;br /&gt;
**Run the Test on the indexer to force Sonarr to recheck the indexer, please note that the Health Check warning will not always disappear immediately.&lt;br /&gt;
&amp;lt;section end=sonarr_system_status_health_indexers /&amp;gt;&lt;br /&gt;
===== Lidarr =====&lt;br /&gt;
&amp;lt;section begin=lidarr_system_status_health_indexers /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=lidarr_system_status_health_indexers /&amp;gt;&lt;br /&gt;
===== Readarr =====&lt;br /&gt;
&amp;lt;section begin=readarr_system_status_health_indexers /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=readarr_system_status_health_indexers /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Folders ====&lt;br /&gt;
===== Radarr =====&lt;br /&gt;
&amp;lt;section begin=radarr_system_status_health_folders /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Missing_root_folder&amp;quot;&amp;gt;'''[[#Missing_root_folder|Missing root folder]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** This message may appear if a previous root folder is no longer used. To remove old root folders:&lt;br /&gt;
*** Begin adding a new Movie* by searching for a name, but do not submit&lt;br /&gt;
*** In the 'Path' dropdown, select 'Add a different path'&lt;br /&gt;
*** Click the cross at the end of a row to remove the unused path&lt;br /&gt;
** Note - if the folder has been removed from the operating system, you will need to recreate the folder in the operating system, and restart Radarr, or else you will not be able to select it from the dropdown box. After that you can remove the path from the operating system.&lt;br /&gt;
** The message will continue to appear until all movies have their root folder updated to the new root folder. To change the root folder for other movies, visit the movies editor.&lt;br /&gt;
*** NB: I thought Radarr was for Movies and not Series&lt;br /&gt;
&amp;lt;section end=radarr_system_status_health_folders /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Sonarr =====&lt;br /&gt;
&amp;lt;section begin=sonarr_system_status_health_folders /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Missing root folder&amp;quot;&amp;gt;'''[[#Missing root folder|Missing root folder]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** This message may appear if a previous root folder is no longer used. To remove old root folders:&lt;br /&gt;
**# Begin adding a new Series by searching for a name, but do not submit&lt;br /&gt;
**# In the 'Path' dropdown, select 'Add a different path'&lt;br /&gt;
**# Click the cross at the end of a row to remove the unused path&lt;br /&gt;
** Note - if the folder has been removed from the operating system, you will need to recreate the folder in the operating system, and restart Sonarr, or else you will not be able to select it from the dropdown box. After that you can remove the path from the operating system.&lt;br /&gt;
** The message will continue to appear until all series have their root folder updated to the new root folder. To change the root folder for other series, visit the series editor.&lt;br /&gt;
&amp;lt;section end=sonarr_system_status_health_folders /&amp;gt;&lt;br /&gt;
===== Lidarr =====&lt;br /&gt;
&amp;lt;section begin=lidarr_system_status_health_folders /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=lidarr_system_status_health_folders /&amp;gt;&lt;br /&gt;
===== Readarr =====&lt;br /&gt;
&amp;lt;section begin=readarr_system_status_health_folders /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=readarr_system_status_health_folders /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Media ====&lt;br /&gt;
===== Radarr =====&lt;br /&gt;
&amp;lt;section begin=radarr_system_status_health_media /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Movie was removed from TMDb&amp;quot;&amp;gt;'''[[#Movie was removed from TMDb|Movie was removed from TMDb]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** The movie is linked to a TMDbId that was deleted from TMDb, usually because it was a duplicate, wasn't a movie or changed ID for some other reason. Deleted movies will not receive any updates and should be corrected by the user to ensure continued functionality. Remove the movie from Radarr w/o deleting the files, then try to re-add it. If it doesn't show up in a search, check Sonarr because it might be a TV miniseries like Stephen King's It.&amp;lt;br /&amp;gt;&lt;br /&gt;
** You can find and edit deleted movies by creating a custom filter using the following steps: 1. Click Movies from the left menu 2. Click the dropdown on Filter and select “Custom Filter” 3. Enter a label, for example “Deleted Movies” 4. Make the filter as follows: Status is Deleted 5. Click save and select the newly created filter from the filter dropdown menu&lt;br /&gt;
&amp;lt;section end=radarr_system_status_health_media /&amp;gt;&lt;br /&gt;
===== Sonarr =====&lt;br /&gt;
&amp;lt;section begin=sonarr_system_status_health_media /&amp;gt;&lt;br /&gt;
* &amp;lt;span id=&amp;quot;Series_Removed_from_TheTVDB&amp;quot;&amp;gt;'''[[#Series_Removed_from_TheTVDB|Series Removed from TheTVDB]]'''&amp;lt;/span&amp;gt;&lt;br /&gt;
** The affected series were removed from TheTVDB, this usually happens because it is a duplicate or considered part of a different series. To correct you will need to remove the affected series and add the correct series.&lt;br /&gt;
&amp;lt;section end=sonarr_system_status_health_media /&amp;gt;&lt;br /&gt;
===== Lidarr =====&lt;br /&gt;
&amp;lt;section begin=lidarr_system_status_health_media /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=lidarr_system_status_health_media /&amp;gt;&lt;br /&gt;
===== Readarr =====&lt;br /&gt;
&amp;lt;section begin=readarr_system_status_health_media /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=readarr_system_status_health_media /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Disk Space ===&lt;br /&gt;
==== Radarr ====&lt;br /&gt;
&amp;lt;section begin=radarr_system_status_disk_space /&amp;gt;&lt;br /&gt;
* This section will show you available disk space&lt;br /&gt;
** In docker this can be tricky as it will typically show you the available space w/in your Docker image&lt;br /&gt;
&amp;lt;section end=radarr_system_status_disk_space /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Sonarr ====&lt;br /&gt;
&amp;lt;section begin=sonarr_system_status_disk_space /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=sonarr_system_status_disk_space /&amp;gt;&lt;br /&gt;
==== Lidarr ====&lt;br /&gt;
&amp;lt;section begin=lidarr_system_status_disk_space /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=lidarr_system_status_disk_space /&amp;gt;&lt;br /&gt;
==== Readarr ====&lt;br /&gt;
&amp;lt;section begin=readarr_system_status_disk_space /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=readarr_system_status_disk_space /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== About ===&lt;br /&gt;
==== Radarr ====&lt;br /&gt;
&amp;lt;section begin=radarr_system_status_about /&amp;gt;&lt;br /&gt;
This will tell you about your current install of Radarr&lt;br /&gt;
&amp;lt;section end=radarr_system_status_about /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Sonarr ====&lt;br /&gt;
&amp;lt;section begin=sonarr_system_status_about /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=sonarr_system_status_about /&amp;gt;&lt;br /&gt;
==== Lidarr ====&lt;br /&gt;
&amp;lt;section begin=lidarr_system_status_about /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=lidarr_system_status_about /&amp;gt;&lt;br /&gt;
==== Readarr ====&lt;br /&gt;
&amp;lt;section begin=readarr_system_status_about /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=readarr_system_status_about /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== More Info ===&lt;br /&gt;
==== Radarr ====&lt;br /&gt;
&amp;lt;section begin=radarr_system_status_more_info /&amp;gt;&lt;br /&gt;
* Home page: [https://radarr.video Radarr's home page]&lt;br /&gt;
* Discord: [https://discord.gg/r5wJPt9 Join our discord]&lt;br /&gt;
* Wiki: [https://wiki.servarr.com You're here already]&lt;br /&gt;
* Donations: If you're feeling generous and would like to donate click [https://opencollective.com/radarr here]&lt;br /&gt;
* Source: [https://github.com/Radarr/Radarr Github]&lt;br /&gt;
* Feature Requests: Got as great idea drop it [https://github.com/Radarr/Radarr/issues here]&lt;br /&gt;
&amp;lt;section end=radarr_system_status_more_info /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Sonarr ====&lt;br /&gt;
&amp;lt;section begin=sonarr_system_status_more_info /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=sonarr_system_status_more_info /&amp;gt;&lt;br /&gt;
==== Lidarr ====&lt;br /&gt;
&amp;lt;section begin=lidarr_system_status_more_info /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=lidarr_system_status_more_info /&amp;gt;&lt;br /&gt;
==== Readarr ====&lt;br /&gt;
&amp;lt;section begin=readarr_system_status_more_info /&amp;gt;&lt;br /&gt;
Text&lt;br /&gt;
&amp;lt;section end=readarr_system_status_more_info /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Templates ===&lt;/div&gt;</summary>
		<author><name>Fryfrog</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Troubleshooting&amp;diff=2181</id>
		<title>Template:Troubleshooting</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Troubleshooting&amp;diff=2181"/>
		<updated>2020-11-24T18:47:27Z</updated>

		<summary type="html">&lt;p&gt;Fryfrog: /* Troubleshooting Downloads and Importing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;templatedata&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;params&amp;quot;: {&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Name of the Application&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARR_DISCORD&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the ARR #support Discord&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;url&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARR_WEBSITE&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the ARR Website&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;url&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARR_LATEST_RELEASE&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the ARR Download&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;url&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
----&lt;br /&gt;
Please note that this information is only for &amp;lt;span style=&amp;quot;color:#ff0000&amp;quot;&amp;gt;{{{ARRNAME}}} {{{VERSION}}}&amp;lt;/span&amp;gt;.&lt;br /&gt;
=== Asking for Help ===&lt;br /&gt;
----&lt;br /&gt;
Do you need help? That's okay, everyone needs help sometimes. You can get real time help via chat on [{{{ARR_DISCORD}}} Discord] or [https://www.reddit.com/r/{{{ARRNAME}}} Reddit].&lt;br /&gt;
&lt;br /&gt;
But before you go there and post, be sure your request for help is the best it can be. Clearly describe the problem and briefly describe your setup, including things like your OS/distribution, version of Mono (if not Windows and not .Netcore), version of {{{ARRNAME}}}, download client and its version. '''If you are using [https://www.docker.com/ Docker] please run through [[Docker Guide|the Docker Guide]] first as that will solve common and frequent path/permissions issues.  Otherwise please have a [[Docker Guide#Docker-compose|docker compose]] handy'''  Tell us about what you've tried already, what you've looked at. Use the Logging and Log Files to turn your logging up to trace, recreate the issue, pastebin the relevant context and include a link to it in your post. Maybe even include some screen shots to highlight the issue.&lt;br /&gt;
&lt;br /&gt;
The more we know, the easier it is to help you.&lt;br /&gt;
&lt;br /&gt;
== Logging and Log Files ==&lt;br /&gt;
&lt;br /&gt;
==== Location ====&lt;br /&gt;
The log files are located in {{{ARRNAME}}}'s [[{{{ARRNAME}}} Appdata Directory|Appdata Directory]], inside the logs/ folder. You can also access the log files from the {{{ARRNAME}}} UI at System -&amp;gt; Logs -&amp;gt; Files.&lt;br /&gt;
&lt;br /&gt;
Note: The Logs Table in the UI is not the same as the log files and isn't as useful. If you're asked for logs, please copy/paste from the log files and not the table.&lt;br /&gt;
&lt;br /&gt;
==== Sharing Logs ====&lt;br /&gt;
The logs can be long and hard to read as part of a forum or [https://www.reddit.com/r/{{{ARRNAME}}} Reddit] post and they're spammy in [{{{ARR_DISCORD}}} Discord], so please use a [https://pastebin.com Pastebin]. The whole file typically isn't needed, just a good amount of context from before and after the issue/error. Don't forget to wait for spammy tasks like the RSS sync or library refresh to finish.&lt;br /&gt;
&lt;br /&gt;
==== Trace/Debug Logs ====&lt;br /&gt;
&lt;br /&gt;
You can change the log level at Settings -&amp;gt; General -&amp;gt; Logging. {{{ARRNAME}}} does not need to restarted for the change to take effect. This change only effects the log files, not the logging database. The latest debug/trace log files are named &amp;lt;code&amp;gt;{{{ARRNAME}}}.debug.txt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;{{{ARRNAME}}}r.trace.txt&amp;lt;/code&amp;gt; respectively.&lt;br /&gt;
&lt;br /&gt;
If you're unable to access the {{{ARRNAME}}} UI to set the logging level you can do so by editing config.xml in the AppData directory by setting the LogLevel value to Debug or Trace instead of Info.&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 2em;&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;lt;Config&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;LogLevel&amp;gt;debug&amp;lt;/LogLevel&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
 &amp;lt;/Config&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Clearing Logs ====&lt;br /&gt;
&lt;br /&gt;
You can clear log files and the logs database directly from the UI, under System -&amp;gt; Logs -&amp;gt; Files and System -&amp;gt; Logs -&amp;gt; Delete (Trash Can Icon)&lt;br /&gt;
&lt;br /&gt;
==== Multiple Log Files ====&lt;br /&gt;
&lt;br /&gt;
{{{ARRNAME}}} uses rolling log files limited to 1MB each. The current log file is always ,&amp;lt;code&amp;gt;{{{ARRNAME}}}.txt&amp;lt;/code&amp;gt;, for the the other files &amp;lt;code&amp;gt;{{{ARRNAME}}}.0.txt&amp;lt;/code&amp;gt; is the next newest (the higher the number the older it is) up to 6 log files total. This log file contains fatal,error,warn and info entries.&lt;br /&gt;
&lt;br /&gt;
When Debug log level is enabled, additional &amp;lt;code&amp;gt;{{{ARRNAME}}}.debug.txt&amp;lt;/code&amp;gt; rolling log files will be present, up to 51 files. This log files contains fatal, error, warn, info, and debug entries. It usually covers a 40h period.&lt;br /&gt;
&lt;br /&gt;
When Trace log level is enabled, additional &amp;lt;code&amp;gt;{{{ARRNAME}}}.trace.txt&amp;lt;/code&amp;gt; rolling log files will be present, up to 51 files. This log files contains fatal, error, warn, info, debug, and trace entries. Due to trace verbosity it only covers a couple of hours.&lt;br /&gt;
&lt;br /&gt;
== Recovering from a Failed Update ==&lt;br /&gt;
----&lt;br /&gt;
==== Purpose ====&lt;br /&gt;
We do everything we can to prevent issues when upgrading, but they occur, this will walk you through the steps of recovering your installation.&lt;br /&gt;
&lt;br /&gt;
==== Determine the issue ====&lt;br /&gt;
The best place to look when {{{ARRNAME}}} won't start after an update is your log files, before trying to start {{{ARRNAME}}} again, use [[{{{ARRNAME}}} Settings#Logging|Logging]] and [[{{{ARRNAME}}} System#Log_Files|Log Files]] to find them and increase the log level.&lt;br /&gt;
&lt;br /&gt;
'''Migration Issue'''&lt;br /&gt;
&lt;br /&gt;
Migration errors won't be identical, but here is an example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
14-2-4 18:56:49.5|Info|MigrationLogger|*** 36: update_with_quality_converters migrating ***&lt;br /&gt;
&lt;br /&gt;
14-2-4 18:56:49.6|Error|MigrationLogger|SQL logic error or missing database duplicate column name: Items&lt;br /&gt;
&lt;br /&gt;
While Processing: &amp;quot;ALTER TABLE &amp;quot;QualityProfiles&amp;quot; ADD COLUMN &amp;quot;Items&amp;quot; TEXT&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Resolving the issue ====&lt;br /&gt;
In the event of a migration issue there is not much you can do immediately, if the issue is specific to you (or there are not yet any posts), please create a post on [https://reddit.com/r/{{{ARRNAME}}} our subreddit], if there are others with the same issue, then rest assured we are working on it.&lt;br /&gt;
&lt;br /&gt;
==== Manually upgrading ====&lt;br /&gt;
Grab the latest release from [{{{ARR_WEBSITE}}} our website] - if you're running the develop version you can get the latest release [{{{ARR_LATEST_RELEASE}}} HERE]&lt;br /&gt;
&lt;br /&gt;
Install the update (.exe) or extract (.zip) the contents over your existing installation and re-run {{{ARRNAME}}} as you normally would.&lt;br /&gt;
&lt;br /&gt;
== Downloads and Importing ==&lt;br /&gt;
&lt;br /&gt;
Downloading and importing is where ''most'' people experience issues. From a high level perspective, {{{ARRNAME}}} needs to be able to communicate with your download client and have access to the files it downloads. There is a large variety of supported download clients and an even ''bigger'' variety of setups. This means that while there are some ''common'' setups, there isn’t one ''right'' setup and everyone’s setup can be a little different.&lt;br /&gt;
&lt;br /&gt;
Start by using the [[#Logging and Log Files|logging and log files]] article to turn logging up to trace, it is likely you’re going to need to look at them to figure out what is wrong. And if you can’t, anyone you ask for help will need to see them for sure. Remember to get them from the actual log file, put them in a pastebin and show us context around what we need to see. Nobody wants to dig through the whole trace log (it is huge!), but just a line or two is unlikely to help.&lt;br /&gt;
&lt;br /&gt;
When you reach out for help, be sure to read [[#Asking for Help|asking for help]] so that you can provide us with the details we’ll need.&lt;br /&gt;
&lt;br /&gt;
=== Testing the Download Client ===&lt;br /&gt;
&lt;br /&gt;
Start by testing the download client, if it doesn’t work you’ll be able to see details in the trace level logs. You should find a URL you can put into your browser and see if it works. It could be a connection problem, which could indicate a wrong ip, hostname, port or even a firewall blocking access. It might be obvious, like an authentication problem where you’ve gotten the username, password or apikey wrong.&lt;br /&gt;
&lt;br /&gt;
=== Testing a Download ===&lt;br /&gt;
&lt;br /&gt;
Now we’ll try a download, pick a {{{MEDIA}}} and do a manual search. Pick one of those files and attempt to download it. Does it get sent to the download client? Does it end up with the correct category? Does it show up in Activity? Does it end up in the trace level logs during the '''Check For Finished Download''' task which runs roughly every minute? Does it get correctly parsed during that task? Does the queued up download have a reasonable name? Since {{{ARRNAME}}} searches by '''{{{SEARCHSOURCE}}}''', on most indexers/trackers, it can queue one up with a name that it can’t recognize.&lt;br /&gt;
&lt;br /&gt;
=== Testing an Import ===&lt;br /&gt;
&lt;br /&gt;
Import issues should almost always manifest as an item in Activity with an orange icon you can hover to see the error. If they’re not showing up in Activity, this is the issue you need to focus on first so go back and figure that out. Most import errors are ''permissions'' issues, remember that {{{ARRNAME}}} needs to be able to read and write in the download folder. Sometimes, permissions in the library folder can be at fault too, so be sure to check both.&lt;br /&gt;
&lt;br /&gt;
Incorrect path issues are possible too, though less common in normal setups. The key to understanding path issues is knowing that {{{ARRNAME}}} gets the path to the download ''from'' the download client, via its API. This becomes a problem in more unique use cases, like the download client running on a different system (maybe even OS!). It can also occur in a Docker setup, when volumes are not done well. A remote path map is a good solution where you don’t have control, like a seedbox setup. On a Docker setup, fixing the paths is a better option.&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
==== Can’t see share on Windows ====&lt;br /&gt;
&lt;br /&gt;
The default user for a Windows service is '''SYSTEM''' which typically doesn’t have access to your shares. Edit the service and set it up to run as your own user, see the FAQ entry [[]{{{ARRNAME}}} FAQ#Why can’t {{{ARRNAME}}} see my files on a remote server?|why can’t {{{ARRNAME}}} see my files on a remote server]] for details.&lt;br /&gt;
&lt;br /&gt;
==== Mapped network drives are not reliable ====&lt;br /&gt;
&lt;br /&gt;
While mapped network drives like &amp;lt;code&amp;gt;X:\&amp;lt;/code&amp;gt; are convenient, they aren’t as reliable as UNC paths like &amp;lt;code&amp;gt;\\server\share&amp;lt;/code&amp;gt; and they’re also not available before login. Setup {{{ARRNAME}}} and your download client(s) so that they use UNC paths as needed. If your library is on a share, you’d make sure your root folders are using UNC paths. If your download client sends to a share, that is where you’ll need to configure UNC paths since {{{ARRNAME}}} gets the download path from the download client. It is fine to keep your mapped network drives to use yourself, just don’t use them for automation.&lt;br /&gt;
&lt;br /&gt;
==== Docker and user, group, ownership, permissions and paths ====&lt;br /&gt;
&lt;br /&gt;
Docker adds another layer of complexity that is easy to get wrong, but still end up with a setup that functions, but has various problems. Instead of going over them here, read this wiki article [https://old.reddit.com/r/usenet/wiki/docker for these automation software and Docker] which is all about user, group, ownership, permissions and paths. It isn’t specific to any Docker system, instead it goes over things at a high level so that you can implement them in your own environment.&lt;br /&gt;
&lt;br /&gt;
==== Download client clearing items ====&lt;br /&gt;
&lt;br /&gt;
The download client should ''not'' be responsible for removing downloads. Usenet clients should be configured so they ''don’t'' remove downloads from history. Torrent clients should be setup so they ''don’t'' remove torrents when they’re finished seeding (pause or stop instead). This is because {{{ARRNAME}}} communicates with the download client to know what to import, so if they’re ''removed'' there is nothing to be imported… even if there is a folder full of files.&lt;br /&gt;
&lt;br /&gt;
==== Download folder and library folder not different folders ====&lt;br /&gt;
&lt;br /&gt;
The download client should download into a temporary-ish folder and {{{ARRNAME}}} should import from that into your Library folder. If you download right into your library folder, you’ll end up with multiple copies of episodes and when there are import issues, you may not notice because your media server will see the download client copy. The download folder will also be a hot mess of poorly named folders and files while your library folder will be nice and neat.&lt;br /&gt;
&lt;br /&gt;
==== Incorrect category ====&lt;br /&gt;
&lt;br /&gt;
{{{ARRNAME}}} should be setup to use a category so that it only tries to process its own downloads. It is rare that a torrent submitted by {{{ARRNAME}}} gets added w/o the correct category, but it can happen. If you’re adding torrents manually and want {{{ARRNAME}}} to process them, they’ll need to have the correct category. It can be set at any time, since {{{ARRNAME}}} tries to process downloads every minute.&lt;br /&gt;
&lt;br /&gt;
==== Packed torrents ====&lt;br /&gt;
&lt;br /&gt;
If your torrent is packed in &amp;lt;code&amp;gt;.rar&amp;lt;/code&amp;gt; files, you’ll need to setup extraction. You can typically search your torrent client’s name and “unpack” to find a solution. There are some other interesting solutions in this space, like [https://github.com/davidnewhall/unpackerr unpackerr] and [https://sourceforge.net/projects/rarfs/ rarfs], but they’re more complicated. One issue to look out for with packed torrents is that the video file will be copied or hard linked like normal, but it isn’t needed since the &amp;lt;code&amp;gt;.rar&amp;lt;/code&amp;gt; files are seeding. That means if you’re using a ''copy'' setup, the torrent will be consuming double the space. And if you’re using a hard link setup, your torrent folder will be a little messier because of the unneeded file. This can be mitigated w/ a [https://gist.github.com/fryfrog/94716e7e27ba38dff57c7631d9f58bed cleanup script].&lt;br /&gt;
&lt;br /&gt;
==== Permissions on the destination ====&lt;br /&gt;
&lt;br /&gt;
Don’t forget to check permissions and ownership of the ''destination''. It is easy to get fixated on the download’s ownership and permissions and that is ''usually'' the cause of permissions related issues, but it ''could'' be the destination as well. Check that the destination folder(s) exist. Check that a destination ''file'' doesn’t already exist or can’t be deleted or moved to recycle bin. Check that ownership and permissions allow the downloaded file to be copied, hard linked or moved.&lt;br /&gt;
&lt;br /&gt;
==== Repeated downloads ====&lt;br /&gt;
&lt;br /&gt;
There are a few causes of repeated downloads, but a recent one is related to the Indexer restriction in Release Profiles. Because the indexer ''isn’t'' stored w/ the episode data, any preferred word scores are ''zero'' for episodes in your library, ''but'' during “RSS” and search, they’ll be applied. This gets you into a loop where you download the items again and again because it looks like an upgrade, then isn’t, then shows up again and looks like an upgrade, then isn’t. Don’t restrict your release profile to an indexer. See issue [https://github.com/{{{ARRNAME}}}/{{{ARRNAME}}}/issues/3853 #3853].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Usenet download misses import ====&lt;br /&gt;
&lt;br /&gt;
{{{ARRNAME}}} only looks at the 30 most recent downloads in sabnzbd and nzbget, so if you ''keep'' your history this means that during large queues with import issues, downloads can be silently missed and not imported. The best way to avoid that is to keep your history clear, so that any items that still appear need investigating. You can achieve this by enabling Remove under Completed and Failed Download Handler. In nzbget, this will move items to the ''hidden'' history which is great. Unfortunately, sabnzbd does not have a similar feature. The best you can achieve there is to use the nzb backup folder.&lt;br /&gt;
&lt;br /&gt;
==== qBittorrent 4.3.x ====&lt;br /&gt;
&lt;br /&gt;
This version of qB changed how torrent folder and torrent name relate, previous to this the folder was named after the torrent. Starting in this version, the torrent folder name can be different. There is a [https://github.com/{{{ARRNAME}}}/{{{ARRNAME}}}/pull/3346 pull request] working on solving this, but in the mean time the simplest solution is to stick with 4.2.5 for now. Existing torrents can be fixed by renaming the folder to the name of the torrent.&lt;br /&gt;
&lt;br /&gt;
== Searches Indexers and Trackers ==&lt;br /&gt;
&lt;br /&gt;
=== Turn logging up to trace ===&lt;br /&gt;
&lt;br /&gt;
The first step is to turn logging up to Trace, see [[#Logging and Log Files|Logging and Log Files]] for details. You’ll then reproduce the issue and use the trace level logs from that time frame to examine the issue. If someone is helping you, put context from before/after in a [https://paste.ubuntu.com pastebin] to show them. It doesn’t need to be the whole file and it shouldn’t ''just'' be the error. You should also reproduce the issue while tasks that spam the log file aren’t running.&lt;br /&gt;
&lt;br /&gt;
=== Testing an Indexer or Tracker ===&lt;br /&gt;
&lt;br /&gt;
When you test an indexer or tracker, in debug or trace logs you can find the URL used. An example of a successful test is below, you can see it query the indexer via a specific URL with specific parameters and then the response. You test this url in your browser like &amp;lt;code&amp;gt;{{{QUERYSTRING}}}&amp;lt;/code&amp;gt; replacing the &amp;lt;code&amp;gt;apikey=(removed)&amp;lt;/code&amp;gt; with the correct apikey like &amp;lt;code&amp;gt;apikey=123&amp;lt;/code&amp;gt;. You can experiment with the parameters if you’re getting an error from the indexer or see if you have connectivity issues if it doesn’t even work. After you’ve tested in your own browser, you should test from the system {{{ARRNAME}}} is running on ''if'' you haven’t already.&lt;br /&gt;
&lt;br /&gt;
{{#lst::Troubleshooting Misc|{{{ARRNAME2}}}_indexers_and_trackers_code_block}}&lt;br /&gt;
&lt;br /&gt;
=== Testing a Search ===&lt;br /&gt;
{{#lst::Troubleshooting Misc|{{{ARRNAME2}}}_indexers_and_trackers_testing_a_search}}&lt;br /&gt;
&lt;br /&gt;
[[images/Series.Season.Episode.v3.png]]&lt;br /&gt;
&lt;br /&gt;
[[images/Series.Season.Episode.Search.Manual.png]]&lt;br /&gt;
&lt;br /&gt;
{{#lst::Troubleshooting Misc|{{{ARRNAME2}}}_indexers_and_trackers_code_block2}}&lt;br /&gt;
&lt;br /&gt;
You can find this ''full'' trace log at [[Manual Episode Search Trace Log]] along with a pastebin link that is easier to read.&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
==== Wrong categories ====&lt;br /&gt;
&lt;br /&gt;
Incorrect categories is probably the most common cause of results showing in manual searches of an indexer/tracker, but ''not'' in {{{ARRNAME}}}. The indexer/tracker ''should'' show the category in the search results, which should help you figure out what is missing. If you’re using Jackett, each tracker has a list of specifically supported categories. Make sure you’re using the correct ones for Categories. I find it helpful to have the list visible in one browser window while I edit the entry in {{{ARRNAME}}}.&lt;br /&gt;
{{#lst::Troubleshooting Misc|{{{ARRNAME2}}}_indexers_and_trackers_type}}&lt;br /&gt;
==== Wrong results ====&lt;br /&gt;
&lt;br /&gt;
Sometimes indexers will return completely unrelated results, {{{ARRNAME}}} will feed in parameters to limit the search to a {{{SEARCHSOURCE}}}, but the results returned are completely unrelated. Or sometimes, mostly related with a few incorrect results. The first is usually an indexer problem and you’ll be able to tell from the trace logs which is causing it. You can disable that indexer and report the problem. The other is usually categorized releases which should be reportable on the indexer/tracker.&lt;br /&gt;
&lt;br /&gt;
==== Certificate validation ====&lt;br /&gt;
&lt;br /&gt;
You’ll be connecting to most indexers/trackers via https, so you’ll need that to work properly on your system. That means your time zone and time both need to be set ''correctly''. It also means your system certificates need to be up to date. And if you’re using Mono, &amp;lt;code&amp;gt;MONO_TLS_PROVIDER=legacy&amp;lt;/code&amp;gt; was a fix from ''years'' ago that should ''not'' be used anymore, so make sure you’re not setting that accidentally.&lt;br /&gt;
&lt;br /&gt;
==== Hitting rate limits ====&lt;br /&gt;
&lt;br /&gt;
If you run your {{{ARRNAME}}} through a VPN or proxy, you may be competing with 10s or 100s or 1000s of other people all trying to use services like {{{SEARCHSOURCE}}}, Xem and/or your indexers and trackers. Rate limiting and ddos protection are often done by IP address and your VPN/proxy exit point is ''one'' IP address. Unless you’re in a repressive country like China, Australia or South Africa you don’t need to VPN/proxy your {{{ARRNAME}}}/Radarr.&lt;br /&gt;
&lt;br /&gt;
==== Using the Jackett /all endpoint ====&lt;br /&gt;
&lt;br /&gt;
The Jackett &amp;lt;code&amp;gt;/all&amp;lt;/code&amp;gt; endpoint is convenient, but that is essentially its only benefit. Everything else is potential problems, so adding each tracker individually is preferred. It allows for fine tuning of categories on a per tracker basis, which can be a problem w/ the &amp;lt;code&amp;gt;/all&amp;lt;/code&amp;gt; end point if using the wrong category causes errors on some. In {{{ARRNAME}}}, each indexer/tracker is limited to 1000 results if pagination is supported or 100 if not, which means as you add more and more trackers to Jackett, you’re more and more likely to clip results. Finally, if ''one'' of the trackers in &amp;lt;code&amp;gt;/all&amp;lt;/code&amp;gt; returns an error, {{{ARRNAME}}} will disable it and now you don’t get any results.&lt;br /&gt;
&lt;br /&gt;
=== Errors ===&lt;br /&gt;
&lt;br /&gt;
These are some of the common errors you may see when adding an indexer&lt;br /&gt;
&lt;br /&gt;
==== The underlying connection was closed: An unexpected error occurred on a send. ====&lt;br /&gt;
&lt;br /&gt;
This is caused by the indexer using a SSL protocol not supported by .net 4.5, to resolve this you will need to install .net 4.5, which is available on Vista/Server 2008 and above (if you’re on XP/Server 2003 its time to upgrade).&lt;br /&gt;
&lt;br /&gt;
==== Error getting response stream (Write: The authentication or decryption has failed.): SendFailure ====&lt;br /&gt;
&lt;br /&gt;
This is caused by the indexer using a new certificate authority that is not trusted by mono 2.10. The solution is to upgrade to mono 3.x, on Ubuntu this can be done via this method: http://stackoverflow.com/a/13384233/882971 We recommend upgrading to mono 3.x to fix a number of bugs and add support for .net 4.5 features.&lt;br /&gt;
&lt;br /&gt;
==== The request timed out ====&lt;br /&gt;
&lt;br /&gt;
{{{ARRNAME}}} seems to have issues with certain TLS versions or configurations. If you get the following error messages in your log: &amp;amp;gt; System.Net.WebException: The request timed out: ’https://example.org/api?t=caps&amp;amp;amp;apikey=(removed) —&amp;amp;gt; System.Net.WebException: The request timed out&lt;br /&gt;
&lt;br /&gt;
And you can see the following in the trace logfile: &amp;amp;gt; &amp;amp;lt;DATE&amp;amp;amp;TIME&amp;amp;gt;|Trace|FallbackHttpDispatcher|Curl not available, using default WebClient.&lt;br /&gt;
&lt;br /&gt;
You might fix it by installing libcurl3. On Ubuntu/Debian use &amp;amp;gt; apt install libcurl3&lt;/div&gt;</summary>
		<author><name>Fryfrog</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1345</id>
		<title>Docker Guide</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1345"/>
		<updated>2020-10-07T19:57:09Z</updated>

		<summary type="html">&lt;p&gt;Fryfrog: /* Get docker-compose */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Best Docker Setup ===&lt;br /&gt;
&lt;br /&gt;
'''TL; DR''': An [https://www.lexico.com/en/definition/eponymous eponymous] user per daemon and a shared group with a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. Consistent path definitions between ''all'' containers that maintains the folder structure. Using one volume for Sonarr, Radarr and Lidarr so the download folder and library folder are on the same file system which makes hard links and instant moves possible. And most of all, ignore ''most'' of the Docker image’s path documentation!&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
&lt;br /&gt;
This article will not show you specifics about the best Docker setup, but it describes an overview that you can use to make your own setup the best that it can be. The idea is that you run each docker container as its own user, with a shared group and consistent volumes so every container sees the same path layout. This is easy to say, but difficult to understand and explain.&lt;br /&gt;
&lt;br /&gt;
==== Multiple users and a shared group ====&lt;br /&gt;
&lt;br /&gt;
===== Permissions =====&lt;br /&gt;
&lt;br /&gt;
Ideally, each software runs as its own user user and they’re all part of a shared group with folder permissions set to &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxrwxr-x&amp;lt;/code&amp;gt;) and files set to &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-rw-r--&amp;lt;/code&amp;gt;), which is a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. A sane alternative to this is a single shared user, which would use &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; which is a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt;. You can restrict permissions even more by denying read from “other”, which would be a umask of &amp;lt;code&amp;gt;007&amp;lt;/code&amp;gt; for a user per daemon or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; for a single shared user. For a deeper explanation, try the Arch Linux wiki articles about [https://wiki.archlinux.org/index.php/File_permissions_and_attributes File permissions and attributes] and [https://wiki.archlinux.org/index.php/Umask Umask].&lt;br /&gt;
&lt;br /&gt;
===== UMASK =====&lt;br /&gt;
&lt;br /&gt;
Many docker images accept a &amp;lt;code&amp;gt;-e UMASK=002&amp;lt;/code&amp;gt; environment variable and some software inside can be configured with a user, group and umask (NZBGet) or folder/file permission (Sonarr/Radarr). This will ensure that files and folders created by ''one'' can be read and written by the others. If you’re using existing folders and files, you’ll need to fix their current ownership and permissions too, but going forward they’ll be correct because you set each software up right.&lt;br /&gt;
&lt;br /&gt;
===== PUID and PGID =====&lt;br /&gt;
&lt;br /&gt;
Many docker images also take a &amp;lt;code&amp;gt;-e PUID=123&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-e PGID=321&amp;lt;/code&amp;gt; that lets you change the UID/GID used inside to that of an account on the outside. If you ever peak in, you’ll find that username is something like &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;hotio&amp;lt;/code&amp;gt;, but because it uses the UID/GID you pass in, on the outside it looks like the expected user. If you’re using storage from another system via NFS or CIFS, it will make your life easier if ''that'' system also has matching users and group. Perhaps let one system pick the UID/GIDs, then re-use those on the other system, assuming they don’t conflict.&lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
&lt;br /&gt;
You run [https://github.com/Sonarr/Sonarr/releases Sonarr] using [https://github.com/hotio/docker-sonarr hotio/sonarr], you’ve created a &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user with uid &amp;lt;code&amp;gt;123&amp;lt;/code&amp;gt; and a shared group &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; with gid &amp;lt;code&amp;gt;321&amp;lt;/code&amp;gt; which the &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user is a member of. You configure the Docker image to run with &amp;lt;code&amp;gt;-e PUID=123 -e PGID=321 -e UMASK=002&amp;lt;/code&amp;gt;. Sonarr also lets you configured user, group as well as folder and file permissions. The previous settings should negate these, but you could configure them if you wanted. Folders would be &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt;, files &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; and the user/group are a little tricky because ''inside'' the container, they have a different name. Maybe &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt;. I’d leave all these blank unless you find you need them for some reason.&lt;br /&gt;
&lt;br /&gt;
==== Single user and optional shared group ====&lt;br /&gt;
&lt;br /&gt;
Another popular and arguably easier option is a single, shared user. Perhaps even ''your'' user. It isn’t as secure and doesn’t follow best practices, but in the end it is easier to understand and implement. The UMASK for this is &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; which results in &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxr-xr-x&amp;lt;/code&amp;gt;) for folders and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-r--r--&amp;lt;/code&amp;gt;) for files. The group no longer really matters, so you’ll probably just use the group named after the user. This does make it harder to share with ''other'' users, so you may still end up wanting a UMASK of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt; even w/ this setup.&lt;br /&gt;
&lt;br /&gt;
==== Ownership and permissions of /config ====&lt;br /&gt;
&lt;br /&gt;
Don’t forget that your &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; volume will ''also'' need to have correct ownership and permissions, usually the daemon’s user and that user’s group like &amp;lt;code&amp;gt;sonarr:sonarr&amp;lt;/code&amp;gt; and a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; so ''only'' that user has access. In a single user setup, this would of course be the one user you’ve chosen.&lt;br /&gt;
&lt;br /&gt;
==== Consistent and well planned paths ====&lt;br /&gt;
&lt;br /&gt;
The easiest and most important detail is to create unified path definitions across all the containers.&lt;br /&gt;
&lt;br /&gt;
If you’re wondering why hard links aren’t working or why a simple move is taking far longer than it should, this section explains it. The paths you use on the ''inside'' matter. Because of how Docker’s volumes work, passing in two volumes such as the commonly suggested &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; makes them look like two file systems, even if they aren’t. This means hard links won’t work ''and'' instead of an instant move, a slower and more io intensive copy + delete is used. If you have multiple download clients because you’re using torrents and usenet, having a single &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; path means they’ll be mixed up. Because the Radarr in one container will ask the NZBGet in its own container where files are, using the same path in both means it will all just work. If you don’t, you’d need to fix it with a remote path map.&lt;br /&gt;
&lt;br /&gt;
So pick ''one'' path layout and use it for all of them. I’m a fan of &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt;, but there are other great names like &amp;lt;code&amp;gt;/shared&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/dvr&amp;lt;/code&amp;gt;. If this can be the same on the outside ''and'' inside, your setup will be simpler: one path to remember or if integrating docker and native software. But if not, that’s fine too. For example, Synology might use &amp;lt;code&amp;gt;/Volume1/data&amp;lt;/code&amp;gt; and unRAID might use &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt; on the outside, but &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; on the inside is fine.&lt;br /&gt;
&lt;br /&gt;
It is also important to remember that you’ll need to setup or re-configure paths in the software running ''inside'' these Docker containers. If you change the paths for your download client, you’ll need to edit its settings to match. If you change your library path, you’ll need to change those settings in Sonarr, Radarr, Lidarr and/or Plex.&lt;br /&gt;
&lt;br /&gt;
===== Examples =====&lt;br /&gt;
&lt;br /&gt;
What matters here is the general structure, not the names. You are free to pick folder names that make sense to you. And there are other ways of arranging things too. For example, you’re not likely to download and run into conflicts of identical releases between usenet and torrents, so you ''could'' put both in &amp;lt;code&amp;gt;/data/downloads/{movies|music|tv}&amp;lt;/code&amp;gt; folders. Downloads don’t even have to be sorted into sub-folders either, since movies, music and tv will rarely conflict.&lt;br /&gt;
&lt;br /&gt;
This example &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; folder has nicely named &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; sub-folders, this is your library and what you’d pass to Plex or Emby.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
The path for each Docker container can be as specific as needed while still maintaining the correct structure:&lt;br /&gt;
&lt;br /&gt;
====== Torrents ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── torrents&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Torrents only needs access to torrent files, so pass it &amp;lt;code&amp;gt;-v /host/data/torrents:/data/torrents&amp;lt;/code&amp;gt;. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/torrents/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Usenet ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── usenet&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Usenet only needs access to usenet files, so pass it &amp;lt;code&amp;gt;-v /host/data/usenet:/data/usenet&amp;lt;/code&amp;gt;. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/usenet/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Media Server ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Plex/Emby only needs access to your media library, so pass &amp;lt;code&amp;gt;-v /host/data/media:/data/media&amp;lt;/code&amp;gt;, which can have any number of sub folders like &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Kids Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Documentary TV&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; as sub folders.&lt;br /&gt;
&lt;br /&gt;
====== Sonarr, Radarr and Lidarr ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sonarr, Radarr and Lidarr get everything using &amp;lt;code&amp;gt;-v /host/data:/data&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
===== Issues =====&lt;br /&gt;
&lt;br /&gt;
There are a couple minor issues w/ not following the Docker image’s suggested paths.&lt;br /&gt;
&lt;br /&gt;
The biggest is that volumes defined in the &amp;lt;code&amp;gt;Dockerfile&amp;lt;/code&amp;gt; will get created if they’re not specified, this means they’ll pile up as you delete and re-create the containers. If they end up w/ data in them, they can consume space unexpectedly and likely in an unsuitable place. You can find a [https://old.reddit.com/r/usenet/wiki/docker#wiki_prune_docker cleanup command] in the helpful commands section below. This could also be mitigated by passing in an empty folder for all the volumes you don’t want to use, like &amp;lt;code&amp;gt;/data/empty:/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/data/empty:/downloads&amp;lt;/code&amp;gt;. Maybe even put a file named &amp;lt;code&amp;gt;DO NOT USE THIS FOLDER&amp;lt;/code&amp;gt; inside, to remind yourself.&lt;br /&gt;
&lt;br /&gt;
Another problem is that some images are pre-configured to use the documented volumes, so you’ll need to change settings in the software inside the Docker container. Thankfully, since configuration persists outside the container this is a one time issue. You might also pick a path like &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; which some images already define for a specific use. It shouldn’t be a problem, but will be a little more confusing when combined w/ the previous issues. In the end, it is worth it for working hard links and fast moves. The consistency and simplicity are welcome side effects as well.&lt;br /&gt;
&lt;br /&gt;
If you use the latest version of the abandoned [https://github.com/Sperryfreak01/RadarrSync RadarrSync] to synchronize two Radarr instances, it ''depends'' on mapping the ''same'' path inside to a different path on the outside, for example &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; for one instance would point at &amp;lt;code&amp;gt;/data/media/Movies&amp;lt;/code&amp;gt; and the other at &amp;lt;code&amp;gt;/data/media/Movies 4k&amp;lt;/code&amp;gt;. This breaks ''everything'' you’ve read above. There is no good solution, you either use the old version which isn’t as good, do your mapping in a way that is ugly and breaks hard links or just don’t use it at all.&lt;br /&gt;
&lt;br /&gt;
==== Running containers using ====&lt;br /&gt;
&lt;br /&gt;
===== Docker-compose =====&lt;br /&gt;
&lt;br /&gt;
This is the best option for most users, it lets you control and configure many containers and their interdependence in one file. A good starting place is docker’s own [https://docs.docker.com/compose/gettingstarted/ Get started with Docker Compose]. You can use [https://composerize.com composerize] or [https://old.reddit.com/r/usenet/wiki/docker#wiki_get_docker-compose red5d/docker-autocompose]to convert &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands into a single &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
The below is ''not'' a complete working example! The containers only have PID, UID, UMASK and example paths defined to keep it simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
Sonarr:&lt;br /&gt;
    image: &amp;amp;quot;hotio/sonarr&amp;amp;quot;&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sonarr:/config&lt;br /&gt;
        - /host/data:/data&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=111&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
Deluge:&lt;br /&gt;
    image: binhex/arch-delugevpn&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/deluge:/config&lt;br /&gt;
        - /host/data/torrents:/data/torrents&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=222&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
SABnzbd:&lt;br /&gt;
    image: binhex/arch-sabnzbd&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sabnzbd:/config&lt;br /&gt;
        - /host/data/usenet:/data/usenet&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=333&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
Plex:&lt;br /&gt;
    image: binhex/arch-plex&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/plex:/config&lt;br /&gt;
        - /host/data/media:/data/media&lt;br /&gt;
&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=444&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update all images and containers ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull&lt;br /&gt;
docker-compose up -d&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update individual image and container ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull NAME&lt;br /&gt;
docker-compose up -d NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Docker Run =====&lt;br /&gt;
&lt;br /&gt;
Like the Docker Compose example above, the following &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands are stripped down to ''only'' the PUID, PGID, UMASK and volumes in order to act as an obvious example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
docker run -v /path/to/config/sonarr:/config \&lt;br /&gt;
           -v /host/data:/data \&lt;br /&gt;
           -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           hotio/sonarr&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
docker run -v /path/to/config/deluge:/config \&lt;br /&gt;
           -v /host/data/torrents:/data/torrents \&lt;br /&gt;
           -e PUID=222 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-delugevpn&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
docker run -v /path/to/config/sabnzbd:/config \&lt;br /&gt;
           -v /host/data/usenet:/data/usenet \&lt;br /&gt;
           -e PUID=333 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-sabnzbd&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
docker run -v /path/to/config/plex:/config \&lt;br /&gt;
           -v /host/data/media:/data/media \&lt;br /&gt;
           -e PUID=444 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-plex&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Systemd =====&lt;br /&gt;
&lt;br /&gt;
I don’t run a full Docker setup, so I manage my few Docker containers with individual systemd service files. It standardizes control and makes dependencies simpler for both native and docker services. The generic example below can be adapted to any container by adjusting or adding the various values and options.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# /etc/systemd/system/thing.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Thing&lt;br /&gt;
Requires=docker.service&lt;br /&gt;
After=network.target docker.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/docker run --rm \&lt;br /&gt;
                          --name=thing \&lt;br /&gt;
                          -v /path/to/config/thing:/config \&lt;br /&gt;
                          -v /host/data:/data&lt;br /&gt;
                          -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
                          nobody/thing&lt;br /&gt;
&lt;br /&gt;
ExecStop=/usr/bin/docker stop -t 30 thing&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Helpful commands ====&lt;br /&gt;
&lt;br /&gt;
===== List running containers =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker ps&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Shell ''inside'' a container =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker exec -it CONTAINER_NAME /bin/bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
For more information, see the [https://docs.docker.com/engine/reference/commandline/exec/ docker exec] documentation.&lt;br /&gt;
&lt;br /&gt;
===== Prune docker =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker system prune --all --volumes&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remove unused containers, networks, volumes, images and build cache. As the WARNING this command gives says, this will remove all of the previously mentioned items for anything not in use by a running container. In a correctly configured environment, this is fine. But be aware and proceed cautiously the first time. See the [https://docs.docker.com/engine/reference/commandline/system_prune/ docker system prune] documentation for more details.&lt;br /&gt;
&lt;br /&gt;
===== Get docker run command =====&lt;br /&gt;
&lt;br /&gt;
Getting the &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command from GUI managers can be hard, this docker image makes it easy for a running container ([https://stackoverflow.com/questions/32758793/how-to-show-the-run-command-of-a-docker-container source]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike CONTAINER_NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Get docker-compose =====&lt;br /&gt;
&lt;br /&gt;
Getting a &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; from running instances is possible w/ [https://hub.docker.com/r/red5d/docker-autocompose red5d/docker-autocompose], in case you’ve already started your containers w/ &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker create&amp;lt;/code&amp;gt; and want to change to &amp;lt;code&amp;gt;docker-compose&amp;lt;/code&amp;gt; style. It is also great for sharing your settings with others, since it doesn’t matter what management software you’re using. The last argument(s) are your container names and you can pass in as many as needed at the same time. The first container name is required, more are optional. You can see container names in the '''NAMES''' column of `docker ps`, they're usually set by you or might be generated based on the image like &amp;lt;code&amp;gt;binhex-qbittorrent&amp;lt;/code&amp;gt;. It is ''not'' the image name, like &amp;lt;code&amp;gt;binhex/arch-qbittorrentvpn&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock red5d/docker-autocompose CONTAINER_NAME [ANOTHER_CONTAINER_NAME] ... [ONE_MORE_CONTAINER_NAME]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Troubleshoot networking =====&lt;br /&gt;
&lt;br /&gt;
Most Docker images don’t have many useful tools in them for troubleshooting, but you can [https://success.docker.com/article/troubleshooting-container-networking attach a network troubleshooting type image] to an existing container to help with that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run -it --rm --network container:CONTAINER_NAME nicolaka/netshoot&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chown user and group =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chown -R user:group /some/path/here&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chmod to 775/664 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R a=,a+rX,u+w,g+w /some/path/here&lt;br /&gt;
          ^  ^    ^   ^ adds write to group&lt;br /&gt;
          |  |    | adds write to user&lt;br /&gt;
          |  | adds read to all and execute to all folders (which controls access)&lt;br /&gt;
          | sets all to `000`&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Find UID/GID for user =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;id &amp;lt;username&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Examine files for hard links =====&lt;br /&gt;
&amp;lt;pre&amp;gt;ls -alhi&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 hardlink&lt;br /&gt;
42207936 -rw-r--r--  1 user group    0 Sep 11 11:55 nohardlinks&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 original&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;stat original&lt;br /&gt;
  File: original&lt;br /&gt;
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file&lt;br /&gt;
Device: 803h/2051d      Inode: 42207934    Links: 2&lt;br /&gt;
Access: (0644/-rw-r--r--)  Uid: ( 1000/ user)   Gid: ( 1001/ group)&lt;br /&gt;
Access: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Modify: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Change: 2020-09-11 11:55:49.706660476 -0500&lt;br /&gt;
 Birth: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Interesting docker images ====&lt;br /&gt;
&lt;br /&gt;
* [https://hub.docker.com/r/rasmunk/sshfs rasmunk/sshfs] let you create an sshfs volume, ''perfect'' for a seedbox setup using a remote mount instead of sync. Better documentation, including examples can be found at the github [https://github.com/rasmunk/docker-volume-sshfs rasmunk/docker-volume-sshfs] repository. This is a more recently maintained fork of [https://hub.docker.com/p/vieux/sshfs vieux/sshfs].&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/sonarr sonarr], [https://hub.docker.com/r/hotio/radarr radarr] and [https://hub.docker.com/r/hotio/lidarr lidarr] images let you run the built in version ''or'' specify an alternative via environment variable. The documentation and Dockerfile also don’t make any poor path suggestions.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/ombi ombi], [https://hub.docker.com/r/hotio/jackett jackett], [https://hub.docker.com/r/hotio/nzbhydra2 nzbhydra2] and [https://hub.docker.com/r/hotio/bazarr bazarr] are useful too, but don’t really require any special permissions or paths.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/unpackerr unpackerr] is useful for packed torrent extraction across a variety of torrent clients where unpacking is lacking or missing entirely.&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-qbittorrentvpn/ qbittorrent], [https://hub.docker.com/r/binhex/arch-delugevpn/ deluge] and [https://hub.docker.com/r/binhex/arch-rtorrentvpn/ rtorrent] are popular torrent clients with built in VPN support. For usenet, there is [https://hub.docker.com/r/binhex/arch-sabnzbd/ sabnzbd] and [https://hub.docker.com/r/binhex/arch-nzbget/ nzbget].&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-sonarr/ sonarr], [https://hub.docker.com/r/binhex/arch-radarr/ radarr] and [https://hub.docker.com/r/binhex/arch-lidarr/ lidarr] images suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume.&lt;br /&gt;
* [https://hub.docker.com/u/linuxserver linuxserver.io’s] images also suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume. But they do have images for a ''lot'' of software and they’re well maintained.&lt;br /&gt;
* [https://hub.docker.com/r/pyouroboros/ouroboros pyouroboros/ouroboros] or [https://hub.docker.com/r/containrrr/watchtower containrrr/watchtower] automatically update your running Docker containers to the latest available image. These are not recommended if you use Docker Compose.&lt;br /&gt;
&lt;br /&gt;
==== Custom Docker Network and DNS ====&lt;br /&gt;
&lt;br /&gt;
One interesting feature of a [https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks custom Docker network] is that it gets its own DNS server. If you create a bridge network for your containers, you can use their hostnames in your configuration. For example, if you &amp;lt;code&amp;gt;docker run --network=isolated --hostname=deluge binhex/arch-deluge&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docker run --network=isolated --hostname=radarr binhex/arch-radarr&amp;lt;/code&amp;gt;, you can then configure the Download Client in Radarr to point at just &amp;lt;code&amp;gt;deluge&amp;lt;/code&amp;gt; and it’ll work ''and'' communicate on its own private network. Which means if you wanted to be even more secure, you could ''stop'' forwarding that port too. If you put your reverse proxy container on the same network, you can even stop forwarding the web interface ports and make them even more secure.&lt;br /&gt;
&lt;br /&gt;
==== Common Problems ====&lt;br /&gt;
&lt;br /&gt;
===== Correct ''outside'' paths, incorrect ''inside'' paths =====&lt;br /&gt;
&lt;br /&gt;
Many people read this and think they understand, but they end up seeing the outside path correctly to something like &amp;lt;code&amp;gt;/data/usenet&amp;lt;/code&amp;gt;, but then they miss the point and set the ''inside'' path to &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; still.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers as root or changing users around =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself running your containers as &amp;lt;code&amp;gt;root:root&amp;lt;/code&amp;gt;, you’re doing something wrong. If you’re not passing in a UID and GID, you’ll be using what ever the default is for the image and ''that'' will be unlikely to line up w/ a reasonable user on your system. And if you’re changing the user and group your Docker containers are running as, you’ll probably end up w/ permissions issues on folders like the &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; folder which will likely have files and folders in them that got created the first time w/ the UID/GID you used the first time.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers w/ umask 000 =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself setting a UMASK of &amp;lt;code&amp;gt;000&amp;lt;/code&amp;gt; (which is 777 for folders and 666 for files), you’re ''also'' doing something wrong. It leaves your files and folders read/write to ''everyone'', which is poor Linux hygiene.&lt;br /&gt;
&lt;br /&gt;
==== LinuxServer.io ====&lt;br /&gt;
&lt;br /&gt;
The ''entire'' reason this article even exists is [https://hub.docker.com/u/linuxserver linuxserver.io]’s documentation and default path suggestions. They’re singlehandedly responsible for the &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; paths which ''break'' hard links and atomic moves. It is for this reason that ''none'' of them are ''specifically'' recommended by this article. That said, once you understand the problem with those paths and that you ''don’t'' have to use them, their images are fine. So feel free to use them and ''most'' of their documentation. Just ''ignore'' their path suggestions.&lt;br /&gt;
&lt;br /&gt;
==== Getting Help ====&lt;br /&gt;
&lt;br /&gt;
Need some help? For real time, chat style support try the [https://discord.gg/xyRwnyB Sonarr] or [https://discord.gg/SRBnFmX Radarr] Discord servers. If you prefer forum style support, make a post in [http://reddit.com/r/sonarr /r/sonarr] or [http://reddit.com/r/radarr /r/radarr].&lt;/div&gt;</summary>
		<author><name>Fryfrog</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1344</id>
		<title>Docker Guide</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1344"/>
		<updated>2020-10-07T19:55:31Z</updated>

		<summary type="html">&lt;p&gt;Fryfrog: /* Get docker-compose */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Best Docker Setup ===&lt;br /&gt;
&lt;br /&gt;
'''TL; DR''': An [https://www.lexico.com/en/definition/eponymous eponymous] user per daemon and a shared group with a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. Consistent path definitions between ''all'' containers that maintains the folder structure. Using one volume for Sonarr, Radarr and Lidarr so the download folder and library folder are on the same file system which makes hard links and instant moves possible. And most of all, ignore ''most'' of the Docker image’s path documentation!&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
&lt;br /&gt;
This article will not show you specifics about the best Docker setup, but it describes an overview that you can use to make your own setup the best that it can be. The idea is that you run each docker container as its own user, with a shared group and consistent volumes so every container sees the same path layout. This is easy to say, but difficult to understand and explain.&lt;br /&gt;
&lt;br /&gt;
==== Multiple users and a shared group ====&lt;br /&gt;
&lt;br /&gt;
===== Permissions =====&lt;br /&gt;
&lt;br /&gt;
Ideally, each software runs as its own user user and they’re all part of a shared group with folder permissions set to &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxrwxr-x&amp;lt;/code&amp;gt;) and files set to &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-rw-r--&amp;lt;/code&amp;gt;), which is a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. A sane alternative to this is a single shared user, which would use &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; which is a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt;. You can restrict permissions even more by denying read from “other”, which would be a umask of &amp;lt;code&amp;gt;007&amp;lt;/code&amp;gt; for a user per daemon or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; for a single shared user. For a deeper explanation, try the Arch Linux wiki articles about [https://wiki.archlinux.org/index.php/File_permissions_and_attributes File permissions and attributes] and [https://wiki.archlinux.org/index.php/Umask Umask].&lt;br /&gt;
&lt;br /&gt;
===== UMASK =====&lt;br /&gt;
&lt;br /&gt;
Many docker images accept a &amp;lt;code&amp;gt;-e UMASK=002&amp;lt;/code&amp;gt; environment variable and some software inside can be configured with a user, group and umask (NZBGet) or folder/file permission (Sonarr/Radarr). This will ensure that files and folders created by ''one'' can be read and written by the others. If you’re using existing folders and files, you’ll need to fix their current ownership and permissions too, but going forward they’ll be correct because you set each software up right.&lt;br /&gt;
&lt;br /&gt;
===== PUID and PGID =====&lt;br /&gt;
&lt;br /&gt;
Many docker images also take a &amp;lt;code&amp;gt;-e PUID=123&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-e PGID=321&amp;lt;/code&amp;gt; that lets you change the UID/GID used inside to that of an account on the outside. If you ever peak in, you’ll find that username is something like &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;hotio&amp;lt;/code&amp;gt;, but because it uses the UID/GID you pass in, on the outside it looks like the expected user. If you’re using storage from another system via NFS or CIFS, it will make your life easier if ''that'' system also has matching users and group. Perhaps let one system pick the UID/GIDs, then re-use those on the other system, assuming they don’t conflict.&lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
&lt;br /&gt;
You run [https://github.com/Sonarr/Sonarr/releases Sonarr] using [https://github.com/hotio/docker-sonarr hotio/sonarr], you’ve created a &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user with uid &amp;lt;code&amp;gt;123&amp;lt;/code&amp;gt; and a shared group &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; with gid &amp;lt;code&amp;gt;321&amp;lt;/code&amp;gt; which the &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user is a member of. You configure the Docker image to run with &amp;lt;code&amp;gt;-e PUID=123 -e PGID=321 -e UMASK=002&amp;lt;/code&amp;gt;. Sonarr also lets you configured user, group as well as folder and file permissions. The previous settings should negate these, but you could configure them if you wanted. Folders would be &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt;, files &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; and the user/group are a little tricky because ''inside'' the container, they have a different name. Maybe &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt;. I’d leave all these blank unless you find you need them for some reason.&lt;br /&gt;
&lt;br /&gt;
==== Single user and optional shared group ====&lt;br /&gt;
&lt;br /&gt;
Another popular and arguably easier option is a single, shared user. Perhaps even ''your'' user. It isn’t as secure and doesn’t follow best practices, but in the end it is easier to understand and implement. The UMASK for this is &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; which results in &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxr-xr-x&amp;lt;/code&amp;gt;) for folders and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-r--r--&amp;lt;/code&amp;gt;) for files. The group no longer really matters, so you’ll probably just use the group named after the user. This does make it harder to share with ''other'' users, so you may still end up wanting a UMASK of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt; even w/ this setup.&lt;br /&gt;
&lt;br /&gt;
==== Ownership and permissions of /config ====&lt;br /&gt;
&lt;br /&gt;
Don’t forget that your &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; volume will ''also'' need to have correct ownership and permissions, usually the daemon’s user and that user’s group like &amp;lt;code&amp;gt;sonarr:sonarr&amp;lt;/code&amp;gt; and a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; so ''only'' that user has access. In a single user setup, this would of course be the one user you’ve chosen.&lt;br /&gt;
&lt;br /&gt;
==== Consistent and well planned paths ====&lt;br /&gt;
&lt;br /&gt;
The easiest and most important detail is to create unified path definitions across all the containers.&lt;br /&gt;
&lt;br /&gt;
If you’re wondering why hard links aren’t working or why a simple move is taking far longer than it should, this section explains it. The paths you use on the ''inside'' matter. Because of how Docker’s volumes work, passing in two volumes such as the commonly suggested &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; makes them look like two file systems, even if they aren’t. This means hard links won’t work ''and'' instead of an instant move, a slower and more io intensive copy + delete is used. If you have multiple download clients because you’re using torrents and usenet, having a single &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; path means they’ll be mixed up. Because the Radarr in one container will ask the NZBGet in its own container where files are, using the same path in both means it will all just work. If you don’t, you’d need to fix it with a remote path map.&lt;br /&gt;
&lt;br /&gt;
So pick ''one'' path layout and use it for all of them. I’m a fan of &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt;, but there are other great names like &amp;lt;code&amp;gt;/shared&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/dvr&amp;lt;/code&amp;gt;. If this can be the same on the outside ''and'' inside, your setup will be simpler: one path to remember or if integrating docker and native software. But if not, that’s fine too. For example, Synology might use &amp;lt;code&amp;gt;/Volume1/data&amp;lt;/code&amp;gt; and unRAID might use &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt; on the outside, but &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; on the inside is fine.&lt;br /&gt;
&lt;br /&gt;
It is also important to remember that you’ll need to setup or re-configure paths in the software running ''inside'' these Docker containers. If you change the paths for your download client, you’ll need to edit its settings to match. If you change your library path, you’ll need to change those settings in Sonarr, Radarr, Lidarr and/or Plex.&lt;br /&gt;
&lt;br /&gt;
===== Examples =====&lt;br /&gt;
&lt;br /&gt;
What matters here is the general structure, not the names. You are free to pick folder names that make sense to you. And there are other ways of arranging things too. For example, you’re not likely to download and run into conflicts of identical releases between usenet and torrents, so you ''could'' put both in &amp;lt;code&amp;gt;/data/downloads/{movies|music|tv}&amp;lt;/code&amp;gt; folders. Downloads don’t even have to be sorted into sub-folders either, since movies, music and tv will rarely conflict.&lt;br /&gt;
&lt;br /&gt;
This example &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; folder has nicely named &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; sub-folders, this is your library and what you’d pass to Plex or Emby.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
The path for each Docker container can be as specific as needed while still maintaining the correct structure:&lt;br /&gt;
&lt;br /&gt;
====== Torrents ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── torrents&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Torrents only needs access to torrent files, so pass it &amp;lt;code&amp;gt;-v /host/data/torrents:/data/torrents&amp;lt;/code&amp;gt;. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/torrents/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Usenet ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── usenet&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Usenet only needs access to usenet files, so pass it &amp;lt;code&amp;gt;-v /host/data/usenet:/data/usenet&amp;lt;/code&amp;gt;. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/usenet/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Media Server ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Plex/Emby only needs access to your media library, so pass &amp;lt;code&amp;gt;-v /host/data/media:/data/media&amp;lt;/code&amp;gt;, which can have any number of sub folders like &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Kids Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Documentary TV&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; as sub folders.&lt;br /&gt;
&lt;br /&gt;
====== Sonarr, Radarr and Lidarr ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sonarr, Radarr and Lidarr get everything using &amp;lt;code&amp;gt;-v /host/data:/data&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
===== Issues =====&lt;br /&gt;
&lt;br /&gt;
There are a couple minor issues w/ not following the Docker image’s suggested paths.&lt;br /&gt;
&lt;br /&gt;
The biggest is that volumes defined in the &amp;lt;code&amp;gt;Dockerfile&amp;lt;/code&amp;gt; will get created if they’re not specified, this means they’ll pile up as you delete and re-create the containers. If they end up w/ data in them, they can consume space unexpectedly and likely in an unsuitable place. You can find a [https://old.reddit.com/r/usenet/wiki/docker#wiki_prune_docker cleanup command] in the helpful commands section below. This could also be mitigated by passing in an empty folder for all the volumes you don’t want to use, like &amp;lt;code&amp;gt;/data/empty:/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/data/empty:/downloads&amp;lt;/code&amp;gt;. Maybe even put a file named &amp;lt;code&amp;gt;DO NOT USE THIS FOLDER&amp;lt;/code&amp;gt; inside, to remind yourself.&lt;br /&gt;
&lt;br /&gt;
Another problem is that some images are pre-configured to use the documented volumes, so you’ll need to change settings in the software inside the Docker container. Thankfully, since configuration persists outside the container this is a one time issue. You might also pick a path like &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; which some images already define for a specific use. It shouldn’t be a problem, but will be a little more confusing when combined w/ the previous issues. In the end, it is worth it for working hard links and fast moves. The consistency and simplicity are welcome side effects as well.&lt;br /&gt;
&lt;br /&gt;
If you use the latest version of the abandoned [https://github.com/Sperryfreak01/RadarrSync RadarrSync] to synchronize two Radarr instances, it ''depends'' on mapping the ''same'' path inside to a different path on the outside, for example &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; for one instance would point at &amp;lt;code&amp;gt;/data/media/Movies&amp;lt;/code&amp;gt; and the other at &amp;lt;code&amp;gt;/data/media/Movies 4k&amp;lt;/code&amp;gt;. This breaks ''everything'' you’ve read above. There is no good solution, you either use the old version which isn’t as good, do your mapping in a way that is ugly and breaks hard links or just don’t use it at all.&lt;br /&gt;
&lt;br /&gt;
==== Running containers using ====&lt;br /&gt;
&lt;br /&gt;
===== Docker-compose =====&lt;br /&gt;
&lt;br /&gt;
This is the best option for most users, it lets you control and configure many containers and their interdependence in one file. A good starting place is docker’s own [https://docs.docker.com/compose/gettingstarted/ Get started with Docker Compose]. You can use [https://composerize.com composerize] or [https://old.reddit.com/r/usenet/wiki/docker#wiki_get_docker-compose red5d/docker-autocompose]to convert &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands into a single &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
The below is ''not'' a complete working example! The containers only have PID, UID, UMASK and example paths defined to keep it simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
Sonarr:&lt;br /&gt;
    image: &amp;amp;quot;hotio/sonarr&amp;amp;quot;&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sonarr:/config&lt;br /&gt;
        - /host/data:/data&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=111&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
Deluge:&lt;br /&gt;
    image: binhex/arch-delugevpn&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/deluge:/config&lt;br /&gt;
        - /host/data/torrents:/data/torrents&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=222&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
SABnzbd:&lt;br /&gt;
    image: binhex/arch-sabnzbd&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sabnzbd:/config&lt;br /&gt;
        - /host/data/usenet:/data/usenet&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=333&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
Plex:&lt;br /&gt;
    image: binhex/arch-plex&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/plex:/config&lt;br /&gt;
        - /host/data/media:/data/media&lt;br /&gt;
&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=444&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update all images and containers ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull&lt;br /&gt;
docker-compose up -d&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update individual image and container ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull NAME&lt;br /&gt;
docker-compose up -d NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Docker Run =====&lt;br /&gt;
&lt;br /&gt;
Like the Docker Compose example above, the following &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands are stripped down to ''only'' the PUID, PGID, UMASK and volumes in order to act as an obvious example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
docker run -v /path/to/config/sonarr:/config \&lt;br /&gt;
           -v /host/data:/data \&lt;br /&gt;
           -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           hotio/sonarr&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
docker run -v /path/to/config/deluge:/config \&lt;br /&gt;
           -v /host/data/torrents:/data/torrents \&lt;br /&gt;
           -e PUID=222 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-delugevpn&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
docker run -v /path/to/config/sabnzbd:/config \&lt;br /&gt;
           -v /host/data/usenet:/data/usenet \&lt;br /&gt;
           -e PUID=333 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-sabnzbd&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
docker run -v /path/to/config/plex:/config \&lt;br /&gt;
           -v /host/data/media:/data/media \&lt;br /&gt;
           -e PUID=444 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-plex&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Systemd =====&lt;br /&gt;
&lt;br /&gt;
I don’t run a full Docker setup, so I manage my few Docker containers with individual systemd service files. It standardizes control and makes dependencies simpler for both native and docker services. The generic example below can be adapted to any container by adjusting or adding the various values and options.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# /etc/systemd/system/thing.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Thing&lt;br /&gt;
Requires=docker.service&lt;br /&gt;
After=network.target docker.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/docker run --rm \&lt;br /&gt;
                          --name=thing \&lt;br /&gt;
                          -v /path/to/config/thing:/config \&lt;br /&gt;
                          -v /host/data:/data&lt;br /&gt;
                          -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
                          nobody/thing&lt;br /&gt;
&lt;br /&gt;
ExecStop=/usr/bin/docker stop -t 30 thing&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Helpful commands ====&lt;br /&gt;
&lt;br /&gt;
===== List running containers =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker ps&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Shell ''inside'' a container =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker exec -it CONTAINER_NAME /bin/bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
For more information, see the [https://docs.docker.com/engine/reference/commandline/exec/ docker exec] documentation.&lt;br /&gt;
&lt;br /&gt;
===== Prune docker =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker system prune --all --volumes&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remove unused containers, networks, volumes, images and build cache. As the WARNING this command gives says, this will remove all of the previously mentioned items for anything not in use by a running container. In a correctly configured environment, this is fine. But be aware and proceed cautiously the first time. See the [https://docs.docker.com/engine/reference/commandline/system_prune/ docker system prune] documentation for more details.&lt;br /&gt;
&lt;br /&gt;
===== Get docker run command =====&lt;br /&gt;
&lt;br /&gt;
Getting the &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command from GUI managers can be hard, this docker image makes it easy for a running container ([https://stackoverflow.com/questions/32758793/how-to-show-the-run-command-of-a-docker-container source]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike CONTAINER_NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Get docker-compose =====&lt;br /&gt;
&lt;br /&gt;
Getting a &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; from running instances is possible w/ [https://hub.docker.com/r/red5d/docker-autocompose red5d/docker-autocompose], in case you’ve already started your containers w/ &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker create&amp;lt;/code&amp;gt; and want to change to &amp;lt;code&amp;gt;docker-compose&amp;lt;/code&amp;gt; style. It is also great for sharing your settings with others, since it doesn’t matter what management software you’re using. The last argument(s) are your container names and you can pass in as many as needed at the same time. The first container name is required, more are optional. You can see container names in the '''NAMES''' column of `docker ps`, they're usually set by you or might be generated based on the image like &amp;lt;code&amp;gt;binhex-qbittorrent&amp;lt;/code&amp;gt;. It is ''not'' the image name, like &amp;lt;code&amp;gt;binhex/arch-qbittorrentvpn&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock red5d/docker-autocompose CONTAINER_NAME [CONTAINER_NAME] ... [CONTAINER_NAME]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Troubleshoot networking =====&lt;br /&gt;
&lt;br /&gt;
Most Docker images don’t have many useful tools in them for troubleshooting, but you can [https://success.docker.com/article/troubleshooting-container-networking attach a network troubleshooting type image] to an existing container to help with that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run -it --rm --network container:CONTAINER_NAME nicolaka/netshoot&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chown user and group =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chown -R user:group /some/path/here&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chmod to 775/664 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R a=,a+rX,u+w,g+w /some/path/here&lt;br /&gt;
          ^  ^    ^   ^ adds write to group&lt;br /&gt;
          |  |    | adds write to user&lt;br /&gt;
          |  | adds read to all and execute to all folders (which controls access)&lt;br /&gt;
          | sets all to `000`&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Find UID/GID for user =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;id &amp;lt;username&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Examine files for hard links =====&lt;br /&gt;
&amp;lt;pre&amp;gt;ls -alhi&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 hardlink&lt;br /&gt;
42207936 -rw-r--r--  1 user group    0 Sep 11 11:55 nohardlinks&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 original&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;stat original&lt;br /&gt;
  File: original&lt;br /&gt;
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file&lt;br /&gt;
Device: 803h/2051d      Inode: 42207934    Links: 2&lt;br /&gt;
Access: (0644/-rw-r--r--)  Uid: ( 1000/ user)   Gid: ( 1001/ group)&lt;br /&gt;
Access: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Modify: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Change: 2020-09-11 11:55:49.706660476 -0500&lt;br /&gt;
 Birth: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Interesting docker images ====&lt;br /&gt;
&lt;br /&gt;
* [https://hub.docker.com/r/rasmunk/sshfs rasmunk/sshfs] let you create an sshfs volume, ''perfect'' for a seedbox setup using a remote mount instead of sync. Better documentation, including examples can be found at the github [https://github.com/rasmunk/docker-volume-sshfs rasmunk/docker-volume-sshfs] repository. This is a more recently maintained fork of [https://hub.docker.com/p/vieux/sshfs vieux/sshfs].&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/sonarr sonarr], [https://hub.docker.com/r/hotio/radarr radarr] and [https://hub.docker.com/r/hotio/lidarr lidarr] images let you run the built in version ''or'' specify an alternative via environment variable. The documentation and Dockerfile also don’t make any poor path suggestions.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/ombi ombi], [https://hub.docker.com/r/hotio/jackett jackett], [https://hub.docker.com/r/hotio/nzbhydra2 nzbhydra2] and [https://hub.docker.com/r/hotio/bazarr bazarr] are useful too, but don’t really require any special permissions or paths.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/unpackerr unpackerr] is useful for packed torrent extraction across a variety of torrent clients where unpacking is lacking or missing entirely.&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-qbittorrentvpn/ qbittorrent], [https://hub.docker.com/r/binhex/arch-delugevpn/ deluge] and [https://hub.docker.com/r/binhex/arch-rtorrentvpn/ rtorrent] are popular torrent clients with built in VPN support. For usenet, there is [https://hub.docker.com/r/binhex/arch-sabnzbd/ sabnzbd] and [https://hub.docker.com/r/binhex/arch-nzbget/ nzbget].&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-sonarr/ sonarr], [https://hub.docker.com/r/binhex/arch-radarr/ radarr] and [https://hub.docker.com/r/binhex/arch-lidarr/ lidarr] images suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume.&lt;br /&gt;
* [https://hub.docker.com/u/linuxserver linuxserver.io’s] images also suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume. But they do have images for a ''lot'' of software and they’re well maintained.&lt;br /&gt;
* [https://hub.docker.com/r/pyouroboros/ouroboros pyouroboros/ouroboros] or [https://hub.docker.com/r/containrrr/watchtower containrrr/watchtower] automatically update your running Docker containers to the latest available image. These are not recommended if you use Docker Compose.&lt;br /&gt;
&lt;br /&gt;
==== Custom Docker Network and DNS ====&lt;br /&gt;
&lt;br /&gt;
One interesting feature of a [https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks custom Docker network] is that it gets its own DNS server. If you create a bridge network for your containers, you can use their hostnames in your configuration. For example, if you &amp;lt;code&amp;gt;docker run --network=isolated --hostname=deluge binhex/arch-deluge&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docker run --network=isolated --hostname=radarr binhex/arch-radarr&amp;lt;/code&amp;gt;, you can then configure the Download Client in Radarr to point at just &amp;lt;code&amp;gt;deluge&amp;lt;/code&amp;gt; and it’ll work ''and'' communicate on its own private network. Which means if you wanted to be even more secure, you could ''stop'' forwarding that port too. If you put your reverse proxy container on the same network, you can even stop forwarding the web interface ports and make them even more secure.&lt;br /&gt;
&lt;br /&gt;
==== Common Problems ====&lt;br /&gt;
&lt;br /&gt;
===== Correct ''outside'' paths, incorrect ''inside'' paths =====&lt;br /&gt;
&lt;br /&gt;
Many people read this and think they understand, but they end up seeing the outside path correctly to something like &amp;lt;code&amp;gt;/data/usenet&amp;lt;/code&amp;gt;, but then they miss the point and set the ''inside'' path to &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; still.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers as root or changing users around =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself running your containers as &amp;lt;code&amp;gt;root:root&amp;lt;/code&amp;gt;, you’re doing something wrong. If you’re not passing in a UID and GID, you’ll be using what ever the default is for the image and ''that'' will be unlikely to line up w/ a reasonable user on your system. And if you’re changing the user and group your Docker containers are running as, you’ll probably end up w/ permissions issues on folders like the &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; folder which will likely have files and folders in them that got created the first time w/ the UID/GID you used the first time.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers w/ umask 000 =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself setting a UMASK of &amp;lt;code&amp;gt;000&amp;lt;/code&amp;gt; (which is 777 for folders and 666 for files), you’re ''also'' doing something wrong. It leaves your files and folders read/write to ''everyone'', which is poor Linux hygiene.&lt;br /&gt;
&lt;br /&gt;
==== LinuxServer.io ====&lt;br /&gt;
&lt;br /&gt;
The ''entire'' reason this article even exists is [https://hub.docker.com/u/linuxserver linuxserver.io]’s documentation and default path suggestions. They’re singlehandedly responsible for the &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; paths which ''break'' hard links and atomic moves. It is for this reason that ''none'' of them are ''specifically'' recommended by this article. That said, once you understand the problem with those paths and that you ''don’t'' have to use them, their images are fine. So feel free to use them and ''most'' of their documentation. Just ''ignore'' their path suggestions.&lt;br /&gt;
&lt;br /&gt;
==== Getting Help ====&lt;br /&gt;
&lt;br /&gt;
Need some help? For real time, chat style support try the [https://discord.gg/xyRwnyB Sonarr] or [https://discord.gg/SRBnFmX Radarr] Discord servers. If you prefer forum style support, make a post in [http://reddit.com/r/sonarr /r/sonarr] or [http://reddit.com/r/radarr /r/radarr].&lt;/div&gt;</summary>
		<author><name>Fryfrog</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1343</id>
		<title>Docker Guide</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1343"/>
		<updated>2020-10-07T19:46:10Z</updated>

		<summary type="html">&lt;p&gt;Fryfrog: Fix formatting...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Best Docker Setup ===&lt;br /&gt;
&lt;br /&gt;
'''TL; DR''': An [https://www.lexico.com/en/definition/eponymous eponymous] user per daemon and a shared group with a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. Consistent path definitions between ''all'' containers that maintains the folder structure. Using one volume for Sonarr, Radarr and Lidarr so the download folder and library folder are on the same file system which makes hard links and instant moves possible. And most of all, ignore ''most'' of the Docker image’s path documentation!&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
&lt;br /&gt;
This article will not show you specifics about the best Docker setup, but it describes an overview that you can use to make your own setup the best that it can be. The idea is that you run each docker container as its own user, with a shared group and consistent volumes so every container sees the same path layout. This is easy to say, but difficult to understand and explain.&lt;br /&gt;
&lt;br /&gt;
==== Multiple users and a shared group ====&lt;br /&gt;
&lt;br /&gt;
===== Permissions =====&lt;br /&gt;
&lt;br /&gt;
Ideally, each software runs as its own user user and they’re all part of a shared group with folder permissions set to &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxrwxr-x&amp;lt;/code&amp;gt;) and files set to &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-rw-r--&amp;lt;/code&amp;gt;), which is a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. A sane alternative to this is a single shared user, which would use &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; which is a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt;. You can restrict permissions even more by denying read from “other”, which would be a umask of &amp;lt;code&amp;gt;007&amp;lt;/code&amp;gt; for a user per daemon or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; for a single shared user. For a deeper explanation, try the Arch Linux wiki articles about [https://wiki.archlinux.org/index.php/File_permissions_and_attributes File permissions and attributes] and [https://wiki.archlinux.org/index.php/Umask Umask].&lt;br /&gt;
&lt;br /&gt;
===== UMASK =====&lt;br /&gt;
&lt;br /&gt;
Many docker images accept a &amp;lt;code&amp;gt;-e UMASK=002&amp;lt;/code&amp;gt; environment variable and some software inside can be configured with a user, group and umask (NZBGet) or folder/file permission (Sonarr/Radarr). This will ensure that files and folders created by ''one'' can be read and written by the others. If you’re using existing folders and files, you’ll need to fix their current ownership and permissions too, but going forward they’ll be correct because you set each software up right.&lt;br /&gt;
&lt;br /&gt;
===== PUID and PGID =====&lt;br /&gt;
&lt;br /&gt;
Many docker images also take a &amp;lt;code&amp;gt;-e PUID=123&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-e PGID=321&amp;lt;/code&amp;gt; that lets you change the UID/GID used inside to that of an account on the outside. If you ever peak in, you’ll find that username is something like &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;hotio&amp;lt;/code&amp;gt;, but because it uses the UID/GID you pass in, on the outside it looks like the expected user. If you’re using storage from another system via NFS or CIFS, it will make your life easier if ''that'' system also has matching users and group. Perhaps let one system pick the UID/GIDs, then re-use those on the other system, assuming they don’t conflict.&lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
&lt;br /&gt;
You run [https://github.com/Sonarr/Sonarr/releases Sonarr] using [https://github.com/hotio/docker-sonarr hotio/sonarr], you’ve created a &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user with uid &amp;lt;code&amp;gt;123&amp;lt;/code&amp;gt; and a shared group &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; with gid &amp;lt;code&amp;gt;321&amp;lt;/code&amp;gt; which the &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user is a member of. You configure the Docker image to run with &amp;lt;code&amp;gt;-e PUID=123 -e PGID=321 -e UMASK=002&amp;lt;/code&amp;gt;. Sonarr also lets you configured user, group as well as folder and file permissions. The previous settings should negate these, but you could configure them if you wanted. Folders would be &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt;, files &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; and the user/group are a little tricky because ''inside'' the container, they have a different name. Maybe &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt;. I’d leave all these blank unless you find you need them for some reason.&lt;br /&gt;
&lt;br /&gt;
==== Single user and optional shared group ====&lt;br /&gt;
&lt;br /&gt;
Another popular and arguably easier option is a single, shared user. Perhaps even ''your'' user. It isn’t as secure and doesn’t follow best practices, but in the end it is easier to understand and implement. The UMASK for this is &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; which results in &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxr-xr-x&amp;lt;/code&amp;gt;) for folders and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-r--r--&amp;lt;/code&amp;gt;) for files. The group no longer really matters, so you’ll probably just use the group named after the user. This does make it harder to share with ''other'' users, so you may still end up wanting a UMASK of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt; even w/ this setup.&lt;br /&gt;
&lt;br /&gt;
==== Ownership and permissions of /config ====&lt;br /&gt;
&lt;br /&gt;
Don’t forget that your &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; volume will ''also'' need to have correct ownership and permissions, usually the daemon’s user and that user’s group like &amp;lt;code&amp;gt;sonarr:sonarr&amp;lt;/code&amp;gt; and a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; so ''only'' that user has access. In a single user setup, this would of course be the one user you’ve chosen.&lt;br /&gt;
&lt;br /&gt;
==== Consistent and well planned paths ====&lt;br /&gt;
&lt;br /&gt;
The easiest and most important detail is to create unified path definitions across all the containers.&lt;br /&gt;
&lt;br /&gt;
If you’re wondering why hard links aren’t working or why a simple move is taking far longer than it should, this section explains it. The paths you use on the ''inside'' matter. Because of how Docker’s volumes work, passing in two volumes such as the commonly suggested &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; makes them look like two file systems, even if they aren’t. This means hard links won’t work ''and'' instead of an instant move, a slower and more io intensive copy + delete is used. If you have multiple download clients because you’re using torrents and usenet, having a single &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; path means they’ll be mixed up. Because the Radarr in one container will ask the NZBGet in its own container where files are, using the same path in both means it will all just work. If you don’t, you’d need to fix it with a remote path map.&lt;br /&gt;
&lt;br /&gt;
So pick ''one'' path layout and use it for all of them. I’m a fan of &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt;, but there are other great names like &amp;lt;code&amp;gt;/shared&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/dvr&amp;lt;/code&amp;gt;. If this can be the same on the outside ''and'' inside, your setup will be simpler: one path to remember or if integrating docker and native software. But if not, that’s fine too. For example, Synology might use &amp;lt;code&amp;gt;/Volume1/data&amp;lt;/code&amp;gt; and unRAID might use &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt; on the outside, but &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; on the inside is fine.&lt;br /&gt;
&lt;br /&gt;
It is also important to remember that you’ll need to setup or re-configure paths in the software running ''inside'' these Docker containers. If you change the paths for your download client, you’ll need to edit its settings to match. If you change your library path, you’ll need to change those settings in Sonarr, Radarr, Lidarr and/or Plex.&lt;br /&gt;
&lt;br /&gt;
===== Examples =====&lt;br /&gt;
&lt;br /&gt;
What matters here is the general structure, not the names. You are free to pick folder names that make sense to you. And there are other ways of arranging things too. For example, you’re not likely to download and run into conflicts of identical releases between usenet and torrents, so you ''could'' put both in &amp;lt;code&amp;gt;/data/downloads/{movies|music|tv}&amp;lt;/code&amp;gt; folders. Downloads don’t even have to be sorted into sub-folders either, since movies, music and tv will rarely conflict.&lt;br /&gt;
&lt;br /&gt;
This example &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; folder has nicely named &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; sub-folders, this is your library and what you’d pass to Plex or Emby.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
The path for each Docker container can be as specific as needed while still maintaining the correct structure:&lt;br /&gt;
&lt;br /&gt;
====== Torrents ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── torrents&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Torrents only needs access to torrent files, so pass it &amp;lt;code&amp;gt;-v /host/data/torrents:/data/torrents&amp;lt;/code&amp;gt;. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/torrents/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Usenet ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── usenet&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Usenet only needs access to usenet files, so pass it &amp;lt;code&amp;gt;-v /host/data/usenet:/data/usenet&amp;lt;/code&amp;gt;. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/usenet/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Media Server ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Plex/Emby only needs access to your media library, so pass &amp;lt;code&amp;gt;-v /host/data/media:/data/media&amp;lt;/code&amp;gt;, which can have any number of sub folders like &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Kids Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Documentary TV&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; as sub folders.&lt;br /&gt;
&lt;br /&gt;
====== Sonarr, Radarr and Lidarr ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sonarr, Radarr and Lidarr get everything using &amp;lt;code&amp;gt;-v /host/data:/data&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
===== Issues =====&lt;br /&gt;
&lt;br /&gt;
There are a couple minor issues w/ not following the Docker image’s suggested paths.&lt;br /&gt;
&lt;br /&gt;
The biggest is that volumes defined in the &amp;lt;code&amp;gt;Dockerfile&amp;lt;/code&amp;gt; will get created if they’re not specified, this means they’ll pile up as you delete and re-create the containers. If they end up w/ data in them, they can consume space unexpectedly and likely in an unsuitable place. You can find a [https://old.reddit.com/r/usenet/wiki/docker#wiki_prune_docker cleanup command] in the helpful commands section below. This could also be mitigated by passing in an empty folder for all the volumes you don’t want to use, like &amp;lt;code&amp;gt;/data/empty:/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/data/empty:/downloads&amp;lt;/code&amp;gt;. Maybe even put a file named &amp;lt;code&amp;gt;DO NOT USE THIS FOLDER&amp;lt;/code&amp;gt; inside, to remind yourself.&lt;br /&gt;
&lt;br /&gt;
Another problem is that some images are pre-configured to use the documented volumes, so you’ll need to change settings in the software inside the Docker container. Thankfully, since configuration persists outside the container this is a one time issue. You might also pick a path like &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; which some images already define for a specific use. It shouldn’t be a problem, but will be a little more confusing when combined w/ the previous issues. In the end, it is worth it for working hard links and fast moves. The consistency and simplicity are welcome side effects as well.&lt;br /&gt;
&lt;br /&gt;
If you use the latest version of the abandoned [https://github.com/Sperryfreak01/RadarrSync RadarrSync] to synchronize two Radarr instances, it ''depends'' on mapping the ''same'' path inside to a different path on the outside, for example &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; for one instance would point at &amp;lt;code&amp;gt;/data/media/Movies&amp;lt;/code&amp;gt; and the other at &amp;lt;code&amp;gt;/data/media/Movies 4k&amp;lt;/code&amp;gt;. This breaks ''everything'' you’ve read above. There is no good solution, you either use the old version which isn’t as good, do your mapping in a way that is ugly and breaks hard links or just don’t use it at all.&lt;br /&gt;
&lt;br /&gt;
==== Running containers using ====&lt;br /&gt;
&lt;br /&gt;
===== Docker-compose =====&lt;br /&gt;
&lt;br /&gt;
This is the best option for most users, it lets you control and configure many containers and their interdependence in one file. A good starting place is docker’s own [https://docs.docker.com/compose/gettingstarted/ Get started with Docker Compose]. You can use [https://composerize.com composerize] or [https://old.reddit.com/r/usenet/wiki/docker#wiki_get_docker-compose red5d/docker-autocompose]to convert &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands into a single &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
The below is ''not'' a complete working example! The containers only have PID, UID, UMASK and example paths defined to keep it simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
Sonarr:&lt;br /&gt;
    image: &amp;amp;quot;hotio/sonarr&amp;amp;quot;&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sonarr:/config&lt;br /&gt;
        - /host/data:/data&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=111&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
Deluge:&lt;br /&gt;
    image: binhex/arch-delugevpn&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/deluge:/config&lt;br /&gt;
        - /host/data/torrents:/data/torrents&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=222&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
SABnzbd:&lt;br /&gt;
    image: binhex/arch-sabnzbd&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sabnzbd:/config&lt;br /&gt;
        - /host/data/usenet:/data/usenet&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=333&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
Plex:&lt;br /&gt;
    image: binhex/arch-plex&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/plex:/config&lt;br /&gt;
        - /host/data/media:/data/media&lt;br /&gt;
&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=444&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update all images and containers ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull&lt;br /&gt;
docker-compose up -d&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update individual image and container ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull NAME&lt;br /&gt;
docker-compose up -d NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Docker Run =====&lt;br /&gt;
&lt;br /&gt;
Like the Docker Compose example above, the following &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands are stripped down to ''only'' the PUID, PGID, UMASK and volumes in order to act as an obvious example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
docker run -v /path/to/config/sonarr:/config \&lt;br /&gt;
           -v /host/data:/data \&lt;br /&gt;
           -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           hotio/sonarr&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
docker run -v /path/to/config/deluge:/config \&lt;br /&gt;
           -v /host/data/torrents:/data/torrents \&lt;br /&gt;
           -e PUID=222 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-delugevpn&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
docker run -v /path/to/config/sabnzbd:/config \&lt;br /&gt;
           -v /host/data/usenet:/data/usenet \&lt;br /&gt;
           -e PUID=333 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-sabnzbd&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
docker run -v /path/to/config/plex:/config \&lt;br /&gt;
           -v /host/data/media:/data/media \&lt;br /&gt;
           -e PUID=444 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-plex&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Systemd =====&lt;br /&gt;
&lt;br /&gt;
I don’t run a full Docker setup, so I manage my few Docker containers with individual systemd service files. It standardizes control and makes dependencies simpler for both native and docker services. The generic example below can be adapted to any container by adjusting or adding the various values and options.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# /etc/systemd/system/thing.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Thing&lt;br /&gt;
Requires=docker.service&lt;br /&gt;
After=network.target docker.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/docker run --rm \&lt;br /&gt;
                          --name=thing \&lt;br /&gt;
                          -v /path/to/config/thing:/config \&lt;br /&gt;
                          -v /host/data:/data&lt;br /&gt;
                          -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
                          nobody/thing&lt;br /&gt;
&lt;br /&gt;
ExecStop=/usr/bin/docker stop -t 30 thing&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Helpful commands ====&lt;br /&gt;
&lt;br /&gt;
===== List running containers =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker ps&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Shell ''inside'' a container =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker exec -it CONTAINER_NAME /bin/bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
For more information, see the [https://docs.docker.com/engine/reference/commandline/exec/ docker exec] documentation.&lt;br /&gt;
&lt;br /&gt;
===== Prune docker =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker system prune --all --volumes&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remove unused containers, networks, volumes, images and build cache. As the WARNING this command gives says, this will remove all of the previously mentioned items for anything not in use by a running container. In a correctly configured environment, this is fine. But be aware and proceed cautiously the first time. See the [https://docs.docker.com/engine/reference/commandline/system_prune/ docker system prune] documentation for more details.&lt;br /&gt;
&lt;br /&gt;
===== Get docker run command =====&lt;br /&gt;
&lt;br /&gt;
Getting the &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command from GUI managers can be hard, this docker image makes it easy for a running container ([https://stackoverflow.com/questions/32758793/how-to-show-the-run-command-of-a-docker-container source]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike CONTAINER_NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Get docker-compose =====&lt;br /&gt;
&lt;br /&gt;
Getting a &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; from running instances is possible w/ [https://hub.docker.com/r/red5d/docker-autocompose red5d/docker-autocompose], in case you’ve already started your containers w/ &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker create&amp;lt;/code&amp;gt; and want to change to &amp;lt;code&amp;gt;docker-compose&amp;lt;/code&amp;gt; style. It is also great for sharing your settings with others, since it doesn’t matter what management software you’re using. The last argument(s) are your container names and you can pass in as many as needed at the same time. The first container name is required, more are optional. You can see container names in the '''NAMES''' column of `docker ps`, they're usually set by you or might be generated based on the image like &amp;lt;code&amp;gt;binhex-qbittorrent&amp;lt;/code&amp;gt;. It is *not* the image name, like &amp;lt;code&amp;gt;binhex/arch-qbittorrentvpn&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock red5d/docker-autocompose CONTAINER_NAME [CONTAINER_NAME] ... [CONTAINER_NAME]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Troubleshoot networking =====&lt;br /&gt;
&lt;br /&gt;
Most Docker images don’t have many useful tools in them for troubleshooting, but you can [https://success.docker.com/article/troubleshooting-container-networking attach a network troubleshooting type image] to an existing container to help with that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run -it --rm --network container:CONTAINER_NAME nicolaka/netshoot&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chown user and group =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chown -R user:group /some/path/here&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chmod to 775/664 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R a=,a+rX,u+w,g+w /some/path/here&lt;br /&gt;
          ^  ^    ^   ^ adds write to group&lt;br /&gt;
          |  |    | adds write to user&lt;br /&gt;
          |  | adds read to all and execute to all folders (which controls access)&lt;br /&gt;
          | sets all to `000`&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Find UID/GID for user =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;id &amp;lt;username&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Examine files for hard links =====&lt;br /&gt;
&amp;lt;pre&amp;gt;ls -alhi&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 hardlink&lt;br /&gt;
42207936 -rw-r--r--  1 user group    0 Sep 11 11:55 nohardlinks&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 original&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;stat original&lt;br /&gt;
  File: original&lt;br /&gt;
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file&lt;br /&gt;
Device: 803h/2051d      Inode: 42207934    Links: 2&lt;br /&gt;
Access: (0644/-rw-r--r--)  Uid: ( 1000/ user)   Gid: ( 1001/ group)&lt;br /&gt;
Access: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Modify: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Change: 2020-09-11 11:55:49.706660476 -0500&lt;br /&gt;
 Birth: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Interesting docker images ====&lt;br /&gt;
&lt;br /&gt;
* [https://hub.docker.com/r/rasmunk/sshfs rasmunk/sshfs] let you create an sshfs volume, ''perfect'' for a seedbox setup using a remote mount instead of sync. Better documentation, including examples can be found at the github [https://github.com/rasmunk/docker-volume-sshfs rasmunk/docker-volume-sshfs] repository. This is a more recently maintained fork of [https://hub.docker.com/p/vieux/sshfs vieux/sshfs].&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/sonarr sonarr], [https://hub.docker.com/r/hotio/radarr radarr] and [https://hub.docker.com/r/hotio/lidarr lidarr] images let you run the built in version ''or'' specify an alternative via environment variable. The documentation and Dockerfile also don’t make any poor path suggestions.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/ombi ombi], [https://hub.docker.com/r/hotio/jackett jackett], [https://hub.docker.com/r/hotio/nzbhydra2 nzbhydra2] and [https://hub.docker.com/r/hotio/bazarr bazarr] are useful too, but don’t really require any special permissions or paths.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/unpackerr unpackerr] is useful for packed torrent extraction across a variety of torrent clients where unpacking is lacking or missing entirely.&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-qbittorrentvpn/ qbittorrent], [https://hub.docker.com/r/binhex/arch-delugevpn/ deluge] and [https://hub.docker.com/r/binhex/arch-rtorrentvpn/ rtorrent] are popular torrent clients with built in VPN support. For usenet, there is [https://hub.docker.com/r/binhex/arch-sabnzbd/ sabnzbd] and [https://hub.docker.com/r/binhex/arch-nzbget/ nzbget].&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-sonarr/ sonarr], [https://hub.docker.com/r/binhex/arch-radarr/ radarr] and [https://hub.docker.com/r/binhex/arch-lidarr/ lidarr] images suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume.&lt;br /&gt;
* [https://hub.docker.com/u/linuxserver linuxserver.io’s] images also suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume. But they do have images for a ''lot'' of software and they’re well maintained.&lt;br /&gt;
* [https://hub.docker.com/r/pyouroboros/ouroboros pyouroboros/ouroboros] or [https://hub.docker.com/r/containrrr/watchtower containrrr/watchtower] automatically update your running Docker containers to the latest available image. These are not recommended if you use Docker Compose.&lt;br /&gt;
&lt;br /&gt;
==== Custom Docker Network and DNS ====&lt;br /&gt;
&lt;br /&gt;
One interesting feature of a [https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks custom Docker network] is that it gets its own DNS server. If you create a bridge network for your containers, you can use their hostnames in your configuration. For example, if you &amp;lt;code&amp;gt;docker run --network=isolated --hostname=deluge binhex/arch-deluge&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docker run --network=isolated --hostname=radarr binhex/arch-radarr&amp;lt;/code&amp;gt;, you can then configure the Download Client in Radarr to point at just &amp;lt;code&amp;gt;deluge&amp;lt;/code&amp;gt; and it’ll work ''and'' communicate on its own private network. Which means if you wanted to be even more secure, you could ''stop'' forwarding that port too. If you put your reverse proxy container on the same network, you can even stop forwarding the web interface ports and make them even more secure.&lt;br /&gt;
&lt;br /&gt;
==== Common Problems ====&lt;br /&gt;
&lt;br /&gt;
===== Correct ''outside'' paths, incorrect ''inside'' paths =====&lt;br /&gt;
&lt;br /&gt;
Many people read this and think they understand, but they end up seeing the outside path correctly to something like &amp;lt;code&amp;gt;/data/usenet&amp;lt;/code&amp;gt;, but then they miss the point and set the ''inside'' path to &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; still.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers as root or changing users around =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself running your containers as &amp;lt;code&amp;gt;root:root&amp;lt;/code&amp;gt;, you’re doing something wrong. If you’re not passing in a UID and GID, you’ll be using what ever the default is for the image and ''that'' will be unlikely to line up w/ a reasonable user on your system. And if you’re changing the user and group your Docker containers are running as, you’ll probably end up w/ permissions issues on folders like the &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; folder which will likely have files and folders in them that got created the first time w/ the UID/GID you used the first time.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers w/ umask 000 =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself setting a UMASK of &amp;lt;code&amp;gt;000&amp;lt;/code&amp;gt; (which is 777 for folders and 666 for files), you’re ''also'' doing something wrong. It leaves your files and folders read/write to ''everyone'', which is poor Linux hygiene.&lt;br /&gt;
&lt;br /&gt;
==== LinuxServer.io ====&lt;br /&gt;
&lt;br /&gt;
The ''entire'' reason this article even exists is [https://hub.docker.com/u/linuxserver linuxserver.io]’s documentation and default path suggestions. They’re singlehandedly responsible for the &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; paths which ''break'' hard links and atomic moves. It is for this reason that ''none'' of them are ''specifically'' recommended by this article. That said, once you understand the problem with those paths and that you ''don’t'' have to use them, their images are fine. So feel free to use them and ''most'' of their documentation. Just ''ignore'' their path suggestions.&lt;br /&gt;
&lt;br /&gt;
==== Getting Help ====&lt;br /&gt;
&lt;br /&gt;
Need some help? For real time, chat style support try the [https://discord.gg/xyRwnyB Sonarr] or [https://discord.gg/SRBnFmX Radarr] Discord servers. If you prefer forum style support, make a post in [http://reddit.com/r/sonarr /r/sonarr] or [http://reddit.com/r/radarr /r/radarr].&lt;/div&gt;</summary>
		<author><name>Fryfrog</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1342</id>
		<title>Docker Guide</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1342"/>
		<updated>2020-10-07T19:44:58Z</updated>

		<summary type="html">&lt;p&gt;Fryfrog: Improving the get docker-compose section to be clearer about what CONTAINER_NAME and [CONTAINER_NAME]&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Best Docker Setup ===&lt;br /&gt;
&lt;br /&gt;
'''TL; DR''': An [https://www.lexico.com/en/definition/eponymous eponymous] user per daemon and a shared group with a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. Consistent path definitions between ''all'' containers that maintains the folder structure. Using one volume for Sonarr, Radarr and Lidarr so the download folder and library folder are on the same file system which makes hard links and instant moves possible. And most of all, ignore ''most'' of the Docker image’s path documentation!&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
&lt;br /&gt;
This article will not show you specifics about the best Docker setup, but it describes an overview that you can use to make your own setup the best that it can be. The idea is that you run each docker container as its own user, with a shared group and consistent volumes so every container sees the same path layout. This is easy to say, but difficult to understand and explain.&lt;br /&gt;
&lt;br /&gt;
==== Multiple users and a shared group ====&lt;br /&gt;
&lt;br /&gt;
===== Permissions =====&lt;br /&gt;
&lt;br /&gt;
Ideally, each software runs as its own user user and they’re all part of a shared group with folder permissions set to &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxrwxr-x&amp;lt;/code&amp;gt;) and files set to &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-rw-r--&amp;lt;/code&amp;gt;), which is a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. A sane alternative to this is a single shared user, which would use &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; which is a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt;. You can restrict permissions even more by denying read from “other”, which would be a umask of &amp;lt;code&amp;gt;007&amp;lt;/code&amp;gt; for a user per daemon or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; for a single shared user. For a deeper explanation, try the Arch Linux wiki articles about [https://wiki.archlinux.org/index.php/File_permissions_and_attributes File permissions and attributes] and [https://wiki.archlinux.org/index.php/Umask Umask].&lt;br /&gt;
&lt;br /&gt;
===== UMASK =====&lt;br /&gt;
&lt;br /&gt;
Many docker images accept a &amp;lt;code&amp;gt;-e UMASK=002&amp;lt;/code&amp;gt; environment variable and some software inside can be configured with a user, group and umask (NZBGet) or folder/file permission (Sonarr/Radarr). This will ensure that files and folders created by ''one'' can be read and written by the others. If you’re using existing folders and files, you’ll need to fix their current ownership and permissions too, but going forward they’ll be correct because you set each software up right.&lt;br /&gt;
&lt;br /&gt;
===== PUID and PGID =====&lt;br /&gt;
&lt;br /&gt;
Many docker images also take a &amp;lt;code&amp;gt;-e PUID=123&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-e PGID=321&amp;lt;/code&amp;gt; that lets you change the UID/GID used inside to that of an account on the outside. If you ever peak in, you’ll find that username is something like &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;hotio&amp;lt;/code&amp;gt;, but because it uses the UID/GID you pass in, on the outside it looks like the expected user. If you’re using storage from another system via NFS or CIFS, it will make your life easier if ''that'' system also has matching users and group. Perhaps let one system pick the UID/GIDs, then re-use those on the other system, assuming they don’t conflict.&lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
&lt;br /&gt;
You run [https://github.com/Sonarr/Sonarr/releases Sonarr] using [https://github.com/hotio/docker-sonarr hotio/sonarr], you’ve created a &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user with uid &amp;lt;code&amp;gt;123&amp;lt;/code&amp;gt; and a shared group &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; with gid &amp;lt;code&amp;gt;321&amp;lt;/code&amp;gt; which the &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user is a member of. You configure the Docker image to run with &amp;lt;code&amp;gt;-e PUID=123 -e PGID=321 -e UMASK=002&amp;lt;/code&amp;gt;. Sonarr also lets you configured user, group as well as folder and file permissions. The previous settings should negate these, but you could configure them if you wanted. Folders would be &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt;, files &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; and the user/group are a little tricky because ''inside'' the container, they have a different name. Maybe &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt;. I’d leave all these blank unless you find you need them for some reason.&lt;br /&gt;
&lt;br /&gt;
==== Single user and optional shared group ====&lt;br /&gt;
&lt;br /&gt;
Another popular and arguably easier option is a single, shared user. Perhaps even ''your'' user. It isn’t as secure and doesn’t follow best practices, but in the end it is easier to understand and implement. The UMASK for this is &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; which results in &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxr-xr-x&amp;lt;/code&amp;gt;) for folders and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-r--r--&amp;lt;/code&amp;gt;) for files. The group no longer really matters, so you’ll probably just use the group named after the user. This does make it harder to share with ''other'' users, so you may still end up wanting a UMASK of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt; even w/ this setup.&lt;br /&gt;
&lt;br /&gt;
==== Ownership and permissions of /config ====&lt;br /&gt;
&lt;br /&gt;
Don’t forget that your &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; volume will ''also'' need to have correct ownership and permissions, usually the daemon’s user and that user’s group like &amp;lt;code&amp;gt;sonarr:sonarr&amp;lt;/code&amp;gt; and a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; so ''only'' that user has access. In a single user setup, this would of course be the one user you’ve chosen.&lt;br /&gt;
&lt;br /&gt;
==== Consistent and well planned paths ====&lt;br /&gt;
&lt;br /&gt;
The easiest and most important detail is to create unified path definitions across all the containers.&lt;br /&gt;
&lt;br /&gt;
If you’re wondering why hard links aren’t working or why a simple move is taking far longer than it should, this section explains it. The paths you use on the ''inside'' matter. Because of how Docker’s volumes work, passing in two volumes such as the commonly suggested &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; makes them look like two file systems, even if they aren’t. This means hard links won’t work ''and'' instead of an instant move, a slower and more io intensive copy + delete is used. If you have multiple download clients because you’re using torrents and usenet, having a single &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; path means they’ll be mixed up. Because the Radarr in one container will ask the NZBGet in its own container where files are, using the same path in both means it will all just work. If you don’t, you’d need to fix it with a remote path map.&lt;br /&gt;
&lt;br /&gt;
So pick ''one'' path layout and use it for all of them. I’m a fan of &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt;, but there are other great names like &amp;lt;code&amp;gt;/shared&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/dvr&amp;lt;/code&amp;gt;. If this can be the same on the outside ''and'' inside, your setup will be simpler: one path to remember or if integrating docker and native software. But if not, that’s fine too. For example, Synology might use &amp;lt;code&amp;gt;/Volume1/data&amp;lt;/code&amp;gt; and unRAID might use &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt; on the outside, but &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; on the inside is fine.&lt;br /&gt;
&lt;br /&gt;
It is also important to remember that you’ll need to setup or re-configure paths in the software running ''inside'' these Docker containers. If you change the paths for your download client, you’ll need to edit its settings to match. If you change your library path, you’ll need to change those settings in Sonarr, Radarr, Lidarr and/or Plex.&lt;br /&gt;
&lt;br /&gt;
===== Examples =====&lt;br /&gt;
&lt;br /&gt;
What matters here is the general structure, not the names. You are free to pick folder names that make sense to you. And there are other ways of arranging things too. For example, you’re not likely to download and run into conflicts of identical releases between usenet and torrents, so you ''could'' put both in &amp;lt;code&amp;gt;/data/downloads/{movies|music|tv}&amp;lt;/code&amp;gt; folders. Downloads don’t even have to be sorted into sub-folders either, since movies, music and tv will rarely conflict.&lt;br /&gt;
&lt;br /&gt;
This example &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; folder has nicely named &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; sub-folders, this is your library and what you’d pass to Plex or Emby.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
The path for each Docker container can be as specific as needed while still maintaining the correct structure:&lt;br /&gt;
&lt;br /&gt;
====== Torrents ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── torrents&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Torrents only needs access to torrent files, so pass it &amp;lt;code&amp;gt;-v /host/data/torrents:/data/torrents&amp;lt;/code&amp;gt;. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/torrents/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Usenet ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── usenet&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Usenet only needs access to usenet files, so pass it &amp;lt;code&amp;gt;-v /host/data/usenet:/data/usenet&amp;lt;/code&amp;gt;. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/usenet/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Media Server ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Plex/Emby only needs access to your media library, so pass &amp;lt;code&amp;gt;-v /host/data/media:/data/media&amp;lt;/code&amp;gt;, which can have any number of sub folders like &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Kids Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Documentary TV&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; as sub folders.&lt;br /&gt;
&lt;br /&gt;
====== Sonarr, Radarr and Lidarr ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sonarr, Radarr and Lidarr get everything using &amp;lt;code&amp;gt;-v /host/data:/data&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
===== Issues =====&lt;br /&gt;
&lt;br /&gt;
There are a couple minor issues w/ not following the Docker image’s suggested paths.&lt;br /&gt;
&lt;br /&gt;
The biggest is that volumes defined in the &amp;lt;code&amp;gt;Dockerfile&amp;lt;/code&amp;gt; will get created if they’re not specified, this means they’ll pile up as you delete and re-create the containers. If they end up w/ data in them, they can consume space unexpectedly and likely in an unsuitable place. You can find a [https://old.reddit.com/r/usenet/wiki/docker#wiki_prune_docker cleanup command] in the helpful commands section below. This could also be mitigated by passing in an empty folder for all the volumes you don’t want to use, like &amp;lt;code&amp;gt;/data/empty:/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/data/empty:/downloads&amp;lt;/code&amp;gt;. Maybe even put a file named &amp;lt;code&amp;gt;DO NOT USE THIS FOLDER&amp;lt;/code&amp;gt; inside, to remind yourself.&lt;br /&gt;
&lt;br /&gt;
Another problem is that some images are pre-configured to use the documented volumes, so you’ll need to change settings in the software inside the Docker container. Thankfully, since configuration persists outside the container this is a one time issue. You might also pick a path like &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; which some images already define for a specific use. It shouldn’t be a problem, but will be a little more confusing when combined w/ the previous issues. In the end, it is worth it for working hard links and fast moves. The consistency and simplicity are welcome side effects as well.&lt;br /&gt;
&lt;br /&gt;
If you use the latest version of the abandoned [https://github.com/Sperryfreak01/RadarrSync RadarrSync] to synchronize two Radarr instances, it ''depends'' on mapping the ''same'' path inside to a different path on the outside, for example &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; for one instance would point at &amp;lt;code&amp;gt;/data/media/Movies&amp;lt;/code&amp;gt; and the other at &amp;lt;code&amp;gt;/data/media/Movies 4k&amp;lt;/code&amp;gt;. This breaks ''everything'' you’ve read above. There is no good solution, you either use the old version which isn’t as good, do your mapping in a way that is ugly and breaks hard links or just don’t use it at all.&lt;br /&gt;
&lt;br /&gt;
==== Running containers using ====&lt;br /&gt;
&lt;br /&gt;
===== Docker-compose =====&lt;br /&gt;
&lt;br /&gt;
This is the best option for most users, it lets you control and configure many containers and their interdependence in one file. A good starting place is docker’s own [https://docs.docker.com/compose/gettingstarted/ Get started with Docker Compose]. You can use [https://composerize.com composerize] or [https://old.reddit.com/r/usenet/wiki/docker#wiki_get_docker-compose red5d/docker-autocompose]to convert &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands into a single &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
The below is ''not'' a complete working example! The containers only have PID, UID, UMASK and example paths defined to keep it simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
Sonarr:&lt;br /&gt;
    image: &amp;amp;quot;hotio/sonarr&amp;amp;quot;&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sonarr:/config&lt;br /&gt;
        - /host/data:/data&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=111&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
Deluge:&lt;br /&gt;
    image: binhex/arch-delugevpn&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/deluge:/config&lt;br /&gt;
        - /host/data/torrents:/data/torrents&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=222&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
SABnzbd:&lt;br /&gt;
    image: binhex/arch-sabnzbd&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sabnzbd:/config&lt;br /&gt;
        - /host/data/usenet:/data/usenet&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=333&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
Plex:&lt;br /&gt;
    image: binhex/arch-plex&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/plex:/config&lt;br /&gt;
        - /host/data/media:/data/media&lt;br /&gt;
&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=444&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update all images and containers ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull&lt;br /&gt;
docker-compose up -d&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update individual image and container ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull NAME&lt;br /&gt;
docker-compose up -d NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Docker Run =====&lt;br /&gt;
&lt;br /&gt;
Like the Docker Compose example above, the following &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands are stripped down to ''only'' the PUID, PGID, UMASK and volumes in order to act as an obvious example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
docker run -v /path/to/config/sonarr:/config \&lt;br /&gt;
           -v /host/data:/data \&lt;br /&gt;
           -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           hotio/sonarr&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
docker run -v /path/to/config/deluge:/config \&lt;br /&gt;
           -v /host/data/torrents:/data/torrents \&lt;br /&gt;
           -e PUID=222 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-delugevpn&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
docker run -v /path/to/config/sabnzbd:/config \&lt;br /&gt;
           -v /host/data/usenet:/data/usenet \&lt;br /&gt;
           -e PUID=333 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-sabnzbd&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
docker run -v /path/to/config/plex:/config \&lt;br /&gt;
           -v /host/data/media:/data/media \&lt;br /&gt;
           -e PUID=444 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-plex&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Systemd =====&lt;br /&gt;
&lt;br /&gt;
I don’t run a full Docker setup, so I manage my few Docker containers with individual systemd service files. It standardizes control and makes dependencies simpler for both native and docker services. The generic example below can be adapted to any container by adjusting or adding the various values and options.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# /etc/systemd/system/thing.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Thing&lt;br /&gt;
Requires=docker.service&lt;br /&gt;
After=network.target docker.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/docker run --rm \&lt;br /&gt;
                          --name=thing \&lt;br /&gt;
                          -v /path/to/config/thing:/config \&lt;br /&gt;
                          -v /host/data:/data&lt;br /&gt;
                          -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
                          nobody/thing&lt;br /&gt;
&lt;br /&gt;
ExecStop=/usr/bin/docker stop -t 30 thing&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Helpful commands ====&lt;br /&gt;
&lt;br /&gt;
===== List running containers =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker ps&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Shell ''inside'' a container =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker exec -it CONTAINER_NAME /bin/bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
For more information, see the [https://docs.docker.com/engine/reference/commandline/exec/ docker exec] documentation.&lt;br /&gt;
&lt;br /&gt;
===== Prune docker =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker system prune --all --volumes&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remove unused containers, networks, volumes, images and build cache. As the WARNING this command gives says, this will remove all of the previously mentioned items for anything not in use by a running container. In a correctly configured environment, this is fine. But be aware and proceed cautiously the first time. See the [https://docs.docker.com/engine/reference/commandline/system_prune/ docker system prune] documentation for more details.&lt;br /&gt;
&lt;br /&gt;
===== Get docker run command =====&lt;br /&gt;
&lt;br /&gt;
Getting the &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command from GUI managers can be hard, this docker image makes it easy for a running container ([https://stackoverflow.com/questions/32758793/how-to-show-the-run-command-of-a-docker-container source]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike CONTAINER_NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Get docker-compose =====&lt;br /&gt;
&lt;br /&gt;
Getting a &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; from running instances is possible w/ [https://hub.docker.com/r/red5d/docker-autocompose red5d/docker-autocompose], in case you’ve already started your containers w/ &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker create&amp;lt;/code&amp;gt; and want to change to &amp;lt;code&amp;gt;docker-compose&amp;lt;/code&amp;gt; style. It is also great for sharing your settings with others, since it doesn’t matter what management software you’re using. The last argument(s) are your container names and you can pass in as many as needed at the same time. The first container name is required, more are optional. You can see container names in the NAMES column of `docker ps`, they're usually set by you or might be generated based on the image like `binhex-qbittorrent`. It is *not* the image name, like `binhex/arch-qbittorrentvpn`.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock red5d/docker-autocompose CONTAINER_NAME [CONTAINER_NAME] ... [CONTAINER_NAME]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Troubleshoot networking =====&lt;br /&gt;
&lt;br /&gt;
Most Docker images don’t have many useful tools in them for troubleshooting, but you can [https://success.docker.com/article/troubleshooting-container-networking attach a network troubleshooting type image] to an existing container to help with that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run -it --rm --network container:CONTAINER_NAME nicolaka/netshoot&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chown user and group =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chown -R user:group /some/path/here&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chmod to 775/664 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R a=,a+rX,u+w,g+w /some/path/here&lt;br /&gt;
          ^  ^    ^   ^ adds write to group&lt;br /&gt;
          |  |    | adds write to user&lt;br /&gt;
          |  | adds read to all and execute to all folders (which controls access)&lt;br /&gt;
          | sets all to `000`&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Find UID/GID for user =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;id &amp;lt;username&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Examine files for hard links =====&lt;br /&gt;
&amp;lt;pre&amp;gt;ls -alhi&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 hardlink&lt;br /&gt;
42207936 -rw-r--r--  1 user group    0 Sep 11 11:55 nohardlinks&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 original&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;stat original&lt;br /&gt;
  File: original&lt;br /&gt;
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file&lt;br /&gt;
Device: 803h/2051d      Inode: 42207934    Links: 2&lt;br /&gt;
Access: (0644/-rw-r--r--)  Uid: ( 1000/ user)   Gid: ( 1001/ group)&lt;br /&gt;
Access: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Modify: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Change: 2020-09-11 11:55:49.706660476 -0500&lt;br /&gt;
 Birth: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Interesting docker images ====&lt;br /&gt;
&lt;br /&gt;
* [https://hub.docker.com/r/rasmunk/sshfs rasmunk/sshfs] let you create an sshfs volume, ''perfect'' for a seedbox setup using a remote mount instead of sync. Better documentation, including examples can be found at the github [https://github.com/rasmunk/docker-volume-sshfs rasmunk/docker-volume-sshfs] repository. This is a more recently maintained fork of [https://hub.docker.com/p/vieux/sshfs vieux/sshfs].&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/sonarr sonarr], [https://hub.docker.com/r/hotio/radarr radarr] and [https://hub.docker.com/r/hotio/lidarr lidarr] images let you run the built in version ''or'' specify an alternative via environment variable. The documentation and Dockerfile also don’t make any poor path suggestions.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/ombi ombi], [https://hub.docker.com/r/hotio/jackett jackett], [https://hub.docker.com/r/hotio/nzbhydra2 nzbhydra2] and [https://hub.docker.com/r/hotio/bazarr bazarr] are useful too, but don’t really require any special permissions or paths.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/unpackerr unpackerr] is useful for packed torrent extraction across a variety of torrent clients where unpacking is lacking or missing entirely.&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-qbittorrentvpn/ qbittorrent], [https://hub.docker.com/r/binhex/arch-delugevpn/ deluge] and [https://hub.docker.com/r/binhex/arch-rtorrentvpn/ rtorrent] are popular torrent clients with built in VPN support. For usenet, there is [https://hub.docker.com/r/binhex/arch-sabnzbd/ sabnzbd] and [https://hub.docker.com/r/binhex/arch-nzbget/ nzbget].&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-sonarr/ sonarr], [https://hub.docker.com/r/binhex/arch-radarr/ radarr] and [https://hub.docker.com/r/binhex/arch-lidarr/ lidarr] images suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume.&lt;br /&gt;
* [https://hub.docker.com/u/linuxserver linuxserver.io’s] images also suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume. But they do have images for a ''lot'' of software and they’re well maintained.&lt;br /&gt;
* [https://hub.docker.com/r/pyouroboros/ouroboros pyouroboros/ouroboros] or [https://hub.docker.com/r/containrrr/watchtower containrrr/watchtower] automatically update your running Docker containers to the latest available image. These are not recommended if you use Docker Compose.&lt;br /&gt;
&lt;br /&gt;
==== Custom Docker Network and DNS ====&lt;br /&gt;
&lt;br /&gt;
One interesting feature of a [https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks custom Docker network] is that it gets its own DNS server. If you create a bridge network for your containers, you can use their hostnames in your configuration. For example, if you &amp;lt;code&amp;gt;docker run --network=isolated --hostname=deluge binhex/arch-deluge&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docker run --network=isolated --hostname=radarr binhex/arch-radarr&amp;lt;/code&amp;gt;, you can then configure the Download Client in Radarr to point at just &amp;lt;code&amp;gt;deluge&amp;lt;/code&amp;gt; and it’ll work ''and'' communicate on its own private network. Which means if you wanted to be even more secure, you could ''stop'' forwarding that port too. If you put your reverse proxy container on the same network, you can even stop forwarding the web interface ports and make them even more secure.&lt;br /&gt;
&lt;br /&gt;
==== Common Problems ====&lt;br /&gt;
&lt;br /&gt;
===== Correct ''outside'' paths, incorrect ''inside'' paths =====&lt;br /&gt;
&lt;br /&gt;
Many people read this and think they understand, but they end up seeing the outside path correctly to something like &amp;lt;code&amp;gt;/data/usenet&amp;lt;/code&amp;gt;, but then they miss the point and set the ''inside'' path to &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; still.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers as root or changing users around =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself running your containers as &amp;lt;code&amp;gt;root:root&amp;lt;/code&amp;gt;, you’re doing something wrong. If you’re not passing in a UID and GID, you’ll be using what ever the default is for the image and ''that'' will be unlikely to line up w/ a reasonable user on your system. And if you’re changing the user and group your Docker containers are running as, you’ll probably end up w/ permissions issues on folders like the &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; folder which will likely have files and folders in them that got created the first time w/ the UID/GID you used the first time.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers w/ umask 000 =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself setting a UMASK of &amp;lt;code&amp;gt;000&amp;lt;/code&amp;gt; (which is 777 for folders and 666 for files), you’re ''also'' doing something wrong. It leaves your files and folders read/write to ''everyone'', which is poor Linux hygiene.&lt;br /&gt;
&lt;br /&gt;
==== LinuxServer.io ====&lt;br /&gt;
&lt;br /&gt;
The ''entire'' reason this article even exists is [https://hub.docker.com/u/linuxserver linuxserver.io]’s documentation and default path suggestions. They’re singlehandedly responsible for the &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; paths which ''break'' hard links and atomic moves. It is for this reason that ''none'' of them are ''specifically'' recommended by this article. That said, once you understand the problem with those paths and that you ''don’t'' have to use them, their images are fine. So feel free to use them and ''most'' of their documentation. Just ''ignore'' their path suggestions.&lt;br /&gt;
&lt;br /&gt;
==== Getting Help ====&lt;br /&gt;
&lt;br /&gt;
Need some help? For real time, chat style support try the [https://discord.gg/xyRwnyB Sonarr] or [https://discord.gg/SRBnFmX Radarr] Discord servers. If you prefer forum style support, make a post in [http://reddit.com/r/sonarr /r/sonarr] or [http://reddit.com/r/radarr /r/radarr].&lt;/div&gt;</summary>
		<author><name>Fryfrog</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1327</id>
		<title>Docker Guide</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1327"/>
		<updated>2020-09-15T23:40:50Z</updated>

		<summary type="html">&lt;p&gt;Fryfrog: /* PUID and PGID */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Best Docker Setup ===&lt;br /&gt;
&lt;br /&gt;
'''TL; DR''': An [https://www.lexico.com/en/definition/eponymous eponymous] user per daemon and a shared group with a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. Consistent path definitions between ''all'' containers that maintains the folder structure. Using one volume for Sonarr, Radarr and Lidarr so the download folder and library folder are on the same file system which makes hard links and instant moves possible. And most of all, ignore ''most'' of the Docker image’s path documentation!&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
&lt;br /&gt;
This article will not show you specifics about the best Docker setup, but it describes an overview that you can use to make your own setup the best that it can be. The idea is that you run each docker container as its own user, with a shared group and consistent volumes so every container sees the same path layout. This is easy to say, but difficult to understand and explain.&lt;br /&gt;
&lt;br /&gt;
==== Multiple users and a shared group ====&lt;br /&gt;
&lt;br /&gt;
===== Permissions =====&lt;br /&gt;
&lt;br /&gt;
Ideally, each software runs as its own user user and they’re all part of a shared group with folder permissions set to &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxrwxr-x&amp;lt;/code&amp;gt;) and files set to &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-rw-r--&amp;lt;/code&amp;gt;), which is a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. A sane alternative to this is a single shared user, which would use &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; which is a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt;. You can restrict permissions even more by denying read from “other”, which would be a umask of &amp;lt;code&amp;gt;007&amp;lt;/code&amp;gt; for a user per daemon or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; for a single shared user. For a deeper explanation, try the Arch Linux wiki articles about [https://wiki.archlinux.org/index.php/File_permissions_and_attributes File permissions and attributes] and [https://wiki.archlinux.org/index.php/Umask Umask].&lt;br /&gt;
&lt;br /&gt;
===== UMASK =====&lt;br /&gt;
&lt;br /&gt;
Many docker images accept a &amp;lt;code&amp;gt;-e UMASK=002&amp;lt;/code&amp;gt; environment variable and some software inside can be configured with a user, group and umask (NZBGet) or folder/file permission (Sonarr/Radarr). This will ensure that files and folders created by ''one'' can be read and written by the others. If you’re using existing folders and files, you’ll need to fix their current ownership and permissions too, but going forward they’ll be correct because you set each software up right.&lt;br /&gt;
&lt;br /&gt;
===== PUID and PGID =====&lt;br /&gt;
&lt;br /&gt;
Many docker images also take a &amp;lt;code&amp;gt;-e PUID=123&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-e PGID=321&amp;lt;/code&amp;gt; that lets you change the UID/GID used inside to that of an account on the outside. If you ever peak in, you’ll find that username is something like &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;hotio&amp;lt;/code&amp;gt;, but because it uses the UID/GID you pass in, on the outside it looks like the expected user. If you’re using storage from another system via NFS or CIFS, it will make your life easier if ''that'' system also has matching users and group. Perhaps let one system pick the UID/GIDs, then re-use those on the other system, assuming they don’t conflict.&lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
&lt;br /&gt;
You run [https://github.com/Sonarr/Sonarr/releases Sonarr] using [https://github.com/hotio/docker-sonarr hotio/sonarr], you’ve created a &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user with uid &amp;lt;code&amp;gt;123&amp;lt;/code&amp;gt; and a shared group &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; with gid &amp;lt;code&amp;gt;321&amp;lt;/code&amp;gt; which the &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user is a member of. You configure the Docker image to run with &amp;lt;code&amp;gt;-e PUID=123 -e PGID=321 -e UMASK=002&amp;lt;/code&amp;gt;. Sonarr also lets you configured user, group as well as folder and file permissions. The previous settings should negate these, but you could configure them if you wanted. Folders would be &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt;, files &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; and the user/group are a little tricky because ''inside'' the container, they have a different name. Maybe &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt;. I’d leave all these blank unless you find you need them for some reason.&lt;br /&gt;
&lt;br /&gt;
==== Single user and optional shared group ====&lt;br /&gt;
&lt;br /&gt;
Another popular and arguably easier option is a single, shared user. Perhaps even ''your'' user. It isn’t as secure and doesn’t follow best practices, but in the end it is easier to understand and implement. The UMASK for this is &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; which results in &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxr-xr-x&amp;lt;/code&amp;gt;) for folders and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-r--r--&amp;lt;/code&amp;gt;) for files. The group no longer really matters, so you’ll probably just use the group named after the user. This does make it harder to share with ''other'' users, so you may still end up wanting a UMASK of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt; even w/ this setup.&lt;br /&gt;
&lt;br /&gt;
==== Ownership and permissions of /config ====&lt;br /&gt;
&lt;br /&gt;
Don’t forget that your &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; volume will ''also'' need to have correct ownership and permissions, usually the daemon’s user and that user’s group like &amp;lt;code&amp;gt;sonarr:sonarr&amp;lt;/code&amp;gt; and a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; so ''only'' that user has access. In a single user setup, this would of course be the one user you’ve chosen.&lt;br /&gt;
&lt;br /&gt;
==== Consistent and well planned paths ====&lt;br /&gt;
&lt;br /&gt;
The easiest and most important detail is to create unified path definitions across all the containers.&lt;br /&gt;
&lt;br /&gt;
If you’re wondering why hard links aren’t working or why a simple move is taking far longer than it should, this section explains it. The paths you use on the ''inside'' matter. Because of how Docker’s volumes work, passing in two volumes such as the commonly suggested &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; makes them look like two file systems, even if they aren’t. This means hard links won’t work ''and'' instead of an instant move, a slower and more io intensive copy + delete is used. If you have multiple download clients because you’re using torrents and usenet, having a single &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; path means they’ll be mixed up. Because the Radarr in one container will ask the NZBGet in its own container where files are, using the same path in both means it will all just work. If you don’t, you’d need to fix it with a remote path map.&lt;br /&gt;
&lt;br /&gt;
So pick ''one'' path layout and use it for all of them. I’m a fan of &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt;, but there are other great names like &amp;lt;code&amp;gt;/shared&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/dvr&amp;lt;/code&amp;gt;. If this can be the same on the outside ''and'' inside, your setup will be simpler: one path to remember or if integrating docker and native software. But if not, that’s fine too. For example, Synology might use &amp;lt;code&amp;gt;/Volume1/data&amp;lt;/code&amp;gt; and unRAID might use &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt; on the outside, but &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; on the inside is fine.&lt;br /&gt;
&lt;br /&gt;
It is also important to remember that you’ll need to setup or re-configure paths in the software running ''inside'' these Docker containers. If you change the paths for your download client, you’ll need to edit its settings to match. If you change your library path, you’ll need to change those settings in Sonarr, Radarr, Lidarr and/or Plex.&lt;br /&gt;
&lt;br /&gt;
===== Examples =====&lt;br /&gt;
&lt;br /&gt;
What matters here is the general structure, not the names. You are free to pick folder names that make sense to you. And there are other ways of arranging things too. For example, you’re not likely to download and run into conflicts of identical releases between usenet and torrents, so you ''could'' put both in &amp;lt;code&amp;gt;/data/downloads/{movies|music|tv}&amp;lt;/code&amp;gt; folders. Downloads don’t even have to be sorted into sub-folders either, since movies, music and tv will rarely conflict.&lt;br /&gt;
&lt;br /&gt;
This example &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; folder has nicely named &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; sub-folders, this is your library and what you’d pass to Plex or Emby.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
The path for each Docker container can be as specific as needed while still maintaining the correct structure:&lt;br /&gt;
&lt;br /&gt;
====== Torrents ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── torrents&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Torrents only needs access to torrent files, so pass it &amp;lt;code&amp;gt;-v /host/data/torrents:/data/torrents&amp;lt;/code&amp;gt;. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/torrents/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Usenet ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── usenet&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Usenet only needs access to usenet files, so pass it &amp;lt;code&amp;gt;-v /host/data/usenet:/data/usenet&amp;lt;/code&amp;gt;. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/usenet/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Media Server ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Plex/Emby only needs access to your media library, so pass &amp;lt;code&amp;gt;-v /host/data/media:/data/media&amp;lt;/code&amp;gt;, which can have any number of sub folders like &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Kids Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Documentary TV&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; as sub folders.&lt;br /&gt;
&lt;br /&gt;
====== Sonarr, Radarr and Lidarr ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sonarr, Radarr and Lidarr get everything using &amp;lt;code&amp;gt;-v /host/data:/data&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
===== Issues =====&lt;br /&gt;
&lt;br /&gt;
There are a couple minor issues w/ not following the Docker image’s suggested paths.&lt;br /&gt;
&lt;br /&gt;
The biggest is that volumes defined in the &amp;lt;code&amp;gt;Dockerfile&amp;lt;/code&amp;gt; will get created if they’re not specified, this means they’ll pile up as you delete and re-create the containers. If they end up w/ data in them, they can consume space unexpectedly and likely in an unsuitable place. You can find a [https://old.reddit.com/r/usenet/wiki/docker#wiki_prune_docker cleanup command] in the helpful commands section below. This could also be mitigated by passing in an empty folder for all the volumes you don’t want to use, like &amp;lt;code&amp;gt;/data/empty:/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/data/empty:/downloads&amp;lt;/code&amp;gt;. Maybe even put a file named &amp;lt;code&amp;gt;DO NOT USE THIS FOLDER&amp;lt;/code&amp;gt; inside, to remind yourself.&lt;br /&gt;
&lt;br /&gt;
Another problem is that some images are pre-configured to use the documented volumes, so you’ll need to change settings in the software inside the Docker container. Thankfully, since configuration persists outside the container this is a one time issue. You might also pick a path like &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; which some images already define for a specific use. It shouldn’t be a problem, but will be a little more confusing when combined w/ the previous issues. In the end, it is worth it for working hard links and fast moves. The consistency and simplicity are welcome side effects as well.&lt;br /&gt;
&lt;br /&gt;
If you use the latest version of the abandoned [https://github.com/Sperryfreak01/RadarrSync RadarrSync] to synchronize two Radarr instances, it ''depends'' on mapping the ''same'' path inside to a different path on the outside, for example &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; for one instance would point at &amp;lt;code&amp;gt;/data/media/Movies&amp;lt;/code&amp;gt; and the other at &amp;lt;code&amp;gt;/data/media/Movies 4k&amp;lt;/code&amp;gt;. This breaks ''everything'' you’ve read above. There is no good solution, you either use the old version which isn’t as good, do your mapping in a way that is ugly and breaks hard links or just don’t use it at all.&lt;br /&gt;
&lt;br /&gt;
==== Running containers using ====&lt;br /&gt;
&lt;br /&gt;
===== Docker-compose =====&lt;br /&gt;
&lt;br /&gt;
This is the best option for most users, it lets you control and configure many containers and their interdependence in one file. A good starting place is docker’s own [https://docs.docker.com/compose/gettingstarted/ Get started with Docker Compose]. You can use [https://composerize.com composerize] or [https://old.reddit.com/r/usenet/wiki/docker#wiki_get_docker-compose red5d/docker-autocompose]to convert &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands into a single &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
The below is ''not'' a complete working example! The containers only have PID, UID, UMASK and example paths defined to keep it simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
Sonarr:&lt;br /&gt;
    image: &amp;amp;quot;hotio/sonarr&amp;amp;quot;&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sonarr:/config&lt;br /&gt;
        - /host/data:/data&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=111&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
Deluge:&lt;br /&gt;
    image: binhex/arch-delugevpn&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/deluge:/config&lt;br /&gt;
        - /host/data/torrents:/data/torrents&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=222&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
SABnzbd:&lt;br /&gt;
    image: binhex/arch-sabnzbd&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sabnzbd:/config&lt;br /&gt;
        - /host/data/usenet:/data/usenet&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=333&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
Plex:&lt;br /&gt;
    image: binhex/arch-plex&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/plex:/config&lt;br /&gt;
        - /host/data/media:/data/media&lt;br /&gt;
&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=444&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update all images and containers ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull&lt;br /&gt;
docker-compose up -d&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update individual image and container ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull NAME&lt;br /&gt;
docker-compose up -d NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Docker Run =====&lt;br /&gt;
&lt;br /&gt;
Like the Docker Compose example above, the following &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands are stripped down to ''only'' the PUID, PGID, UMASK and volumes in order to act as an obvious example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
docker run -v /path/to/config/sonarr:/config \&lt;br /&gt;
           -v /host/data:/data \&lt;br /&gt;
           -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           hotio/sonarr&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
docker run -v /path/to/config/deluge:/config \&lt;br /&gt;
           -v /host/data/torrents:/data/torrents \&lt;br /&gt;
           -e PUID=222 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-delugevpn&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
docker run -v /path/to/config/sabnzbd:/config \&lt;br /&gt;
           -v /host/data/usenet:/data/usenet \&lt;br /&gt;
           -e PUID=333 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-sabnzbd&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
docker run -v /path/to/config/plex:/config \&lt;br /&gt;
           -v /host/data/media:/data/media \&lt;br /&gt;
           -e PUID=444 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-plex&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Systemd =====&lt;br /&gt;
&lt;br /&gt;
I don’t run a full Docker setup, so I manage my few Docker containers with individual systemd service files. It standardizes control and makes dependencies simpler for both native and docker services. The generic example below can be adapted to any container by adjusting or adding the various values and options.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# /etc/systemd/system/thing.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Thing&lt;br /&gt;
Requires=docker.service&lt;br /&gt;
After=network.target docker.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/docker run --rm \&lt;br /&gt;
                          --name=thing \&lt;br /&gt;
                          -v /path/to/config/thing:/config \&lt;br /&gt;
                          -v /host/data:/data&lt;br /&gt;
                          -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
                          nobody/thing&lt;br /&gt;
&lt;br /&gt;
ExecStop=/usr/bin/docker stop -t 30 thing&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Helpful commands ====&lt;br /&gt;
&lt;br /&gt;
===== List running containers =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker ps&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Shell ''inside'' a container =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker exec -it CONTAINER_NAME /bin/bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
For more information, see the [https://docs.docker.com/engine/reference/commandline/exec/ docker exec] documentation.&lt;br /&gt;
&lt;br /&gt;
===== Prune docker =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker system prune --all --volumes&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remove unused containers, networks, volumes, images and build cache. As the WARNING this command gives says, this will remove all of the previously mentioned items for anything not in use by a running container. In a correctly configured environment, this is fine. But be aware and proceed cautiously the first time. See the [https://docs.docker.com/engine/reference/commandline/system_prune/ docker system prune] documentation for more details.&lt;br /&gt;
&lt;br /&gt;
===== Get docker run command =====&lt;br /&gt;
&lt;br /&gt;
Getting the &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command from GUI managers can be hard, this docker image makes it easy for a running container ([https://stackoverflow.com/questions/32758793/how-to-show-the-run-command-of-a-docker-container source]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike CONTAINER_NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Get docker-compose =====&lt;br /&gt;
&lt;br /&gt;
Getting a &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; from running instances is possible w/ [https://hub.docker.com/r/red5d/docker-autocompose red5d/docker-autocompose], in case you’ve already started your containers w/ &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker create&amp;lt;/code&amp;gt; and want to change to &amp;lt;code&amp;gt;docker-compose&amp;lt;/code&amp;gt; style. It is also great for sharing your settings with others, since it doesn’t matter what management software you’re using.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock red5d/docker-autocompose CONTAINER_NAME [CONTAINER_NAME] ... [CONTAINER_NAME]&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Troubleshoot networking =====&lt;br /&gt;
&lt;br /&gt;
Most Docker images don’t have many useful tools in them for troubleshooting, but you can [https://success.docker.com/article/troubleshooting-container-networking attach a network troubleshooting type image] to an existing container to help with that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run -it --rm --network container:CONTAINER_NAME nicolaka/netshoot&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chown user and group =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chown -R user:group /some/path/here&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chmod to 775/664 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R a=,a+rX,u+w,g+w /some/path/here&lt;br /&gt;
          ^  ^    ^   ^ adds write to group&lt;br /&gt;
          |  |    | adds write to user&lt;br /&gt;
          |  | adds read to all and execute to all folders (which controls access)&lt;br /&gt;
          | sets all to `000`&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Find UID/GID for user =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;id &amp;lt;username&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Examine files for hard links =====&lt;br /&gt;
&amp;lt;pre&amp;gt;ls -alhi&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 hardlink&lt;br /&gt;
42207936 -rw-r--r--  1 user group    0 Sep 11 11:55 nohardlinks&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 original&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;stat original&lt;br /&gt;
  File: original&lt;br /&gt;
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file&lt;br /&gt;
Device: 803h/2051d      Inode: 42207934    Links: 2&lt;br /&gt;
Access: (0644/-rw-r--r--)  Uid: ( 1000/ user)   Gid: ( 1001/ group)&lt;br /&gt;
Access: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Modify: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Change: 2020-09-11 11:55:49.706660476 -0500&lt;br /&gt;
 Birth: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Interesting docker images ====&lt;br /&gt;
&lt;br /&gt;
* [https://hub.docker.com/r/rasmunk/sshfs rasmunk/sshfs] let you create an sshfs volume, ''perfect'' for a seedbox setup using a remote mount instead of sync. Better documentation, including examples can be found at the github [https://github.com/rasmunk/docker-volume-sshfs rasmunk/docker-volume-sshfs] repository. This is a more recently maintained fork of [https://hub.docker.com/p/vieux/sshfs vieux/sshfs].&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/sonarr sonarr], [https://hub.docker.com/r/hotio/radarr radarr] and [https://hub.docker.com/r/hotio/lidarr lidarr] images let you run the built in version ''or'' specify an alternative via environment variable. The documentation and Dockerfile also don’t make any poor path suggestions.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/ombi ombi], [https://hub.docker.com/r/hotio/jackett jackett], [https://hub.docker.com/r/hotio/nzbhydra2 nzbhydra2] and [https://hub.docker.com/r/hotio/bazarr bazarr] are useful too, but don’t really require any special permissions or paths.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/unpackerr unpackerr] is useful for packed torrent extraction across a variety of torrent clients where unpacking is lacking or missing entirely.&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-qbittorrentvpn/ qbittorrent], [https://hub.docker.com/r/binhex/arch-delugevpn/ deluge] and [https://hub.docker.com/r/binhex/arch-rtorrentvpn/ rtorrent] are popular torrent clients with built in VPN support. For usenet, there is [https://hub.docker.com/r/binhex/arch-sabnzbd/ sabnzbd] and [https://hub.docker.com/r/binhex/arch-nzbget/ nzbget].&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-sonarr/ sonarr], [https://hub.docker.com/r/binhex/arch-radarr/ radarr] and [https://hub.docker.com/r/binhex/arch-lidarr/ lidarr] images suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume.&lt;br /&gt;
* [https://hub.docker.com/u/linuxserver linuxserver.io’s] images also suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume. But they do have images for a ''lot'' of software and they’re well maintained.&lt;br /&gt;
* [https://hub.docker.com/r/pyouroboros/ouroboros pyouroboros/ouroboros] or [https://hub.docker.com/r/containrrr/watchtower containrrr/watchtower] automatically update your running Docker containers to the latest available image. These are not recommended if you use Docker Compose.&lt;br /&gt;
&lt;br /&gt;
==== Custom Docker Network and DNS ====&lt;br /&gt;
&lt;br /&gt;
One interesting feature of a [https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks custom Docker network] is that it gets its own DNS server. If you create a bridge network for your containers, you can use their hostnames in your configuration. For example, if you &amp;lt;code&amp;gt;docker run --network=isolated --hostname=deluge binhex/arch-deluge&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docker run --network=isolated --hostname=radarr binhex/arch-radarr&amp;lt;/code&amp;gt;, you can then configure the Download Client in Radarr to point at just &amp;lt;code&amp;gt;deluge&amp;lt;/code&amp;gt; and it’ll work ''and'' communicate on its own private network. Which means if you wanted to be even more secure, you could ''stop'' forwarding that port too. If you put your reverse proxy container on the same network, you can even stop forwarding the web interface ports and make them even more secure.&lt;br /&gt;
&lt;br /&gt;
==== Common Problems ====&lt;br /&gt;
&lt;br /&gt;
===== Correct ''outside'' paths, incorrect ''inside'' paths =====&lt;br /&gt;
&lt;br /&gt;
Many people read this and think they understand, but they end up seeing the outside path correctly to something like &amp;lt;code&amp;gt;/data/usenet&amp;lt;/code&amp;gt;, but then they miss the point and set the ''inside'' path to &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; still.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers as root or changing users around =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself running your containers as &amp;lt;code&amp;gt;root:root&amp;lt;/code&amp;gt;, you’re doing something wrong. If you’re not passing in a UID and GID, you’ll be using what ever the default is for the image and ''that'' will be unlikely to line up w/ a reasonable user on your system. And if you’re changing the user and group your Docker containers are running as, you’ll probably end up w/ permissions issues on folders like the &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; folder which will likely have files and folders in them that got created the first time w/ the UID/GID you used the first time.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers w/ umask 000 =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself setting a UMASK of &amp;lt;code&amp;gt;000&amp;lt;/code&amp;gt; (which is 777 for folders and 666 for files), you’re ''also'' doing something wrong. It leaves your files and folders read/write to ''everyone'', which is poor Linux hygiene.&lt;br /&gt;
&lt;br /&gt;
==== LinuxServer.io ====&lt;br /&gt;
&lt;br /&gt;
The ''entire'' reason this article even exists is [https://hub.docker.com/u/linuxserver linuxserver.io]’s documentation and default path suggestions. They’re singlehandedly responsible for the &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; paths which ''break'' hard links and atomic moves. It is for this reason that ''none'' of them are ''specifically'' recommended by this article. That said, once you understand the problem with those paths and that you ''don’t'' have to use them, their images are fine. So feel free to use them and ''most'' of their documentation. Just ''ignore'' their path suggestions.&lt;br /&gt;
&lt;br /&gt;
==== Getting Help ====&lt;br /&gt;
&lt;br /&gt;
Need some help? For real time, chat style support try the [https://discord.gg/xyRwnyB Sonarr] or [https://discord.gg/SRBnFmX Radarr] Discord servers. If you prefer forum style support, make a post in [http://reddit.com/r/sonarr /r/sonarr] or [http://reddit.com/r/radarr /r/radarr].&lt;/div&gt;</summary>
		<author><name>Fryfrog</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1228</id>
		<title>Docker Guide</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1228"/>
		<updated>2020-09-11T17:03:14Z</updated>

		<summary type="html">&lt;p&gt;Fryfrog: /* Find UID/GID for user */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Best Docker Setup ===&lt;br /&gt;
&lt;br /&gt;
'''TL; DR''': An [https://www.lexico.com/en/definition/eponymous eponymous] user per daemon and a shared group with a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. Consistent path definitions between ''all'' containers that maintains the folder structure. Using one volume for Sonarr, Radarr and Lidarr so the download folder and library folder are on the same file system which makes hard links and instant moves possible. And most of all, ignore ''most'' of the Docker image’s path documentation!&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
&lt;br /&gt;
This article will not show you specifics about the best Docker setup, but it describes an overview that you can use to make your own setup the best that it can be. The idea is that you run each docker container as its own user, with a shared group and consistent volumes so every container sees the same path layout. This is easy to say, but difficult to understand and explain.&lt;br /&gt;
&lt;br /&gt;
==== Multiple users and a shared group ====&lt;br /&gt;
&lt;br /&gt;
===== Permissions =====&lt;br /&gt;
&lt;br /&gt;
Ideally, each software runs as its own user user and they’re all part of a shared group with folder permissions set to &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxrwxr-x&amp;lt;/code&amp;gt;) and files set to &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-rw-r--&amp;lt;/code&amp;gt;), which is a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. A sane alternative to this is a single shared user, which would use &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; which is a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt;. You can restrict permissions even more by denying read from “other”, which would be a umask of &amp;lt;code&amp;gt;007&amp;lt;/code&amp;gt; for a user per daemon or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; for a single shared user. For a deeper explanation, try the Arch Linux wiki articles about [https://wiki.archlinux.org/index.php/File_permissions_and_attributes File permissions and attributes] and [https://wiki.archlinux.org/index.php/Umask Umask].&lt;br /&gt;
&lt;br /&gt;
===== UMASK =====&lt;br /&gt;
&lt;br /&gt;
Many docker images accept a &amp;lt;code&amp;gt;-e UMASK=002&amp;lt;/code&amp;gt; environment variable and some software inside can be configured with a user, group and umask (NZBGet) or folder/file permission (Sonarr/Radarr). This will ensure that files and folders created by ''one'' can be read and written by the others. If you’re using existing folders and files, you’ll need to fix their current ownership and permissions too, but going forward they’ll be correct because you set each software up right.&lt;br /&gt;
&lt;br /&gt;
===== PUID and PGID =====&lt;br /&gt;
&lt;br /&gt;
Many docker images also take a &amp;lt;code&amp;gt;-e PUID=123&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-e PGID=321&amp;lt;/code&amp;gt; that lets you change the UID/GID used inside to that of an account on the outside. If you ever peak in, you’ll find that username is something like &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt;, but because it uses the UID/GID you pass in, on the outside it looks like the expected user. If you’re using storage from another system via NFS or CIFS, it will make your life easier if ''that'' system also has matching users and group. Perhaps let one system pick the UID/GIDs, then re-use those on the other system, assuming they don’t conflict.&lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
&lt;br /&gt;
You run [https://github.com/Sonarr/Sonarr/releases Sonarr] using [https://github.com/hotio/docker-sonarr hotio/sonarr], you’ve created a &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user with uid &amp;lt;code&amp;gt;123&amp;lt;/code&amp;gt; and a shared group &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; with gid &amp;lt;code&amp;gt;321&amp;lt;/code&amp;gt; which the &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user is a member of. You configure the Docker image to run with &amp;lt;code&amp;gt;-e PUID=123 -e PGID=321 -e UMASK=002&amp;lt;/code&amp;gt;. Sonarr also lets you configured user, group as well as folder and file permissions. The previous settings should negate these, but you could configure them if you wanted. Folders would be &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt;, files &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; and the user/group are a little tricky because ''inside'' the container, they have a different name. Maybe &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt;. I’d leave all these blank unless you find you need them for some reason.&lt;br /&gt;
&lt;br /&gt;
==== Single user and optional shared group ====&lt;br /&gt;
&lt;br /&gt;
Another popular and arguably easier option is a single, shared user. Perhaps even ''your'' user. It isn’t as secure and doesn’t follow best practices, but in the end it is easier to understand and implement. The UMASK for this is &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; which results in &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxr-xr-x&amp;lt;/code&amp;gt;) for folders and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-r--r--&amp;lt;/code&amp;gt;) for files. The group no longer really matters, so you’ll probably just use the group named after the user. This does make it harder to share with ''other'' users, so you may still end up wanting a UMASK of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt; even w/ this setup.&lt;br /&gt;
&lt;br /&gt;
==== Ownership and permissions of /config ====&lt;br /&gt;
&lt;br /&gt;
Don’t forget that your &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; volume will ''also'' need to have correct ownership and permissions, usually the daemon’s user and that user’s group like &amp;lt;code&amp;gt;sonarr:sonarr&amp;lt;/code&amp;gt; and a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; so ''only'' that user has access. In a single user setup, this would of course be the one user you’ve chosen.&lt;br /&gt;
&lt;br /&gt;
==== Consistent and well planned paths ====&lt;br /&gt;
&lt;br /&gt;
The easiest and most important detail is to create unified path definitions across all the containers.&lt;br /&gt;
&lt;br /&gt;
If you’re wondering why hard links aren’t working or why a simple move is taking far longer than it should, this section explains it. The paths you use on the ''inside'' matter. Because of how Docker’s volumes work, passing in two volumes such as the commonly suggested &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; makes them look like two file systems, even if they aren’t. This means hard links won’t work ''and'' instead of an instant move, a slower and more io intensive copy + delete is used. If you have multiple download clients because you’re using torrents and usenet, having a single &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; path means they’ll be mixed up. Because the Radarr in one container will ask the NZBGet in its own container where files are, using the same path in both means it will all just work. If you don’t, you’d need to fix it with a remote path map.&lt;br /&gt;
&lt;br /&gt;
So pick ''one'' path layout and use it for all of them. I’m a fan of &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt;, but there are other great names like &amp;lt;code&amp;gt;/shared&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/dvr&amp;lt;/code&amp;gt;. If this can be the same on the outside ''and'' inside, your setup will be simpler: one path to remember or if integrating docker and native software. But if not, that’s fine too. For example, Synology might use &amp;lt;code&amp;gt;/Volume1/data&amp;lt;/code&amp;gt; and unRAID might use &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt; on the outside, but &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; on the inside is fine.&lt;br /&gt;
&lt;br /&gt;
It is also important to remember that you’ll need to setup or re-configure paths in the software running ''inside'' these Docker containers. If you change the paths for your download client, you’ll need to edit its settings to match. If you change your library path, you’ll need to change those settings in Sonarr, Radarr, Lidarr and/or Plex.&lt;br /&gt;
&lt;br /&gt;
===== Examples =====&lt;br /&gt;
&lt;br /&gt;
What matters here is the general structure, not the names. You are free to pick folder names that make sense to you. And there are other ways of arranging things too. For example, you’re not likely to download and run into conflicts of identical releases between usenet and torrents, so you ''could'' put both in &amp;lt;code&amp;gt;/data/downloads/{movies|music|tv}&amp;lt;/code&amp;gt; folders. Downloads don’t even have to be sorted into sub-folders either, since movies, music and tv will rarely conflict.&lt;br /&gt;
&lt;br /&gt;
This example &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; folder has nicely named &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; sub-folders, this is your library and what you’d pass to Plex or Emby.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
The path for each Docker container can be as specific as needed while still maintaining the correct structure:&lt;br /&gt;
&lt;br /&gt;
====== Torrents ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── torrents&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Torrents only needs access to torrent files, so pass it &amp;lt;code&amp;gt;-v /host/data/torrents:/data/torrents&amp;lt;/code&amp;gt;. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/torrents/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Usenet ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── usenet&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Usenet only needs access to usenet files, so pass it &amp;lt;code&amp;gt;-v /host/data/usenet:/data/usenet&amp;lt;/code&amp;gt;. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/usenet/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Media Server ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Plex/Emby only needs access to your media library, so pass &amp;lt;code&amp;gt;-v /host/data/media:/data/media&amp;lt;/code&amp;gt;, which can have any number of sub folders like &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Kids Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Documentary TV&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; as sub folders.&lt;br /&gt;
&lt;br /&gt;
====== Sonarr, Radarr and Lidarr ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sonarr, Radarr and Lidarr get everything using &amp;lt;code&amp;gt;-v /host/data:/data&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
===== Issues =====&lt;br /&gt;
&lt;br /&gt;
There are a couple minor issues w/ not following the Docker image’s suggested paths.&lt;br /&gt;
&lt;br /&gt;
The biggest is that volumes defined in the &amp;lt;code&amp;gt;Dockerfile&amp;lt;/code&amp;gt; will get created if they’re not specified, this means they’ll pile up as you delete and re-create the containers. If they end up w/ data in them, they can consume space unexpectedly and likely in an unsuitable place. You can find a [https://old.reddit.com/r/usenet/wiki/docker#wiki_prune_docker cleanup command] in the helpful commands section below. This could also be mitigated by passing in an empty folder for all the volumes you don’t want to use, like &amp;lt;code&amp;gt;/data/empty:/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/data/empty:/downloads&amp;lt;/code&amp;gt;. Maybe even put a file named &amp;lt;code&amp;gt;DO NOT USE THIS FOLDER&amp;lt;/code&amp;gt; inside, to remind yourself.&lt;br /&gt;
&lt;br /&gt;
Another problem is that some images are pre-configured to use the documented volumes, so you’ll need to change settings in the software inside the Docker container. Thankfully, since configuration persists outside the container this is a one time issue. You might also pick a path like &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; which some images already define for a specific use. It shouldn’t be a problem, but will be a little more confusing when combined w/ the previous issues. In the end, it is worth it for working hard links and fast moves. The consistency and simplicity are welcome side effects as well.&lt;br /&gt;
&lt;br /&gt;
If you use the latest version of the abandoned [https://github.com/Sperryfreak01/RadarrSync RadarrSync] to synchronize two Radarr instances, it ''depends'' on mapping the ''same'' path inside to a different path on the outside, for example &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; for one instance would point at &amp;lt;code&amp;gt;/data/media/Movies&amp;lt;/code&amp;gt; and the other at &amp;lt;code&amp;gt;/data/media/Movies 4k&amp;lt;/code&amp;gt;. This breaks ''everything'' you’ve read above. There is no good solution, you either use the old version which isn’t as good, do your mapping in a way that is ugly and breaks hard links or just don’t use it at all.&lt;br /&gt;
&lt;br /&gt;
==== Running containers using ====&lt;br /&gt;
&lt;br /&gt;
===== Docker-compose =====&lt;br /&gt;
&lt;br /&gt;
This is the best option for most users, it lets you control and configure many containers and their interdependence in one file. A good starting place is docker’s own [https://docs.docker.com/compose/gettingstarted/ Get started with Docker Compose]. You can use [https://composerize.com composerize] or [https://old.reddit.com/r/usenet/wiki/docker#wiki_get_docker-compose red5d/docker-autocompose]to convert &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands into a single &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
The below is ''not'' a complete working example! The containers only have PID, UID, UMASK and example paths defined to keep it simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
Sonarr:&lt;br /&gt;
    image: &amp;amp;quot;hotio/sonarr&amp;amp;quot;&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sonarr:/config&lt;br /&gt;
        - /host/data:/data&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=111&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
Deluge:&lt;br /&gt;
    image: binhex/arch-delugevpn&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/deluge:/config&lt;br /&gt;
        - /host/data/torrents:/data/torrents&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=222&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
SABnzbd:&lt;br /&gt;
    image: binhex/arch-sabnzbd&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sabnzbd:/config&lt;br /&gt;
        - /host/data/usenet:/data/usenet&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=333&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
Plex:&lt;br /&gt;
    image: binhex/arch-plex&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/plex:/config&lt;br /&gt;
        - /host/data/media:/data/media&lt;br /&gt;
&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=444&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update all images and containers ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull&lt;br /&gt;
docker-compose up -d&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update individual image and container ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull NAME&lt;br /&gt;
docker-compose up -d NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Docker Run =====&lt;br /&gt;
&lt;br /&gt;
Like the Docker Compose example above, the following &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands are stripped down to ''only'' the PUID, PGID, UMASK and volumes in order to act as an obvious example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
docker run -v /path/to/config/sonarr:/config \&lt;br /&gt;
           -v /host/data:/data \&lt;br /&gt;
           -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           hotio/sonarr&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
docker run -v /path/to/config/deluge:/config \&lt;br /&gt;
           -v /host/data/torrents:/data/torrents \&lt;br /&gt;
           -e PUID=222 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-delugevpn&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
docker run -v /path/to/config/sabnzbd:/config \&lt;br /&gt;
           -v /host/data/usenet:/data/usenet \&lt;br /&gt;
           -e PUID=333 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-sabnzbd&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
docker run -v /path/to/config/plex:/config \&lt;br /&gt;
           -v /host/data/media:/data/media \&lt;br /&gt;
           -e PUID=444 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-plex&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Systemd =====&lt;br /&gt;
&lt;br /&gt;
I don’t run a full Docker setup, so I manage my few Docker containers with individual systemd service files. It standardizes control and makes dependencies simpler for both native and docker services. The generic example below can be adapted to any container by adjusting or adding the various values and options.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# /etc/systemd/system/thing.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Thing&lt;br /&gt;
Requires=docker.service&lt;br /&gt;
After=network.target docker.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/docker run --rm \&lt;br /&gt;
                          --name=thing \&lt;br /&gt;
                          -v /path/to/config/thing:/config \&lt;br /&gt;
                          -v /host/data:/data&lt;br /&gt;
                          -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
                          nobody/thing&lt;br /&gt;
&lt;br /&gt;
ExecStop=/usr/bin/docker stop -t 30 thing&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Helpful commands ====&lt;br /&gt;
&lt;br /&gt;
===== List running containers =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker ps&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Shell ''inside'' a container =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker exec -it CONTAINER_NAME /bin/bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
For more information, see the [https://docs.docker.com/engine/reference/commandline/exec/ docker exec] documentation.&lt;br /&gt;
&lt;br /&gt;
===== Prune docker =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker system prune --all --volumes&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remove unused containers, networks, volumes, images and build cache. As the WARNING this command gives says, this will remove all of the previously mentioned items for anything not in use by a running container. In a correctly configured environment, this is fine. But be aware and proceed cautiously the first time. See the [https://docs.docker.com/engine/reference/commandline/system_prune/ docker system prune] documentation for more details.&lt;br /&gt;
&lt;br /&gt;
===== Get docker run command =====&lt;br /&gt;
&lt;br /&gt;
Getting the &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command from GUI managers can be hard, this docker image makes it easy for a running container ([https://stackoverflow.com/questions/32758793/how-to-show-the-run-command-of-a-docker-container source]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike CONTAINER_NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Get docker-compose =====&lt;br /&gt;
&lt;br /&gt;
Getting a &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; from running instances is possible w/ [https://hub.docker.com/r/red5d/docker-autocompose red5d/docker-autocompose], in case you’ve already started your containers w/ &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker create&amp;lt;/code&amp;gt; and want to change to &amp;lt;code&amp;gt;docker-compose&amp;lt;/code&amp;gt; style. It is also great for sharing your settings with others, since it doesn’t matter what management software you’re using.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock red5d/docker-autocompose CONTAINER_NAME [CONTAINER_NAME] ... [CONTAINER_NAME]&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Troubleshoot networking =====&lt;br /&gt;
&lt;br /&gt;
Most Docker images don’t have many useful tools in them for troubleshooting, but you can [https://success.docker.com/article/troubleshooting-container-networking attach a network troubleshooting type image] to an existing container to help with that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run -it --rm --network container:CONTAINER_NAME nicolaka/netshoot&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chown user and group =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chown -R user:group /some/path/here&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chmod to 775/664 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R a=,a+rX,u+w,g+w /some/path/here&lt;br /&gt;
          ^  ^    ^   ^ adds write to group&lt;br /&gt;
          |  |    | adds write to user&lt;br /&gt;
          |  | adds read to all and execute to all folders (which controls access)&lt;br /&gt;
          | sets all to `000`&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Find UID/GID for user =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;id &amp;lt;username&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Examine files for hard links =====&lt;br /&gt;
&amp;lt;pre&amp;gt;ls -alhi&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 hardlink&lt;br /&gt;
42207936 -rw-r--r--  1 user group    0 Sep 11 11:55 nohardlinks&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 original&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;stat original&lt;br /&gt;
  File: original&lt;br /&gt;
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file&lt;br /&gt;
Device: 803h/2051d      Inode: 42207934    Links: 2&lt;br /&gt;
Access: (0644/-rw-r--r--)  Uid: ( 1000/ user)   Gid: ( 1001/ group)&lt;br /&gt;
Access: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Modify: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Change: 2020-09-11 11:55:49.706660476 -0500&lt;br /&gt;
 Birth: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Interesting docker images ====&lt;br /&gt;
&lt;br /&gt;
* [https://hub.docker.com/r/rasmunk/sshfs rasmunk/sshfs] let you create an sshfs volume, ''perfect'' for a seedbox setup using a remote mount instead of sync. Better documentation, including examples can be found at the github [https://github.com/rasmunk/docker-volume-sshfs rasmunk/docker-volume-sshfs] repository. This is a more recently maintained fork of [https://hub.docker.com/p/vieux/sshfs vieux/sshfs].&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/sonarr sonarr], [https://hub.docker.com/r/hotio/radarr radarr] and [https://hub.docker.com/r/hotio/lidarr lidarr] images let you run the built in version ''or'' specify an alternative via environment variable. The documentation and Dockerfile also don’t make any poor path suggestions.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/ombi ombi], [https://hub.docker.com/r/hotio/jackett jackett], [https://hub.docker.com/r/hotio/nzbhydra2 nzbhydra2] and [https://hub.docker.com/r/hotio/bazarr bazarr] are useful too, but don’t really require any special permissions or paths.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/unpackerr unpackerr] is useful for packed torrent extraction across a variety of torrent clients where unpacking is lacking or missing entirely.&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-qbittorrentvpn/ qbittorrent], [https://hub.docker.com/r/binhex/arch-delugevpn/ deluge] and [https://hub.docker.com/r/binhex/arch-rtorrentvpn/ rtorrent] are popular torrent clients with built in VPN support. For usenet, there is [https://hub.docker.com/r/binhex/arch-sabnzbd/ sabnzbd] and [https://hub.docker.com/r/binhex/arch-nzbget/ nzbget].&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-sonarr/ sonarr], [https://hub.docker.com/r/binhex/arch-radarr/ radarr] and [https://hub.docker.com/r/binhex/arch-lidarr/ lidarr] images suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume.&lt;br /&gt;
* [https://hub.docker.com/u/linuxserver linuxserver.io’s] images also suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume. But they do have images for a ''lot'' of software and they’re well maintained.&lt;br /&gt;
* [https://hub.docker.com/r/pyouroboros/ouroboros pyouroboros/ouroboros] or [https://hub.docker.com/r/containrrr/watchtower containrrr/watchtower] automatically update your running Docker containers to the latest available image. These are not recommended if you use Docker Compose.&lt;br /&gt;
&lt;br /&gt;
==== Custom Docker Network and DNS ====&lt;br /&gt;
&lt;br /&gt;
One interesting feature of a [https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks custom Docker network] is that it gets its own DNS server. If you create a bridge network for your containers, you can use their hostnames in your configuration. For example, if you &amp;lt;code&amp;gt;docker run --network=isolated --hostname=deluge binhex/arch-deluge&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docker run --network=isolated --hostname=radarr binhex/arch-radarr&amp;lt;/code&amp;gt;, you can then configure the Download Client in Radarr to point at just &amp;lt;code&amp;gt;deluge&amp;lt;/code&amp;gt; and it’ll work ''and'' communicate on its own private network. Which means if you wanted to be even more secure, you could ''stop'' forwarding that port too. If you put your reverse proxy container on the same network, you can even stop forwarding the web interface ports and make them even more secure.&lt;br /&gt;
&lt;br /&gt;
==== Common Problems ====&lt;br /&gt;
&lt;br /&gt;
===== Correct ''outside'' paths, incorrect ''inside'' paths =====&lt;br /&gt;
&lt;br /&gt;
Many people read this and think they understand, but they end up seeing the outside path correctly to something like &amp;lt;code&amp;gt;/data/usenet&amp;lt;/code&amp;gt;, but then they miss the point and set the ''inside'' path to &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; still.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers as root or changing users around =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself running your containers as &amp;lt;code&amp;gt;root:root&amp;lt;/code&amp;gt;, you’re doing something wrong. If you’re not passing in a UID and GID, you’ll be using what ever the default is for the image and ''that'' will be unlikely to line up w/ a reasonable user on your system. And if you’re changing the user and group your Docker containers are running as, you’ll probably end up w/ permissions issues on folders like the &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; folder which will likely have files and folders in them that got created the first time w/ the UID/GID you used the first time.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers w/ umask 000 =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself setting a UMASK of &amp;lt;code&amp;gt;000&amp;lt;/code&amp;gt; (which is 777 for folders and 666 for files), you’re ''also'' doing something wrong. It leaves your files and folders read/write to ''everyone'', which is poor Linux hygiene.&lt;br /&gt;
&lt;br /&gt;
==== LinuxServer.io ====&lt;br /&gt;
&lt;br /&gt;
The ''entire'' reason this article even exists is [https://hub.docker.com/u/linuxserver linuxserver.io]’s documentation and default path suggestions. They’re singlehandedly responsible for the &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; paths which ''break'' hard links and atomic moves. It is for this reason that ''none'' of them are ''specifically'' recommended by this article. That said, once you understand the problem with those paths and that you ''don’t'' have to use them, their images are fine. So feel free to use them and ''most'' of their documentation. Just ''ignore'' their path suggestions.&lt;br /&gt;
&lt;br /&gt;
==== Getting Help ====&lt;br /&gt;
&lt;br /&gt;
Need some help? For real time, chat style support try the [https://discord.gg/xyRwnyB Sonarr] or [https://discord.gg/SRBnFmX Radarr] Discord servers. If you prefer forum style support, make a post in [http://reddit.com/r/sonarr /r/sonarr] or [http://reddit.com/r/radarr /r/radarr].&lt;/div&gt;</summary>
		<author><name>Fryfrog</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1227</id>
		<title>Docker Guide</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Docker_Guide&amp;diff=1227"/>
		<updated>2020-09-11T17:00:51Z</updated>

		<summary type="html">&lt;p&gt;Fryfrog: Add section for examining files for hard links.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== The Best Docker Setup ===&lt;br /&gt;
&lt;br /&gt;
'''TL; DR''': An [https://www.lexico.com/en/definition/eponymous eponymous] user per daemon and a shared group with a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. Consistent path definitions between ''all'' containers that maintains the folder structure. Using one volume for Sonarr, Radarr and Lidarr so the download folder and library folder are on the same file system which makes hard links and instant moves possible. And most of all, ignore ''most'' of the Docker image’s path documentation!&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
&lt;br /&gt;
This article will not show you specifics about the best Docker setup, but it describes an overview that you can use to make your own setup the best that it can be. The idea is that you run each docker container as its own user, with a shared group and consistent volumes so every container sees the same path layout. This is easy to say, but difficult to understand and explain.&lt;br /&gt;
&lt;br /&gt;
==== Multiple users and a shared group ====&lt;br /&gt;
&lt;br /&gt;
===== Permissions =====&lt;br /&gt;
&lt;br /&gt;
Ideally, each software runs as its own user user and they’re all part of a shared group with folder permissions set to &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxrwxr-x&amp;lt;/code&amp;gt;) and files set to &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-rw-r--&amp;lt;/code&amp;gt;), which is a umask of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt;. A sane alternative to this is a single shared user, which would use &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; which is a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt;. You can restrict permissions even more by denying read from “other”, which would be a umask of &amp;lt;code&amp;gt;007&amp;lt;/code&amp;gt; for a user per daemon or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; for a single shared user. For a deeper explanation, try the Arch Linux wiki articles about [https://wiki.archlinux.org/index.php/File_permissions_and_attributes File permissions and attributes] and [https://wiki.archlinux.org/index.php/Umask Umask].&lt;br /&gt;
&lt;br /&gt;
===== UMASK =====&lt;br /&gt;
&lt;br /&gt;
Many docker images accept a &amp;lt;code&amp;gt;-e UMASK=002&amp;lt;/code&amp;gt; environment variable and some software inside can be configured with a user, group and umask (NZBGet) or folder/file permission (Sonarr/Radarr). This will ensure that files and folders created by ''one'' can be read and written by the others. If you’re using existing folders and files, you’ll need to fix their current ownership and permissions too, but going forward they’ll be correct because you set each software up right.&lt;br /&gt;
&lt;br /&gt;
===== PUID and PGID =====&lt;br /&gt;
&lt;br /&gt;
Many docker images also take a &amp;lt;code&amp;gt;-e PUID=123&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-e PGID=321&amp;lt;/code&amp;gt; that lets you change the UID/GID used inside to that of an account on the outside. If you ever peak in, you’ll find that username is something like &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt;, but because it uses the UID/GID you pass in, on the outside it looks like the expected user. If you’re using storage from another system via NFS or CIFS, it will make your life easier if ''that'' system also has matching users and group. Perhaps let one system pick the UID/GIDs, then re-use those on the other system, assuming they don’t conflict.&lt;br /&gt;
&lt;br /&gt;
===== Example =====&lt;br /&gt;
&lt;br /&gt;
You run [https://github.com/Sonarr/Sonarr/releases Sonarr] using [https://github.com/hotio/docker-sonarr hotio/sonarr], you’ve created a &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user with uid &amp;lt;code&amp;gt;123&amp;lt;/code&amp;gt; and a shared group &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; with gid &amp;lt;code&amp;gt;321&amp;lt;/code&amp;gt; which the &amp;lt;code&amp;gt;sonarr&amp;lt;/code&amp;gt; user is a member of. You configure the Docker image to run with &amp;lt;code&amp;gt;-e PUID=123 -e PGID=321 -e UMASK=002&amp;lt;/code&amp;gt;. Sonarr also lets you configured user, group as well as folder and file permissions. The previous settings should negate these, but you could configure them if you wanted. Folders would be &amp;lt;code&amp;gt;775&amp;lt;/code&amp;gt;, files &amp;lt;code&amp;gt;664&amp;lt;/code&amp;gt; and the user/group are a little tricky because ''inside'' the container, they have a different name. Maybe &amp;lt;code&amp;gt;abc&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;nobody&amp;lt;/code&amp;gt;. I’d leave all these blank unless you find you need them for some reason.&lt;br /&gt;
&lt;br /&gt;
==== Single user and optional shared group ====&lt;br /&gt;
&lt;br /&gt;
Another popular and arguably easier option is a single, shared user. Perhaps even ''your'' user. It isn’t as secure and doesn’t follow best practices, but in the end it is easier to understand and implement. The UMASK for this is &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; which results in &amp;lt;code&amp;gt;755&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;drwxr-xr-x&amp;lt;/code&amp;gt;) for folders and &amp;lt;code&amp;gt;644&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;-rw-r--r--&amp;lt;/code&amp;gt;) for files. The group no longer really matters, so you’ll probably just use the group named after the user. This does make it harder to share with ''other'' users, so you may still end up wanting a UMASK of &amp;lt;code&amp;gt;002&amp;lt;/code&amp;gt; even w/ this setup.&lt;br /&gt;
&lt;br /&gt;
==== Ownership and permissions of /config ====&lt;br /&gt;
&lt;br /&gt;
Don’t forget that your &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; volume will ''also'' need to have correct ownership and permissions, usually the daemon’s user and that user’s group like &amp;lt;code&amp;gt;sonarr:sonarr&amp;lt;/code&amp;gt; and a umask of &amp;lt;code&amp;gt;022&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;077&amp;lt;/code&amp;gt; so ''only'' that user has access. In a single user setup, this would of course be the one user you’ve chosen.&lt;br /&gt;
&lt;br /&gt;
==== Consistent and well planned paths ====&lt;br /&gt;
&lt;br /&gt;
The easiest and most important detail is to create unified path definitions across all the containers.&lt;br /&gt;
&lt;br /&gt;
If you’re wondering why hard links aren’t working or why a simple move is taking far longer than it should, this section explains it. The paths you use on the ''inside'' matter. Because of how Docker’s volumes work, passing in two volumes such as the commonly suggested &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; makes them look like two file systems, even if they aren’t. This means hard links won’t work ''and'' instead of an instant move, a slower and more io intensive copy + delete is used. If you have multiple download clients because you’re using torrents and usenet, having a single &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; path means they’ll be mixed up. Because the Radarr in one container will ask the NZBGet in its own container where files are, using the same path in both means it will all just work. If you don’t, you’d need to fix it with a remote path map.&lt;br /&gt;
&lt;br /&gt;
So pick ''one'' path layout and use it for all of them. I’m a fan of &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt;, but there are other great names like &amp;lt;code&amp;gt;/shared&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/dvr&amp;lt;/code&amp;gt;. If this can be the same on the outside ''and'' inside, your setup will be simpler: one path to remember or if integrating docker and native software. But if not, that’s fine too. For example, Synology might use &amp;lt;code&amp;gt;/Volume1/data&amp;lt;/code&amp;gt; and unRAID might use &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt; on the outside, but &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; on the inside is fine.&lt;br /&gt;
&lt;br /&gt;
It is also important to remember that you’ll need to setup or re-configure paths in the software running ''inside'' these Docker containers. If you change the paths for your download client, you’ll need to edit its settings to match. If you change your library path, you’ll need to change those settings in Sonarr, Radarr, Lidarr and/or Plex.&lt;br /&gt;
&lt;br /&gt;
===== Examples =====&lt;br /&gt;
&lt;br /&gt;
What matters here is the general structure, not the names. You are free to pick folder names that make sense to you. And there are other ways of arranging things too. For example, you’re not likely to download and run into conflicts of identical releases between usenet and torrents, so you ''could'' put both in &amp;lt;code&amp;gt;/data/downloads/{movies|music|tv}&amp;lt;/code&amp;gt; folders. Downloads don’t even have to be sorted into sub-folders either, since movies, music and tv will rarely conflict.&lt;br /&gt;
&lt;br /&gt;
This example &amp;lt;code&amp;gt;data&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;media&amp;lt;/code&amp;gt; folder has nicely named &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; sub-folders, this is your library and what you’d pass to Plex or Emby.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
The path for each Docker container can be as specific as needed while still maintaining the correct structure:&lt;br /&gt;
&lt;br /&gt;
====== Torrents ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── torrents&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Torrents only needs access to torrent files, so pass it &amp;lt;code&amp;gt;-v /host/data/torrents:/data/torrents&amp;lt;/code&amp;gt;. In the torrent software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/torrents/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Usenet ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── usenet&lt;br /&gt;
    ├── movies&lt;br /&gt;
    ├── music&lt;br /&gt;
    └── tv&amp;lt;/pre&amp;gt;&lt;br /&gt;
Usenet only needs access to usenet files, so pass it &amp;lt;code&amp;gt;-v /host/data/usenet:/data/usenet&amp;lt;/code&amp;gt;. In the usenet software settings, you’ll need to reconfigure paths and you can sort into sub-folders like&amp;lt;code&amp;gt;/data/usenet/{tv|movies|music}&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====== Media Server ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Plex/Emby only needs access to your media library, so pass &amp;lt;code&amp;gt;-v /host/data/media:/data/media&amp;lt;/code&amp;gt;, which can have any number of sub folders like &amp;lt;code&amp;gt;Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Kids Movies&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TV&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Documentary TV&amp;lt;/code&amp;gt; and/or &amp;lt;code&amp;gt;Music&amp;lt;/code&amp;gt; as sub folders.&lt;br /&gt;
&lt;br /&gt;
====== Sonarr, Radarr and Lidarr ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;data&lt;br /&gt;
├── torrents&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
├── usenet&lt;br /&gt;
│  ├── movies&lt;br /&gt;
│  ├── music&lt;br /&gt;
│  └── tv&lt;br /&gt;
└── media&lt;br /&gt;
    ├── Movies&lt;br /&gt;
    ├── Music&lt;br /&gt;
    └── TV&amp;lt;/pre&amp;gt;&lt;br /&gt;
Sonarr, Radarr and Lidarr get everything using &amp;lt;code&amp;gt;-v /host/data:/data&amp;lt;/code&amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
===== Issues =====&lt;br /&gt;
&lt;br /&gt;
There are a couple minor issues w/ not following the Docker image’s suggested paths.&lt;br /&gt;
&lt;br /&gt;
The biggest is that volumes defined in the &amp;lt;code&amp;gt;Dockerfile&amp;lt;/code&amp;gt; will get created if they’re not specified, this means they’ll pile up as you delete and re-create the containers. If they end up w/ data in them, they can consume space unexpectedly and likely in an unsuitable place. You can find a [https://old.reddit.com/r/usenet/wiki/docker#wiki_prune_docker cleanup command] in the helpful commands section below. This could also be mitigated by passing in an empty folder for all the volumes you don’t want to use, like &amp;lt;code&amp;gt;/data/empty:/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/data/empty:/downloads&amp;lt;/code&amp;gt;. Maybe even put a file named &amp;lt;code&amp;gt;DO NOT USE THIS FOLDER&amp;lt;/code&amp;gt; inside, to remind yourself.&lt;br /&gt;
&lt;br /&gt;
Another problem is that some images are pre-configured to use the documented volumes, so you’ll need to change settings in the software inside the Docker container. Thankfully, since configuration persists outside the container this is a one time issue. You might also pick a path like &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/media&amp;lt;/code&amp;gt; which some images already define for a specific use. It shouldn’t be a problem, but will be a little more confusing when combined w/ the previous issues. In the end, it is worth it for working hard links and fast moves. The consistency and simplicity are welcome side effects as well.&lt;br /&gt;
&lt;br /&gt;
If you use the latest version of the abandoned [https://github.com/Sperryfreak01/RadarrSync RadarrSync] to synchronize two Radarr instances, it ''depends'' on mapping the ''same'' path inside to a different path on the outside, for example &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; for one instance would point at &amp;lt;code&amp;gt;/data/media/Movies&amp;lt;/code&amp;gt; and the other at &amp;lt;code&amp;gt;/data/media/Movies 4k&amp;lt;/code&amp;gt;. This breaks ''everything'' you’ve read above. There is no good solution, you either use the old version which isn’t as good, do your mapping in a way that is ugly and breaks hard links or just don’t use it at all.&lt;br /&gt;
&lt;br /&gt;
==== Running containers using ====&lt;br /&gt;
&lt;br /&gt;
===== Docker-compose =====&lt;br /&gt;
&lt;br /&gt;
This is the best option for most users, it lets you control and configure many containers and their interdependence in one file. A good starting place is docker’s own [https://docs.docker.com/compose/gettingstarted/ Get started with Docker Compose]. You can use [https://composerize.com composerize] or [https://old.reddit.com/r/usenet/wiki/docker#wiki_get_docker-compose red5d/docker-autocompose]to convert &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands into a single &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
The below is ''not'' a complete working example! The containers only have PID, UID, UMASK and example paths defined to keep it simple.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
Sonarr:&lt;br /&gt;
    image: &amp;amp;quot;hotio/sonarr&amp;amp;quot;&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sonarr:/config&lt;br /&gt;
        - /host/data:/data&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=111&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
Deluge:&lt;br /&gt;
    image: binhex/arch-delugevpn&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/deluge:/config&lt;br /&gt;
        - /host/data/torrents:/data/torrents&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=222&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
SABnzbd:&lt;br /&gt;
    image: binhex/arch-sabnzbd&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/sabnzbd:/config&lt;br /&gt;
        - /host/data/usenet:/data/usenet&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=333&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
Plex:&lt;br /&gt;
    image: binhex/arch-plex&lt;br /&gt;
    volumes:&lt;br /&gt;
        - /path/to/config/plex:/config&lt;br /&gt;
        - /host/data/media:/data/media&lt;br /&gt;
&lt;br /&gt;
    environment:&lt;br /&gt;
        - PUID=444&lt;br /&gt;
        - PGID=321&lt;br /&gt;
        - UMASK=002&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update all images and containers ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull&lt;br /&gt;
docker-compose up -d&amp;lt;/pre&amp;gt;&lt;br /&gt;
====== Update individual image and container ======&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker-compose pull NAME&lt;br /&gt;
docker-compose up -d NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Docker Run =====&lt;br /&gt;
&lt;br /&gt;
Like the Docker Compose example above, the following &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; commands are stripped down to ''only'' the PUID, PGID, UMASK and volumes in order to act as an obvious example.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# sonarr&lt;br /&gt;
docker run -v /path/to/config/sonarr:/config \&lt;br /&gt;
           -v /host/data:/data \&lt;br /&gt;
           -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           hotio/sonarr&lt;br /&gt;
&lt;br /&gt;
# deluge&lt;br /&gt;
docker run -v /path/to/config/deluge:/config \&lt;br /&gt;
           -v /host/data/torrents:/data/torrents \&lt;br /&gt;
           -e PUID=222 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-delugevpn&lt;br /&gt;
&lt;br /&gt;
# sabnzbd&lt;br /&gt;
docker run -v /path/to/config/sabnzbd:/config \&lt;br /&gt;
           -v /host/data/usenet:/data/usenet \&lt;br /&gt;
           -e PUID=333 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-sabnzbd&lt;br /&gt;
&lt;br /&gt;
# plex&lt;br /&gt;
docker run -v /path/to/config/plex:/config \&lt;br /&gt;
           -v /host/data/media:/data/media \&lt;br /&gt;
           -e PUID=444 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
           binhex/arch-plex&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Systemd =====&lt;br /&gt;
&lt;br /&gt;
I don’t run a full Docker setup, so I manage my few Docker containers with individual systemd service files. It standardizes control and makes dependencies simpler for both native and docker services. The generic example below can be adapted to any container by adjusting or adding the various values and options.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;# /etc/systemd/system/thing.service&lt;br /&gt;
[Unit]&lt;br /&gt;
Description=Thing&lt;br /&gt;
Requires=docker.service&lt;br /&gt;
After=network.target docker.service&lt;br /&gt;
&lt;br /&gt;
[Service]&lt;br /&gt;
ExecStart=/usr/bin/docker run --rm \&lt;br /&gt;
                          --name=thing \&lt;br /&gt;
                          -v /path/to/config/thing:/config \&lt;br /&gt;
                          -v /host/data:/data&lt;br /&gt;
                          -e PUID=111 -e PGID=321 -e UMASK=002 \&lt;br /&gt;
                          nobody/thing&lt;br /&gt;
&lt;br /&gt;
ExecStop=/usr/bin/docker stop -t 30 thing&lt;br /&gt;
&lt;br /&gt;
[Install]&lt;br /&gt;
WantedBy=default.target&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== Helpful commands ====&lt;br /&gt;
&lt;br /&gt;
===== List running containers =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker ps&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Shell ''inside'' a container =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker exec -it CONTAINER_NAME /bin/bash&amp;lt;/pre&amp;gt;&lt;br /&gt;
For more information, see the [https://docs.docker.com/engine/reference/commandline/exec/ docker exec] documentation.&lt;br /&gt;
&lt;br /&gt;
===== Prune docker =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker system prune --all --volumes&amp;lt;/pre&amp;gt;&lt;br /&gt;
Remove unused containers, networks, volumes, images and build cache. As the WARNING this command gives says, this will remove all of the previously mentioned items for anything not in use by a running container. In a correctly configured environment, this is fine. But be aware and proceed cautiously the first time. See the [https://docs.docker.com/engine/reference/commandline/system_prune/ docker system prune] documentation for more details.&lt;br /&gt;
&lt;br /&gt;
===== Get docker run command =====&lt;br /&gt;
&lt;br /&gt;
Getting the &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; command from GUI managers can be hard, this docker image makes it easy for a running container ([https://stackoverflow.com/questions/32758793/how-to-show-the-run-command-of-a-docker-container source]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike CONTAINER_NAME&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Get docker-compose =====&lt;br /&gt;
&lt;br /&gt;
Getting a &amp;lt;code&amp;gt;docker-compose.yml&amp;lt;/code&amp;gt; from running instances is possible w/ [https://hub.docker.com/r/red5d/docker-autocompose red5d/docker-autocompose], in case you’ve already started your containers w/ &amp;lt;code&amp;gt;docker run&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;docker create&amp;lt;/code&amp;gt; and want to change to &amp;lt;code&amp;gt;docker-compose&amp;lt;/code&amp;gt; style. It is also great for sharing your settings with others, since it doesn’t matter what management software you’re using.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run --rm -v /var/run/docker.sock:/var/run/docker.sock red5d/docker-autocompose CONTAINER_NAME [CONTAINER_NAME] ... [CONTAINER_NAME]&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Troubleshoot networking =====&lt;br /&gt;
&lt;br /&gt;
Most Docker images don’t have many useful tools in them for troubleshooting, but you can [https://success.docker.com/article/troubleshooting-container-networking attach a network troubleshooting type image] to an existing container to help with that.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;docker run -it --rm --network container:CONTAINER_NAME nicolaka/netshoot&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chown user and group =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chown -R user:group /some/path/here&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Recursively chmod to 775/664 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;chmod -R a=,a+rX,u+w,g+w /some/path/here&lt;br /&gt;
          ^  ^    ^   ^ adds write to group&lt;br /&gt;
          |  |    | adds write to user&lt;br /&gt;
          |  | adds read to all and execute to all folders (which controls access)&lt;br /&gt;
          | sets all to `000`&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Find UID/GID for user =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;id &amp;amp;lt;username&amp;amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
===== Examine files for hard links =====&lt;br /&gt;
&amp;lt;pre&amp;gt;ls -alhi&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 hardlink&lt;br /&gt;
42207936 -rw-r--r--  1 user group    0 Sep 11 11:55 nohardlinks&lt;br /&gt;
42207934 -rw-r--r--  2 user group    0 Sep 11 11:55 original&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;stat original&lt;br /&gt;
  File: original&lt;br /&gt;
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file&lt;br /&gt;
Device: 803h/2051d      Inode: 42207934    Links: 2&lt;br /&gt;
Access: (0644/-rw-r--r--)  Uid: ( 1000/ user)   Gid: ( 1001/ group)&lt;br /&gt;
Access: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Modify: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
Change: 2020-09-11 11:55:49.706660476 -0500&lt;br /&gt;
 Birth: 2020-09-11 11:55:43.803327144 -0500&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Interesting docker images ====&lt;br /&gt;
&lt;br /&gt;
* [https://hub.docker.com/r/rasmunk/sshfs rasmunk/sshfs] let you create an sshfs volume, ''perfect'' for a seedbox setup using a remote mount instead of sync. Better documentation, including examples can be found at the github [https://github.com/rasmunk/docker-volume-sshfs rasmunk/docker-volume-sshfs] repository. This is a more recently maintained fork of [https://hub.docker.com/p/vieux/sshfs vieux/sshfs].&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/sonarr sonarr], [https://hub.docker.com/r/hotio/radarr radarr] and [https://hub.docker.com/r/hotio/lidarr lidarr] images let you run the built in version ''or'' specify an alternative via environment variable. The documentation and Dockerfile also don’t make any poor path suggestions.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/ombi ombi], [https://hub.docker.com/r/hotio/jackett jackett], [https://hub.docker.com/r/hotio/nzbhydra2 nzbhydra2] and [https://hub.docker.com/r/hotio/bazarr bazarr] are useful too, but don’t really require any special permissions or paths.&lt;br /&gt;
* [https://hub.docker.com/u/hotio hotio’s] [https://hub.docker.com/r/hotio/unpackerr unpackerr] is useful for packed torrent extraction across a variety of torrent clients where unpacking is lacking or missing entirely.&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-qbittorrentvpn/ qbittorrent], [https://hub.docker.com/r/binhex/arch-delugevpn/ deluge] and [https://hub.docker.com/r/binhex/arch-rtorrentvpn/ rtorrent] are popular torrent clients with built in VPN support. For usenet, there is [https://hub.docker.com/r/binhex/arch-sabnzbd/ sabnzbd] and [https://hub.docker.com/r/binhex/arch-nzbget/ nzbget].&lt;br /&gt;
* [https://hub.docker.com/u/binhex binhex’s] [https://hub.docker.com/r/binhex/arch-sonarr/ sonarr], [https://hub.docker.com/r/binhex/arch-radarr/ radarr] and [https://hub.docker.com/r/binhex/arch-lidarr/ lidarr] images suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume.&lt;br /&gt;
* [https://hub.docker.com/u/linuxserver linuxserver.io’s] images also suggest default paths that don’t allow for hard linking, instead follow the process described above and pass in a single volume. But they do have images for a ''lot'' of software and they’re well maintained.&lt;br /&gt;
* [https://hub.docker.com/r/pyouroboros/ouroboros pyouroboros/ouroboros] or [https://hub.docker.com/r/containrrr/watchtower containrrr/watchtower] automatically update your running Docker containers to the latest available image. These are not recommended if you use Docker Compose.&lt;br /&gt;
&lt;br /&gt;
==== Custom Docker Network and DNS ====&lt;br /&gt;
&lt;br /&gt;
One interesting feature of a [https://docs.docker.com/network/network-tutorial-standalone/#use-user-defined-bridge-networks custom Docker network] is that it gets its own DNS server. If you create a bridge network for your containers, you can use their hostnames in your configuration. For example, if you &amp;lt;code&amp;gt;docker run --network=isolated --hostname=deluge binhex/arch-deluge&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;docker run --network=isolated --hostname=radarr binhex/arch-radarr&amp;lt;/code&amp;gt;, you can then configure the Download Client in Radarr to point at just &amp;lt;code&amp;gt;deluge&amp;lt;/code&amp;gt; and it’ll work ''and'' communicate on its own private network. Which means if you wanted to be even more secure, you could ''stop'' forwarding that port too. If you put your reverse proxy container on the same network, you can even stop forwarding the web interface ports and make them even more secure.&lt;br /&gt;
&lt;br /&gt;
==== Common Problems ====&lt;br /&gt;
&lt;br /&gt;
===== Correct ''outside'' paths, incorrect ''inside'' paths =====&lt;br /&gt;
&lt;br /&gt;
Many people read this and think they understand, but they end up seeing the outside path correctly to something like &amp;lt;code&amp;gt;/data/usenet&amp;lt;/code&amp;gt;, but then they miss the point and set the ''inside'' path to &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; still.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers as root or changing users around =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself running your containers as &amp;lt;code&amp;gt;root:root&amp;lt;/code&amp;gt;, you’re doing something wrong. If you’re not passing in a UID and GID, you’ll be using what ever the default is for the image and ''that'' will be unlikely to line up w/ a reasonable user on your system. And if you’re changing the user and group your Docker containers are running as, you’ll probably end up w/ permissions issues on folders like the &amp;lt;code&amp;gt;/config&amp;lt;/code&amp;gt; folder which will likely have files and folders in them that got created the first time w/ the UID/GID you used the first time.&lt;br /&gt;
&lt;br /&gt;
===== Running Docker containers w/ umask 000 =====&lt;br /&gt;
&lt;br /&gt;
If you find yourself setting a UMASK of &amp;lt;code&amp;gt;000&amp;lt;/code&amp;gt; (which is 777 for folders and 666 for files), you’re ''also'' doing something wrong. It leaves your files and folders read/write to ''everyone'', which is poor Linux hygiene.&lt;br /&gt;
&lt;br /&gt;
==== LinuxServer.io ====&lt;br /&gt;
&lt;br /&gt;
The ''entire'' reason this article even exists is [https://hub.docker.com/u/linuxserver linuxserver.io]’s documentation and default path suggestions. They’re singlehandedly responsible for the &amp;lt;code&amp;gt;/tv&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;/movies&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/downloads&amp;lt;/code&amp;gt; paths which ''break'' hard links and atomic moves. It is for this reason that ''none'' of them are ''specifically'' recommended by this article. That said, once you understand the problem with those paths and that you ''don’t'' have to use them, their images are fine. So feel free to use them and ''most'' of their documentation. Just ''ignore'' their path suggestions.&lt;br /&gt;
&lt;br /&gt;
==== Getting Help ====&lt;br /&gt;
&lt;br /&gt;
Need some help? For real time, chat style support try the [https://discord.gg/xyRwnyB Sonarr] or [https://discord.gg/SRBnFmX Radarr] Discord servers. If you prefer forum style support, make a post in [http://reddit.com/r/sonarr /r/sonarr] or [http://reddit.com/r/radarr /r/radarr].&lt;/div&gt;</summary>
		<author><name>Fryfrog</name></author>
	</entry>
</feed>