<?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=Logvin</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=Logvin"/>
	<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/Special:Contributions/Logvin"/>
	<updated>2026-05-18T18:53:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.2</generator>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2930</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2930"/>
		<updated>2021-01-01T22:05:25Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Nightly Cloud Upload Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount'''&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use three applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
# fuse - https://manpages.ubuntu.com/manpages/eoan/man8/mount.fuse.8.html&lt;br /&gt;
&lt;br /&gt;
Once you have set up these applications, it is highly recommended to set up a cron job to automatically move files from your local drive to the cloud using Rclone. Animosity22 has [https://github.com/animosity22/homescripts a terrific Github page] with a sample script, or [[Cloud_Setup#Nightly_Cloud_Upload_Example|see the example below.]]&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;curl https://rclone.org/install.sh | sudo bash &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
Before we can run Rclone's config tool, we must create a Google API Client ID for your system. The default Rclone config will use the Rclone client ID, which is not recommended: Everyone should create a personal client ID.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access) https://console.developers.google.com/apis/dashboard&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Google Drive&amp;quot;, and &amp;lt;code&amp;gt;enable&amp;lt;/code&amp;gt; the &amp;quot;Google Drive API&amp;quot;. [[File:ENABLE APIS AND SERVICES.png|thumb|ENABLE APIS AND SERVICES]]&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel, then &amp;quot;Create Credentials&amp;quot; in the upper right. [[File:Google Drive Credentials Screenshot.png|thumb|Create New Credentials]]&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt;mount&amp;lt;/code&amp;gt;Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
Now that you have the API access squared away, you can run the rclone &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; utility to create your rclone.conf file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt; - Name of your new remote &lt;br /&gt;
# &amp;lt;code&amp;gt;13&amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# &amp;lt;code&amp;gt;abunchofnumbersandletters.apps.googleusercontent.com&amp;lt;/code&amp;gt; Enter your Google Application Client Id&lt;br /&gt;
# &amp;lt;code&amp;gt;yourgoogleapplicationclientsecret&amp;lt;/code&amp;gt;Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# Enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; - Use Team Drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
&lt;br /&gt;
You can now mount your newly created remote to access your cloud storage:&lt;br /&gt;
  rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
&amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt;crypt&amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt;cloud:crypt&amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt;standard&amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
&amp;lt;pre&amp;gt;wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&amp;lt;/pre&amp;gt;&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
=== Nightly Cloud Upload Example ===&lt;br /&gt;
Once Rclone and Mergefs are set up and configured, all data should be written on your local disk first. You will want to sync this data to your cloud drive then remove it to ensure your local disk does not run out of space. Below is an example bash shell script you may want to use, modeled on Animosity22's [https://github.com/animosity22/homescripts/blob/master/scripts/upload_cloud upload_cloud script].&lt;br /&gt;
&lt;br /&gt;
First start by creating your script.&lt;br /&gt;
  nano ~/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
Example Script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  # Variables to verify match your installation&lt;br /&gt;
  # Rclone Config file&lt;br /&gt;
  RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf&lt;br /&gt;
  export RCLONE_CONFIG&lt;br /&gt;
  # User account that Rclone is running as&lt;br /&gt;
  RCLONE_USER_AGENT=plex&lt;br /&gt;
  export RCLONE_USER_AGENT&lt;br /&gt;
  # Local Mount - Ensure this is set to your local disk only.&lt;br /&gt;
  LOCAL=/local&lt;br /&gt;
  EXCLUDES=/home/plex/.config/scripts/excludes.log&lt;br /&gt;
  LOGFILE=/home/plex/.config/scripts/upload.log&lt;br /&gt;
  # Name of your Rclone Remote, likely cloud or cloudcrypt&lt;br /&gt;
  REMOTE=cloud&lt;br /&gt;
  # This will allow for 3 days for media analysis / intro generation. Feel free to reduce if needed.&lt;br /&gt;
  MOVEAGE=3d&lt;br /&gt;
&lt;br /&gt;
  # Checks&lt;br /&gt;
  # Running Check&lt;br /&gt;
  if [[ $(pidof -x &amp;quot;$(basename &amp;quot;$0&amp;quot;)&amp;quot; -o %PPID) ]]; then exit; fi&lt;br /&gt;
  # Exclude File Check&lt;br /&gt;
  if [[ ! -f $EXCLUDES ]] ; then&lt;br /&gt;
      echo 'Warning: No excludes.log file found at $EXCLUDES'&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Local Disk Check&lt;br /&gt;
  if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then&lt;br /&gt;
          echo &amp;quot;Warning: $LOCAL is not a local disk!&amp;quot;&lt;br /&gt;
          exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Rclone Move Command&lt;br /&gt;
  /usr/bin/rclone move $LOCAL $REMOTE: --log-file $LOGFILE -v --exclude-from $EXCLUDES --delete-empty-src-dirs --fast-list  --min-age $MOVEAGE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add this file to your cron job list, edit your crontab. Ensure your are logged in as the users you want the crontab to run as.&lt;br /&gt;
  crontab -e&lt;br /&gt;
Add the following lines at the bottom of the folder.&lt;br /&gt;
  # Nightly Cloud Sync&lt;br /&gt;
  12 3 * * * ~/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;br /&gt;
=== Increase the number of file watchers ===&lt;br /&gt;
Helps performance when you have a lot of files and directories in cloud storage. [https://forums.plex.tv/t/linux-tips/276247/9 Source.]&lt;br /&gt;
Edit your &amp;lt;code&amp;gt;sysctl.conf&amp;lt;/code&amp;gt; file:&lt;br /&gt;
  sudo nano /etc/sysctl.conf&lt;br /&gt;
Add the following lines at the bottom:&lt;br /&gt;
  # Increase File Watchers for Plex&lt;br /&gt;
  fs.inotify.max_user_watches=262144&lt;br /&gt;
&lt;br /&gt;
You will need to restart your system for this change to take effect.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2929</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2929"/>
		<updated>2021-01-01T20:42:59Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Setting up Rclone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount'''&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use three applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
# fuse - https://manpages.ubuntu.com/manpages/eoan/man8/mount.fuse.8.html&lt;br /&gt;
&lt;br /&gt;
Once you have set up these applications, it is highly recommended to set up a cron job to automatically move files from your local drive to the cloud using Rclone. Animosity22 has [https://github.com/animosity22/homescripts a terrific Github page] with a sample script, or [[Cloud_Setup#Nightly_Cloud_Upload_Example|see the example below.]]&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
&amp;lt;pre&amp;gt;curl https://rclone.org/install.sh | sudo bash &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
Before we can run Rclone's config tool, we must create a Google API Client ID for your system. The default Rclone config will use the Rclone client ID, which is not recommended: Everyone should create a personal client ID.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access) https://console.developers.google.com/apis/dashboard&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Google Drive&amp;quot;, and &amp;lt;code&amp;gt;enable&amp;lt;/code&amp;gt; the &amp;quot;Google Drive API&amp;quot;. [[File:ENABLE APIS AND SERVICES.png|thumb|ENABLE APIS AND SERVICES]]&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel, then &amp;quot;Create Credentials&amp;quot; in the upper right. [[File:Google Drive Credentials Screenshot.png|thumb|Create New Credentials]]&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt;mount&amp;lt;/code&amp;gt;Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
Now that you have the API access squared away, you can run the rclone &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; utility to create your rclone.conf file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt; - Name of your new remote &lt;br /&gt;
# &amp;lt;code&amp;gt;13&amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# &amp;lt;code&amp;gt;abunchofnumbersandletters.apps.googleusercontent.com&amp;lt;/code&amp;gt; Enter your Google Application Client Id&lt;br /&gt;
# &amp;lt;code&amp;gt;yourgoogleapplicationclientsecret&amp;lt;/code&amp;gt;Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# Enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; - Use Team Drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
&lt;br /&gt;
You can now mount your newly created remote to access your cloud storage:&lt;br /&gt;
  rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
&amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt;crypt&amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt;cloud:crypt&amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt;standard&amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
&amp;lt;pre&amp;gt;wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&amp;lt;/pre&amp;gt;&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
=== Nightly Cloud Upload Example ===&lt;br /&gt;
Once Rclone and Mergefs are set up and configured, all data should be written on your local disk first. You will want to sync this data to your cloud drive then remove it to ensure your local disk does not run out of space. Below is an example bash shell script you may want to use, modeled on Animosity22's [https://github.com/animosity22/homescripts/blob/master/scripts/upload_cloud upload_cloud script].&lt;br /&gt;
&lt;br /&gt;
First start by creating your script.&lt;br /&gt;
  nano ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
Example Script:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=bash&amp;gt;&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  # Variables to verify match your installation&lt;br /&gt;
  # Rclone Config file&lt;br /&gt;
  RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf&lt;br /&gt;
  export RCLONE_CONFIG&lt;br /&gt;
  # User account that Rclone is running as&lt;br /&gt;
  RCLONE_USER_AGENT=plex&lt;br /&gt;
  export RCLONE_USER_AGENT&lt;br /&gt;
  # Local Mount - Ensure this is set to your local disk only.&lt;br /&gt;
  LOCAL=/local&lt;br /&gt;
  EXCLUDES=/home/plex/.config/scripts/excludes.log&lt;br /&gt;
  LOGFILE=/home/plex/.config/scripts/upload.log&lt;br /&gt;
  # Name of your Rclone Remote, likely cloud or cloudcrypt&lt;br /&gt;
  REMOTE=cloud&lt;br /&gt;
  # This will allow for 3 days for media analysis / intro generation. Feel free to reduce if needed.&lt;br /&gt;
  MOVEAGE=3d&lt;br /&gt;
&lt;br /&gt;
  # Checks&lt;br /&gt;
  # Running Check&lt;br /&gt;
  if [[ $(pidof -x &amp;quot;$(basename &amp;quot;$0&amp;quot;)&amp;quot; -o %PPID) ]]; then exit; fi&lt;br /&gt;
  # Exclude File Check&lt;br /&gt;
  if [[ ! -f $EXCLUDES ]] ; then&lt;br /&gt;
      echo 'Warning: No excludes.log file found at $EXCLUDES'&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Local Disk Check&lt;br /&gt;
  if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then&lt;br /&gt;
          echo &amp;quot;Warning: $LOCAL is not a local disk!&amp;quot;&lt;br /&gt;
          exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Rclone Move Command&lt;br /&gt;
  /usr/bin/rclone move $LOCAL $REMOTE: --log-file $LOGFILE -v --exclude-from $EXCLUDES --delete-empty-src-dirs --fast-list  --min-age $MOVEAGE&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add this file to your cron job list, edit your crontab. Ensure your are logged in as the users you want the crontab to run as.&lt;br /&gt;
  crontab -e&lt;br /&gt;
Add the following lines at the bottom of the folder.&lt;br /&gt;
  # Nightly Cloud Sync&lt;br /&gt;
  12 3 * * * ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;br /&gt;
=== Increase the number of file watchers ===&lt;br /&gt;
Helps performance when you have a lot of files and directories in cloud storage. [https://forums.plex.tv/t/linux-tips/276247/9 Source.]&lt;br /&gt;
Edit your &amp;lt;code&amp;gt;sysctl.conf&amp;lt;/code&amp;gt; file:&lt;br /&gt;
  sudo nano /etc/sysctl.conf&lt;br /&gt;
Add the following lines at the bottom:&lt;br /&gt;
  # Increase File Watchers for Plex&lt;br /&gt;
  fs.inotify.max_user_watches=262144&lt;br /&gt;
&lt;br /&gt;
You will need to restart your system for this change to take effect.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2635</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2635"/>
		<updated>2020-12-04T19:48:27Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Application Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use three applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
# fuse - https://manpages.ubuntu.com/manpages/eoan/man8/mount.fuse.8.html&lt;br /&gt;
&lt;br /&gt;
Once you have set up these applications, it is highly recommended to set up a cron job to automatically move files from your local drive to the cloud using Rclone. Animosity22 has [https://github.com/animosity22/homescripts a terrific Github page] with a sample script, or [[Cloud_Setup#Nightly_Cloud_Upload_Example|see the example below.]]&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
Before we can run Rclone's config tool, we must create a Google API Client ID for your system. The default Rclone config will use the Rclone client ID, which is not recommended: Everyone should create a personal client ID.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access) https://console.developers.google.com/apis/dashboard&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Google Drive&amp;quot;, and &amp;lt;code&amp;gt;enable&amp;lt;/code&amp;gt; the &amp;quot;Google Drive API&amp;quot;. [[File:ENABLE APIS AND SERVICES.png|thumb|ENABLE APIS AND SERVICES]]&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel, then &amp;quot;Create Credentials&amp;quot; in the upper right. [[File:Google Drive Credentials Screenshot.png|thumb|Create New Credentials]]&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
Now that you have the API access squared away, you can run the rclone &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; utility to create your rclone.conf file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt; - Name of your new remote &lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# &amp;lt;code&amp;gt; abunchofnumbersandletters.apps.googleusercontent.com &amp;lt;/code&amp;gt; Enter your Google Application Client Id&lt;br /&gt;
# &amp;lt;code&amp;gt; yourgoogleapplicationclientsecret &amp;lt;/code&amp;gt; Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# Enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - Use Team Drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
&lt;br /&gt;
You can now mount your newly created remote to access your cloud storage:&lt;br /&gt;
  rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
=== Nightly Cloud Upload Example ===&lt;br /&gt;
Once Rclone and Mergefs are set up and configured, all data should be written on your local disk first. You will want to sync this data to your cloud drive then remove it to ensure your local disk does not run out of space. Below is an example bash shell script you may want to use, modeled on Animosity22's [https://github.com/animosity22/homescripts/blob/master/scripts/upload_cloud upload_cloud script].&lt;br /&gt;
&lt;br /&gt;
First start by creating your script.&lt;br /&gt;
  nano ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
Example Script:&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  # Variables to verify match your installation&lt;br /&gt;
  # Rclone Config file&lt;br /&gt;
  RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf&lt;br /&gt;
  export RCLONE_CONFIG&lt;br /&gt;
  # User account that Rclone is running as&lt;br /&gt;
  RCLONE_USER_AGENT=plex&lt;br /&gt;
  export RCLONE_USER_AGENT&lt;br /&gt;
  # Local Mount - Ensure this is set to your local disk only.&lt;br /&gt;
  LOCAL=/local&lt;br /&gt;
  EXCLUDES=/home/plex/.config/scripts/excludes.log&lt;br /&gt;
  LOGFILE=/home/plex/.config/scripts/upload.log&lt;br /&gt;
  # Name of your Rclone Remote, likely cloud or cloudcrypt&lt;br /&gt;
  REMOTE=cloud&lt;br /&gt;
  # This will allow for 3 days for media analysis / intro generation. Feel free to reduce if needed.&lt;br /&gt;
  MOVEAGE=3d&lt;br /&gt;
  &lt;br /&gt;
  # Checks&lt;br /&gt;
  # Running Check&lt;br /&gt;
  if [[ $(pidof -x &amp;quot;$(basename &amp;quot;$0&amp;quot;)&amp;quot; -o %PPID) ]]; then exit; fi&lt;br /&gt;
  # Exclude File Check&lt;br /&gt;
  if [[ ! -f $EXCLUDES ]] ; then&lt;br /&gt;
      echo 'Warning: No excludes.log file found at $EXCLUDES'&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Local Disk Check&lt;br /&gt;
  if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then&lt;br /&gt;
          echo &amp;quot;Warning: $LOCAL is not a local disk!&amp;quot;&lt;br /&gt;
          exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  &lt;br /&gt;
  # Rclone Move Command&lt;br /&gt;
  /usr/bin/rclone move $LOCAL $REMOTE: --log-file $LOGFILE -v --exclude-from $EXCLUDES --delete-empty-src-dirs --fast-list  --min-age $MOVEAGE&lt;br /&gt;
&lt;br /&gt;
To add this file to your cron job list, edit your crontab. Ensure your are logged in as the users you want the crontab to run as.&lt;br /&gt;
  crontab -e&lt;br /&gt;
Add the following lines at the bottom of the folder.&lt;br /&gt;
  # Nightly Cloud Sync&lt;br /&gt;
  12 3 * * * ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;br /&gt;
=== Increase the number of file watchers ===&lt;br /&gt;
Helps performance when you have a lot of files and directories in cloud storage. [https://forums.plex.tv/t/linux-tips/276247/9 Source.]&lt;br /&gt;
Edit your &amp;lt;code&amp;gt;sysctl.conf&amp;lt;/code&amp;gt; file:&lt;br /&gt;
  sudo nano /etc/sysctl.conf&lt;br /&gt;
Add the following lines at the bottom:&lt;br /&gt;
  # Increase File Watchers for Plex&lt;br /&gt;
  fs.inotify.max_user_watches=262144&lt;br /&gt;
&lt;br /&gt;
You will need to restart your system for this change to take effect.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2634</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2634"/>
		<updated>2020-12-04T19:47:24Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Recommended Plex Server Changes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use three applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
# fuse - https://manpages.ubuntu.com/manpages/eoan/man8/mount.fuse.8.html&lt;br /&gt;
&lt;br /&gt;
Once you have set up these applications, it is highly recommended to set up a cron job to automatically move files from your local drive to the cloud using Rclone. Animosity22 has [https://github.com/animosity22/homescripts a terrific Github page] with a sample script, or see the example below.&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
Before we can run Rclone's config tool, we must create a Google API Client ID for your system. The default Rclone config will use the Rclone client ID, which is not recommended: Everyone should create a personal client ID.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access) https://console.developers.google.com/apis/dashboard&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Google Drive&amp;quot;, and &amp;lt;code&amp;gt;enable&amp;lt;/code&amp;gt; the &amp;quot;Google Drive API&amp;quot;. [[File:ENABLE APIS AND SERVICES.png|thumb|ENABLE APIS AND SERVICES]]&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel, then &amp;quot;Create Credentials&amp;quot; in the upper right. [[File:Google Drive Credentials Screenshot.png|thumb|Create New Credentials]]&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
Now that you have the API access squared away, you can run the rclone &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; utility to create your rclone.conf file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt; - Name of your new remote &lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# &amp;lt;code&amp;gt; abunchofnumbersandletters.apps.googleusercontent.com &amp;lt;/code&amp;gt; Enter your Google Application Client Id&lt;br /&gt;
# &amp;lt;code&amp;gt; yourgoogleapplicationclientsecret &amp;lt;/code&amp;gt; Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# Enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - Use Team Drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
&lt;br /&gt;
You can now mount your newly created remote to access your cloud storage:&lt;br /&gt;
  rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
=== Nightly Cloud Upload Example ===&lt;br /&gt;
Once Rclone and Mergefs are set up and configured, all data should be written on your local disk first. You will want to sync this data to your cloud drive then remove it to ensure your local disk does not run out of space. Below is an example bash shell script you may want to use, modeled on Animosity22's [https://github.com/animosity22/homescripts/blob/master/scripts/upload_cloud upload_cloud script].&lt;br /&gt;
&lt;br /&gt;
First start by creating your script.&lt;br /&gt;
  nano ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
Example Script:&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  # Variables to verify match your installation&lt;br /&gt;
  # Rclone Config file&lt;br /&gt;
  RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf&lt;br /&gt;
  export RCLONE_CONFIG&lt;br /&gt;
  # User account that Rclone is running as&lt;br /&gt;
  RCLONE_USER_AGENT=plex&lt;br /&gt;
  export RCLONE_USER_AGENT&lt;br /&gt;
  # Local Mount - Ensure this is set to your local disk only.&lt;br /&gt;
  LOCAL=/local&lt;br /&gt;
  EXCLUDES=/home/plex/.config/scripts/excludes.log&lt;br /&gt;
  LOGFILE=/home/plex/.config/scripts/upload.log&lt;br /&gt;
  # Name of your Rclone Remote, likely cloud or cloudcrypt&lt;br /&gt;
  REMOTE=cloud&lt;br /&gt;
  # This will allow for 3 days for media analysis / intro generation. Feel free to reduce if needed.&lt;br /&gt;
  MOVEAGE=3d&lt;br /&gt;
  &lt;br /&gt;
  # Checks&lt;br /&gt;
  # Running Check&lt;br /&gt;
  if [[ $(pidof -x &amp;quot;$(basename &amp;quot;$0&amp;quot;)&amp;quot; -o %PPID) ]]; then exit; fi&lt;br /&gt;
  # Exclude File Check&lt;br /&gt;
  if [[ ! -f $EXCLUDES ]] ; then&lt;br /&gt;
      echo 'Warning: No excludes.log file found at $EXCLUDES'&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Local Disk Check&lt;br /&gt;
  if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then&lt;br /&gt;
          echo &amp;quot;Warning: $LOCAL is not a local disk!&amp;quot;&lt;br /&gt;
          exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  &lt;br /&gt;
  # Rclone Move Command&lt;br /&gt;
  /usr/bin/rclone move $LOCAL $REMOTE: --log-file $LOGFILE -v --exclude-from $EXCLUDES --delete-empty-src-dirs --fast-list  --min-age $MOVEAGE&lt;br /&gt;
&lt;br /&gt;
To add this file to your cron job list, edit your crontab. Ensure your are logged in as the users you want the crontab to run as.&lt;br /&gt;
  crontab -e&lt;br /&gt;
Add the following lines at the bottom of the folder.&lt;br /&gt;
  # Nightly Cloud Sync&lt;br /&gt;
  12 3 * * * ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;br /&gt;
=== Increase the number of file watchers ===&lt;br /&gt;
Helps performance when you have a lot of files and directories in cloud storage. [https://forums.plex.tv/t/linux-tips/276247/9 Source.]&lt;br /&gt;
Edit your &amp;lt;code&amp;gt;sysctl.conf&amp;lt;/code&amp;gt; file:&lt;br /&gt;
  sudo nano /etc/sysctl.conf&lt;br /&gt;
Add the following lines at the bottom:&lt;br /&gt;
  # Increase File Watchers for Plex&lt;br /&gt;
  fs.inotify.max_user_watches=262144&lt;br /&gt;
&lt;br /&gt;
You will need to restart your system for this change to take effect.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2633</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2633"/>
		<updated>2020-12-04T19:39:56Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Nightly Cloud Upload Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use three applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
# fuse - https://manpages.ubuntu.com/manpages/eoan/man8/mount.fuse.8.html&lt;br /&gt;
&lt;br /&gt;
Once you have set up these applications, it is highly recommended to set up a cron job to automatically move files from your local drive to the cloud using Rclone. Animosity22 has [https://github.com/animosity22/homescripts a terrific Github page] with a sample script, or see the example below.&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
Before we can run Rclone's config tool, we must create a Google API Client ID for your system. The default Rclone config will use the Rclone client ID, which is not recommended: Everyone should create a personal client ID.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access) https://console.developers.google.com/apis/dashboard&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Google Drive&amp;quot;, and &amp;lt;code&amp;gt;enable&amp;lt;/code&amp;gt; the &amp;quot;Google Drive API&amp;quot;. [[File:ENABLE APIS AND SERVICES.png|thumb|ENABLE APIS AND SERVICES]]&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel, then &amp;quot;Create Credentials&amp;quot; in the upper right. [[File:Google Drive Credentials Screenshot.png|thumb|Create New Credentials]]&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
Now that you have the API access squared away, you can run the rclone &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; utility to create your rclone.conf file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt; - Name of your new remote &lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# &amp;lt;code&amp;gt; abunchofnumbersandletters.apps.googleusercontent.com &amp;lt;/code&amp;gt; Enter your Google Application Client Id&lt;br /&gt;
# &amp;lt;code&amp;gt; yourgoogleapplicationclientsecret &amp;lt;/code&amp;gt; Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# Enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - Use Team Drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
&lt;br /&gt;
You can now mount your newly created remote to access your cloud storage:&lt;br /&gt;
  rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
=== Nightly Cloud Upload Example ===&lt;br /&gt;
Once Rclone and Mergefs are set up and configured, all data should be written on your local disk first. You will want to sync this data to your cloud drive then remove it to ensure your local disk does not run out of space. Below is an example bash shell script you may want to use, modeled on Animosity22's [https://github.com/animosity22/homescripts/blob/master/scripts/upload_cloud upload_cloud script].&lt;br /&gt;
&lt;br /&gt;
First start by creating your script.&lt;br /&gt;
  nano ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
Example Script:&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  # Variables to verify match your installation&lt;br /&gt;
  # Rclone Config file&lt;br /&gt;
  RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf&lt;br /&gt;
  export RCLONE_CONFIG&lt;br /&gt;
  # User account that Rclone is running as&lt;br /&gt;
  RCLONE_USER_AGENT=plex&lt;br /&gt;
  export RCLONE_USER_AGENT&lt;br /&gt;
  # Local Mount - Ensure this is set to your local disk only.&lt;br /&gt;
  LOCAL=/local&lt;br /&gt;
  EXCLUDES=/home/plex/.config/scripts/excludes.log&lt;br /&gt;
  LOGFILE=/home/plex/.config/scripts/upload.log&lt;br /&gt;
  # Name of your Rclone Remote, likely cloud or cloudcrypt&lt;br /&gt;
  REMOTE=cloud&lt;br /&gt;
  # This will allow for 3 days for media analysis / intro generation. Feel free to reduce if needed.&lt;br /&gt;
  MOVEAGE=3d&lt;br /&gt;
  &lt;br /&gt;
  # Checks&lt;br /&gt;
  # Running Check&lt;br /&gt;
  if [[ $(pidof -x &amp;quot;$(basename &amp;quot;$0&amp;quot;)&amp;quot; -o %PPID) ]]; then exit; fi&lt;br /&gt;
  # Exclude File Check&lt;br /&gt;
  if [[ ! -f $EXCLUDES ]] ; then&lt;br /&gt;
      echo 'Warning: No excludes.log file found at $EXCLUDES'&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Local Disk Check&lt;br /&gt;
  if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then&lt;br /&gt;
          echo &amp;quot;Warning: $LOCAL is not a local disk!&amp;quot;&lt;br /&gt;
          exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  &lt;br /&gt;
  # Rclone Move Command&lt;br /&gt;
  /usr/bin/rclone move $LOCAL $REMOTE: --log-file $LOGFILE -v --exclude-from $EXCLUDES --delete-empty-src-dirs --fast-list  --min-age $MOVEAGE&lt;br /&gt;
&lt;br /&gt;
To add this file to your cron job list, edit your crontab. Ensure your are logged in as the users you want the crontab to run as.&lt;br /&gt;
  crontab -e&lt;br /&gt;
Add the following lines at the bottom of the folder.&lt;br /&gt;
  # Nightly Cloud Sync&lt;br /&gt;
  12 3 * * * ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2632</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2632"/>
		<updated>2020-12-04T19:38:48Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Setting up Rclone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use three applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
# fuse - https://manpages.ubuntu.com/manpages/eoan/man8/mount.fuse.8.html&lt;br /&gt;
&lt;br /&gt;
Once you have set up these applications, it is highly recommended to set up a cron job to automatically move files from your local drive to the cloud using Rclone. Animosity22 has [https://github.com/animosity22/homescripts a terrific Github page] with a sample script, or see the example below.&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
Before we can run Rclone's config tool, we must create a Google API Client ID for your system. The default Rclone config will use the Rclone client ID, which is not recommended: Everyone should create a personal client ID.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access) https://console.developers.google.com/apis/dashboard&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Google Drive&amp;quot;, and &amp;lt;code&amp;gt;enable&amp;lt;/code&amp;gt; the &amp;quot;Google Drive API&amp;quot;. [[File:ENABLE APIS AND SERVICES.png|thumb|ENABLE APIS AND SERVICES]]&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel, then &amp;quot;Create Credentials&amp;quot; in the upper right. [[File:Google Drive Credentials Screenshot.png|thumb|Create New Credentials]]&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
Now that you have the API access squared away, you can run the rclone &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; utility to create your rclone.conf file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt; - Name of your new remote &lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# &amp;lt;code&amp;gt; abunchofnumbersandletters.apps.googleusercontent.com &amp;lt;/code&amp;gt; Enter your Google Application Client Id&lt;br /&gt;
# &amp;lt;code&amp;gt; yourgoogleapplicationclientsecret &amp;lt;/code&amp;gt; Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# Enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - Use Team Drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
&lt;br /&gt;
You can now mount your newly created remote to access your cloud storage:&lt;br /&gt;
  rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
=== Nightly Cloud Upload Example ===&lt;br /&gt;
Once Rclone and Mergefs are set up and configured, all data should be written on your local disk first. You will want to sync this data to your cloud drive then remove it to ensure your local disk does not run out of space. Below is an example bash shell script you may want to use, modeled on Animosity22's [https://github.com/animosity22/homescripts/blob/master/scripts/upload_cloud upload_cloud script].&lt;br /&gt;
&lt;br /&gt;
First start by creating your script.&lt;br /&gt;
  nano ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
Example Script:&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  # Variables to verify match your installation&lt;br /&gt;
  # Rclone Config file&lt;br /&gt;
  RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf&lt;br /&gt;
  export RCLONE_CONFIG&lt;br /&gt;
  # User account that Rclone is running as&lt;br /&gt;
  RCLONE_USER_AGENT=plex&lt;br /&gt;
  export RCLONE_USER_AGENT&lt;br /&gt;
  # Local Mount - Ensure this is set to your local disk only.&lt;br /&gt;
  LOCAL=/local&lt;br /&gt;
  EXCLUDES=/home/plex/.config/scripts/excludes.log&lt;br /&gt;
  LOGFILE=/home/plex/.config/scripts/upload.log&lt;br /&gt;
  # Name of your Rclone Remote, likely cloud or cloudcrypt&lt;br /&gt;
  REMOTE=cloud&lt;br /&gt;
  # This will allow for 3 days for media analysis / intro generation. Feel free to reduce if needed.&lt;br /&gt;
  MOVEAGE=3d&lt;br /&gt;
&lt;br /&gt;
  # Checks&lt;br /&gt;
  # Running Check&lt;br /&gt;
  if [[ $(pidof -x &amp;quot;$(basename &amp;quot;$0&amp;quot;)&amp;quot; -o %PPID) ]]; then exit; fi&lt;br /&gt;
  # Exclude File Check&lt;br /&gt;
  if [[ ! -f $EXCLUDES ]] ; then&lt;br /&gt;
      echo 'Warning: No excludes.log file found at $EXCLUDES'&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Local Disk Check&lt;br /&gt;
  if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then&lt;br /&gt;
          echo &amp;quot;Warning: $LOCAL is not a local disk!&amp;quot;&lt;br /&gt;
          exit 1&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
  # Rclone Move Command&lt;br /&gt;
  /usr/bin/rclone move $LOCAL $REMOTE: --log-file $LOGFILE -v --exclude-from $EXCLUDES --delete-empty-src-dirs --fast-list  --min-age $MOVEAGE&lt;br /&gt;
&lt;br /&gt;
To add this file to your cron job list, edit your crontab. Ensure your are logged in as the users you want the crontab to run as.&lt;br /&gt;
  crontab -e&lt;br /&gt;
Add the following lines at the bottom of the folder.&lt;br /&gt;
  # Nightly Cloud Sync&lt;br /&gt;
  12 3 * * * ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2631</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2631"/>
		<updated>2020-12-04T19:37:59Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Rclone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use three applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
# fuse - https://manpages.ubuntu.com/manpages/eoan/man8/mount.fuse.8.html&lt;br /&gt;
&lt;br /&gt;
Once you have set up these applications, it is highly recommended to set up a cron job to automatically move files from your local drive to the cloud using Rclone. Animosity22 has [https://github.com/animosity22/homescripts a terrific Github page] with a sample script, or see the example below.&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
Before we can run Rclone's config tool, we must create a Google API Client ID for your system. The default Rclone config will use the Rclone client ID, which is not recommended: Everyone should create a personal client ID.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access) https://console.developers.google.com/apis/dashboard&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Google Drive&amp;quot;, and &amp;lt;code&amp;gt;enable&amp;lt;/code&amp;gt; the &amp;quot;Google Drive API&amp;quot;. [[File:ENABLE APIS AND SERVICES.png|thumb|ENABLE APIS AND SERVICES]]&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel, then &amp;quot;Create Credentials&amp;quot; in the upper right. &lt;br /&gt;
[[File:Google Drive Credentials Screenshot.png|thumb|Create New Credentials]]&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
Now that you have the API access squared away, you can run the rclone &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; utility to create your rclone.conf file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config&amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt; - Name of your new remote &lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# &amp;lt;code&amp;gt; abunchofnumbersandletters.apps.googleusercontent.com &amp;lt;/code&amp;gt; Enter your Google Application Client Id&lt;br /&gt;
# &amp;lt;code&amp;gt; yourgoogleapplicationclientsecret &amp;lt;/code&amp;gt; Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# Enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - Use Team Drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
&lt;br /&gt;
You can now mount your newly created remote to access your cloud storage:&lt;br /&gt;
  rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
=== Nightly Cloud Upload Example ===&lt;br /&gt;
Once Rclone and Mergefs are set up and configured, all data should be written on your local disk first. You will want to sync this data to your cloud drive then remove it to ensure your local disk does not run out of space. Below is an example bash shell script you may want to use, modeled on Animosity22's [https://github.com/animosity22/homescripts/blob/master/scripts/upload_cloud upload_cloud script].&lt;br /&gt;
&lt;br /&gt;
First start by creating your script.&lt;br /&gt;
  nano ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
Example Script:&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  # Variables to verify match your installation&lt;br /&gt;
  # Rclone Config file&lt;br /&gt;
  RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf&lt;br /&gt;
  export RCLONE_CONFIG&lt;br /&gt;
  # User account that Rclone is running as&lt;br /&gt;
  RCLONE_USER_AGENT=plex&lt;br /&gt;
  export RCLONE_USER_AGENT&lt;br /&gt;
  # Local Mount - Ensure this is set to your local disk only.&lt;br /&gt;
  LOCAL=/local&lt;br /&gt;
  EXCLUDES=/home/plex/.config/scripts/excludes.log&lt;br /&gt;
  LOGFILE=/home/plex/.config/scripts/upload.log&lt;br /&gt;
  # Name of your Rclone Remote, likely cloud or cloudcrypt&lt;br /&gt;
  REMOTE=cloud&lt;br /&gt;
  # This will allow for 3 days for media analysis / intro generation. Feel free to reduce if needed.&lt;br /&gt;
  MOVEAGE=3d&lt;br /&gt;
&lt;br /&gt;
  # Checks&lt;br /&gt;
  # Running Check&lt;br /&gt;
  if [[ $(pidof -x &amp;quot;$(basename &amp;quot;$0&amp;quot;)&amp;quot; -o %PPID) ]]; then exit; fi&lt;br /&gt;
  # Exclude File Check&lt;br /&gt;
  if [[ ! -f $EXCLUDES ]] ; then&lt;br /&gt;
      echo 'Warning: No excludes.log file found at $EXCLUDES'&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Local Disk Check&lt;br /&gt;
  if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then&lt;br /&gt;
          echo &amp;quot;Warning: $LOCAL is not a local disk!&amp;quot;&lt;br /&gt;
          exit 1&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
  # Rclone Move Command&lt;br /&gt;
  /usr/bin/rclone move $LOCAL $REMOTE: --log-file $LOGFILE -v --exclude-from $EXCLUDES --delete-empty-src-dirs --fast-list  --min-age $MOVEAGE&lt;br /&gt;
&lt;br /&gt;
To add this file to your cron job list, edit your crontab. Ensure your are logged in as the users you want the crontab to run as.&lt;br /&gt;
  crontab -e&lt;br /&gt;
Add the following lines at the bottom of the folder.&lt;br /&gt;
  # Nightly Cloud Sync&lt;br /&gt;
  12 3 * * * ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2630</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2630"/>
		<updated>2020-12-04T19:28:53Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Setting up Rclone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use three applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
# fuse - https://manpages.ubuntu.com/manpages/eoan/man8/mount.fuse.8.html&lt;br /&gt;
&lt;br /&gt;
Once you have set up these applications, it is highly recommended to set up a cron job to automatically move files from your local drive to the cloud using Rclone. Animosity22 has [https://github.com/animosity22/homescripts a terrific Github page] with a sample script, or see the example below.&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
Before we can run Rclone's config tool, we must create a Google API Client ID for your system. The default Rclone config will use the Rclone client ID, which is not recommended: Everyone should create a personal client ID.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access) https://console.developers.google.com/apis/dashboard&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Google Drive&amp;quot;, and &amp;lt;code&amp;gt;enable&amp;lt;/code&amp;gt; the &amp;quot;Google Drive API&amp;quot;. [[File:ENABLE APIS AND SERVICES.png|thumb|ENABLE APIS AND SERVICES]]&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel, then &amp;quot;Create Credentials&amp;quot; in the upper right. &lt;br /&gt;
[[File:Google Drive Credentials Screenshot.png|thumb|Create New Credentials]]&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
Now that you have the API access squared away, you can run the rclone &amp;lt;code&amp;gt;config&amp;lt;/code&amp;gt; utility to create your rclone.conf file.&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
=== Nightly Cloud Upload Example ===&lt;br /&gt;
Once Rclone and Mergefs are set up and configured, all data should be written on your local disk first. You will want to sync this data to your cloud drive then remove it to ensure your local disk does not run out of space. Below is an example bash shell script you may want to use, modeled on Animosity22's [https://github.com/animosity22/homescripts/blob/master/scripts/upload_cloud upload_cloud script].&lt;br /&gt;
&lt;br /&gt;
First start by creating your script.&lt;br /&gt;
  nano ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
Example Script:&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  # Variables to verify match your installation&lt;br /&gt;
  # Rclone Config file&lt;br /&gt;
  RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf&lt;br /&gt;
  export RCLONE_CONFIG&lt;br /&gt;
  # User account that Rclone is running as&lt;br /&gt;
  RCLONE_USER_AGENT=plex&lt;br /&gt;
  export RCLONE_USER_AGENT&lt;br /&gt;
  # Local Mount - Ensure this is set to your local disk only.&lt;br /&gt;
  LOCAL=/local&lt;br /&gt;
  EXCLUDES=/home/plex/.config/scripts/excludes.log&lt;br /&gt;
  LOGFILE=/home/plex/.config/scripts/upload.log&lt;br /&gt;
  # Name of your Rclone Remote, likely cloud or cloudcrypt&lt;br /&gt;
  REMOTE=cloud&lt;br /&gt;
  # This will allow for 3 days for media analysis / intro generation. Feel free to reduce if needed.&lt;br /&gt;
  MOVEAGE=3d&lt;br /&gt;
&lt;br /&gt;
  # Checks&lt;br /&gt;
  # Running Check&lt;br /&gt;
  if [[ $(pidof -x &amp;quot;$(basename &amp;quot;$0&amp;quot;)&amp;quot; -o %PPID) ]]; then exit; fi&lt;br /&gt;
  # Exclude File Check&lt;br /&gt;
  if [[ ! -f $EXCLUDES ]] ; then&lt;br /&gt;
      echo 'Warning: No excludes.log file found at $EXCLUDES'&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Local Disk Check&lt;br /&gt;
  if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then&lt;br /&gt;
          echo &amp;quot;Warning: $LOCAL is not a local disk!&amp;quot;&lt;br /&gt;
          exit 1&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
  # Rclone Move Command&lt;br /&gt;
  /usr/bin/rclone move $LOCAL $REMOTE: --log-file $LOGFILE -v --exclude-from $EXCLUDES --delete-empty-src-dirs --fast-list  --min-age $MOVEAGE&lt;br /&gt;
&lt;br /&gt;
To add this file to your cron job list, edit your crontab. Ensure your are logged in as the users you want the crontab to run as.&lt;br /&gt;
  crontab -e&lt;br /&gt;
Add the following lines at the bottom of the folder.&lt;br /&gt;
  # Nightly Cloud Sync&lt;br /&gt;
  12 3 * * * ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=File:Google_Drive_Credentials_Screenshot.png&amp;diff=2629</id>
		<title>File:Google Drive Credentials Screenshot.png</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=File:Google_Drive_Credentials_Screenshot.png&amp;diff=2629"/>
		<updated>2020-12-04T19:26:29Z</updated>

		<summary type="html">&lt;p&gt;Logvin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot showing the credentials creation for Google Drive&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=File:ENABLE_APIS_AND_SERVICES.png&amp;diff=2628</id>
		<title>File:ENABLE APIS AND SERVICES.png</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=File:ENABLE_APIS_AND_SERVICES.png&amp;diff=2628"/>
		<updated>2020-12-04T19:18:26Z</updated>

		<summary type="html">&lt;p&gt;Logvin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Screenshot from a Google API Dashboard Project showing the ENABLE APIS AND SERVICES button.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2627</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2627"/>
		<updated>2020-12-04T17:39:38Z</updated>

		<summary type="html">&lt;p&gt;Logvin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use three applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
# fuse - https://manpages.ubuntu.com/manpages/eoan/man8/mount.fuse.8.html&lt;br /&gt;
&lt;br /&gt;
Once you have set up these applications, it is highly recommended to set up a cron job to automatically move files from your local drive to the cloud using Rclone. Animosity22 has [https://github.com/animosity22/homescripts a terrific Github page] with a sample script, or see the example below.&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
=== Nightly Cloud Upload Example ===&lt;br /&gt;
Once Rclone and Mergefs are set up and configured, all data should be written on your local disk first. You will want to sync this data to your cloud drive then remove it to ensure your local disk does not run out of space. Below is an example bash shell script you may want to use, modeled on Animosity22's [https://github.com/animosity22/homescripts/blob/master/scripts/upload_cloud upload_cloud script].&lt;br /&gt;
&lt;br /&gt;
First start by creating your script.&lt;br /&gt;
  nano ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
Example Script:&lt;br /&gt;
  #!/bin/bash&lt;br /&gt;
  # Variables to verify match your installation&lt;br /&gt;
  # Rclone Config file&lt;br /&gt;
  RCLONE_CONFIG=/home/plex/.config/rclone/rclone.conf&lt;br /&gt;
  export RCLONE_CONFIG&lt;br /&gt;
  # User account that Rclone is running as&lt;br /&gt;
  RCLONE_USER_AGENT=plex&lt;br /&gt;
  export RCLONE_USER_AGENT&lt;br /&gt;
  # Local Mount - Ensure this is set to your local disk only.&lt;br /&gt;
  LOCAL=/local&lt;br /&gt;
  EXCLUDES=/home/plex/.config/scripts/excludes.log&lt;br /&gt;
  LOGFILE=/home/plex/.config/scripts/upload.log&lt;br /&gt;
  # Name of your Rclone Remote, likely cloud or cloudcrypt&lt;br /&gt;
  REMOTE=cloud&lt;br /&gt;
  # This will allow for 3 days for media analysis / intro generation. Feel free to reduce if needed.&lt;br /&gt;
  MOVEAGE=3d&lt;br /&gt;
&lt;br /&gt;
  # Checks&lt;br /&gt;
  # Running Check&lt;br /&gt;
  if [[ $(pidof -x &amp;quot;$(basename &amp;quot;$0&amp;quot;)&amp;quot; -o %PPID) ]]; then exit; fi&lt;br /&gt;
  # Exclude File Check&lt;br /&gt;
  if [[ ! -f $EXCLUDES ]] ; then&lt;br /&gt;
      echo 'Warning: No excludes.log file found at $EXCLUDES'&lt;br /&gt;
      exit 1&lt;br /&gt;
  fi&lt;br /&gt;
  # Local Disk Check&lt;br /&gt;
  if /bin/findmnt $LOCAL -o FSTYPE -n | grep fuse; then&lt;br /&gt;
          echo &amp;quot;Warning: $LOCAL is not a local disk!&amp;quot;&lt;br /&gt;
          exit 1&lt;br /&gt;
  fi&lt;br /&gt;
&lt;br /&gt;
  # Rclone Move Command&lt;br /&gt;
  /usr/bin/rclone move $LOCAL $REMOTE: --log-file $LOGFILE -v --exclude-from $EXCLUDES --delete-empty-src-dirs --fast-list  --min-age $MOVEAGE&lt;br /&gt;
&lt;br /&gt;
To add this file to your cron job list, edit your crontab. Ensure your are logged in as the users you want the crontab to run as.&lt;br /&gt;
  crontab -e&lt;br /&gt;
Add the following lines at the bottom of the folder.&lt;br /&gt;
  # Nightly Cloud Sync&lt;br /&gt;
  12 3 * * * ~/home/.config/scripts/nightly_cloud_sync.sh&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2626</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2626"/>
		<updated>2020-12-04T17:19:14Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Application Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use three applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
# fuse - https://manpages.ubuntu.com/manpages/eoan/man8/mount.fuse.8.html&lt;br /&gt;
&lt;br /&gt;
Once you have set up these applications, it is highly recommended to set up a cron job to automatically move files from your local drive to the cloud using Rclone. Animosity22 has [https://github.com/animosity22/homescripts a terrific Github page] with a sample script, or see the example below.&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2625</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2625"/>
		<updated>2020-12-04T17:11:30Z</updated>

		<summary type="html">&lt;p&gt;Logvin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
Once you verify that everything is working, it is recommended to use an autostart file configured to start after Rclone.&lt;br /&gt;
&lt;br /&gt;
==== Mergerfs Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
&lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Mergerfs will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Mergerfs will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named to match your merged folder name. If you have followed along with this wiki, that name would be &amp;lt;code&amp;gt;merge&amp;lt;/code&amp;gt; so your service file would be named&amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Mergerfs's executable is placed in &amp;lt;code&amp;gt;/usr/local/bin/&amp;lt;/code&amp;gt;, your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Mergerfs Mount (merge)&lt;br /&gt;
  Requires=rclone.service&lt;br /&gt;
  After=rclone.service&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=forking&lt;br /&gt;
  ExecStart=/usr/local/bin/mergerfs /local:/cloud /merge \&lt;br /&gt;
  -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
  KillMode=process&lt;br /&gt;
  Restart=on-failure&lt;br /&gt;
  User=plex&lt;br /&gt;
  Group=plex&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Mergerfs has access to all data directories.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /local&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /local&lt;br /&gt;
 $ ls -lad /merge&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /merge&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;merge.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable merge.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Mergerfs. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start merge.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Mergerfs is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status merge.service &lt;br /&gt;
  ● merge.service - Mergerfs Mount (merge)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/merge.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (mergerfs)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/merge.service&lt;br /&gt;
               └─2392484 /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest, &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Mergerfs Mount (merge)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Mergerfs Mount (merge).&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2624</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2624"/>
		<updated>2020-12-04T16:54:55Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Application Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. ''Note:'' There are no spaces in the variables passed to the &amp;lt;code&amp;gt;-o&amp;lt;/code&amp;gt; flag, so it looks like a giant run on list and should be a single line.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2623</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2623"/>
		<updated>2020-12-04T16:51:56Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Application Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Mergerfs ====&lt;br /&gt;
Mergefs has a dependency on Fuse, so we will start by installing that:&lt;br /&gt;
  sudo apt install fuse&lt;br /&gt;
Next, we must modify the &amp;lt;code&amp;gt;fuse.conf&amp;lt;/code&amp;gt; file to enable the &amp;lt;code&amp;gt;allow_other&amp;lt;/code&amp;gt; funtion:&lt;br /&gt;
  sudo nano /etc/fuse.conf&lt;br /&gt;
Modify the last line by removing the # before &amp;lt;code&amp;gt;user_allow_other&amp;lt;/code&amp;gt;. It should look like this:&lt;br /&gt;
   # Allow non-root users to specify the allow_other or allow_root mount options.&lt;br /&gt;
   user_allow_other&lt;br /&gt;
Now we can install Mergerfs. Go to the [https://github.com/trapexit/mergerfs/releases Mergerfs github page] and download the newest release that matches your install.&lt;br /&gt;
  wget https://github.com/trapexit/mergerfs/releases/download/2.32.0/mergerfs_2.32.0.ubuntu-focal_amd64.deb&lt;br /&gt;
And then install it:&lt;br /&gt;
  dpkg -i mergefs*.deb&lt;br /&gt;
&lt;br /&gt;
To execute Mergerfs, run the following command. This assumes your local storage is mounted at &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, your cloud storage is mounted at &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and your merged mount is &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;.&lt;br /&gt;
   /usr/local/bin/mergerfs /local:/cloud /merge -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=auto-full,statfs_ignore=nc,func.getattr=newest,dropcacheonclose=true,nonempty&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2622</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2622"/>
		<updated>2020-12-04T15:56:03Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Rclone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
To install Rclone, run the following command:&lt;br /&gt;
  curl https://rclone.org/install.sh | sudo bash&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergerfs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2621</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2621"/>
		<updated>2020-12-04T15:53:01Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* mergerfs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== Mergerfs ===&lt;br /&gt;
Mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergerfs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2620</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2620"/>
		<updated>2020-12-04T15:51:06Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Application Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive''' - Download to a local disk and move the data later w/ Rclone&lt;br /&gt;
* '''Don't import to your Gdrive''' - Set up a merged local cache disk and move the data later w/ Rclone&lt;br /&gt;
* '''Do all large writes locally'''&lt;br /&gt;
* '''Move to cloud on a schedule''' - Easily scriptable&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== mergerfs ===&lt;br /&gt;
mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergerfs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2617</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2617"/>
		<updated>2020-12-04T05:55:35Z</updated>

		<summary type="html">&lt;p&gt;Logvin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergerfs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== mergerfs ===&lt;br /&gt;
mergerfs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergerfs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergerfs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2616</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2616"/>
		<updated>2020-12-04T05:54:32Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Rclone Mergerfs and Google Drive */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone, Mergerfs, and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
With many options for storing 'unlimited' data in the cloud, configuring your system to allow your Arr's and media serving apps to access the data securely is possible.  For this guide we will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service. We will also use a utility called Mergerfs to help keep our uploads organized.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Please Note: To get unlimited storage with Google Drive, you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergefs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== mergefs ===&lt;br /&gt;
mergefs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergefs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergefs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergefs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2615</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2615"/>
		<updated>2020-12-04T05:49:28Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Rclone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergefs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Verify Directory Permissions =====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
=== mergefs ===&lt;br /&gt;
mergefs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergefs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergefs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergefs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2614</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2614"/>
		<updated>2020-12-04T05:47:50Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Rclone Linux Autostart using Systemd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergefs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
===== Enabling and starting the Unit Service File =====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable Rclone.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start Rclone. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start Rclone.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify Rclone is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status rclone.service &lt;br /&gt;
  ● rclone.service - Google Drive Encrypted (rclone)&lt;br /&gt;
       Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: enabled)&lt;br /&gt;
       Active: active (running) since Sun 2020-11-15 16:28:26 MST; 2 weeks 4 days ago&lt;br /&gt;
     Main PID: 2392484 (rclone)&lt;br /&gt;
        Tasks: 31 (limit: 76935)&lt;br /&gt;
       Memory: 21.9G&lt;br /&gt;
       CGroup: /system.slice/rclone.service&lt;br /&gt;
               └─2392484 /usr/bin/rclone mount cloud: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h &amp;gt;&lt;br /&gt;
  Nov 15 16:28:25 systemname systemd[1]: Starting Google Drive Encrypted (rclone)...&lt;br /&gt;
  Nov 15 16:28:26 systemname systemd[1]: Started Google Drive Encrypted (rclone).&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
=== mergefs ===&lt;br /&gt;
mergefs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergefs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergefs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergefs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2613</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2613"/>
		<updated>2020-12-04T05:40:28Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* mergefs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergefs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
=== mergefs ===&lt;br /&gt;
mergefs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;mergefs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergefs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergefs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2612</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2612"/>
		<updated>2020-12-04T05:35:44Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Encrypting your Cloud Storage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergefs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
&lt;br /&gt;
The next few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
=== mergefs ===&lt;br /&gt;
mergefs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/cloud&amp;gt;, &amp;lt;code&amp;gt;mergefs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergefs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergefs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2611</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2611"/>
		<updated>2020-12-04T05:33:08Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Rclone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergefs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Encrypting your Cloud Storage ====&lt;br /&gt;
If you followed the previous steps, you created an unencrypted Google Drive mount. If you would like to encrypt your storage so that Google can not scan your files (good idea!), then follows these optional steps:&lt;br /&gt;
&lt;br /&gt;
Start by running Rclone's config tool again, as you did previously:&lt;br /&gt;
  rclone config&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloudcrypt &amp;lt;/code&amp;gt; - Name of your new encrypted remote &lt;br /&gt;
# &amp;lt;code&amp;gt; crypt &amp;lt;/code&amp;gt; - Encrypt/Decrypt a remote&lt;br /&gt;
# &amp;lt;code&amp;gt; cloud:crypt &amp;lt;/code&amp;gt; - Remote to encrypt/decrypt, followed by a semicolon and a name indicating the function.&lt;br /&gt;
# &amp;lt;code&amp;gt; standard &amp;lt;/code&amp;gt; - How to encrypt the filenames.&lt;br /&gt;
# &amp;lt;code&amp;gt; true &amp;lt;/code&amp;gt; - Encrypt directory names&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
&lt;br /&gt;
The new few questions will ask you to create two passwords, one  for the encryption and one for the salt. It is recommended to choose two different passwords, and for the best protection, allow them to be generated for you and document them somewhere safe.&lt;br /&gt;
&lt;br /&gt;
Once the password section is finished, it should present you with the new config, which should look similar to this:&lt;br /&gt;
  [cloudcrypt]&lt;br /&gt;
  type = crypt&lt;br /&gt;
  remote = cloud:crypt&lt;br /&gt;
  filename_encryption = standard&lt;br /&gt;
  directory_name_encryption = true&lt;br /&gt;
  password = **Encrypted PW1**&lt;br /&gt;
  password2 = **Encrypted PW2**&lt;br /&gt;
&lt;br /&gt;
Finally, make sure when you run rclone (either manually or via autostart script), you mount &amp;lt;code&amp;gt;cloudcrypt&amp;lt;/code&amp;gt; rather than calling &amp;lt;code&amp;gt;cloud&amp;lt;/cloud&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount cloud: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
=== mergefs ===&lt;br /&gt;
mergefs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/cloud&amp;gt;, &amp;lt;code&amp;gt;mergefs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergefs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergefs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2610</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2610"/>
		<updated>2020-12-04T05:10:58Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Setting up Rclone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergefs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=full --vfs-cache-max-age=6h --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessible by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount gdrive: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== mergefs ===&lt;br /&gt;
mergefs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/cloud&amp;gt;, &amp;lt;code&amp;gt;mergefs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergefs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergefs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2609</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2609"/>
		<updated>2020-12-04T05:09:01Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Rclone */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergefs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud. More Rclone information can be found on [https://github.com/animosity22/homescripts animosity22's Github page.]&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=writes --vfs-read-chunk-size-limit=off --vfs-cache-max-age=6h --vfs-read-chunk-size=128M --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessable by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount gdrive: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== mergefs ===&lt;br /&gt;
mergefs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/cloud&amp;gt;, &amp;lt;code&amp;gt;mergefs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergefs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergefs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2608</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2608"/>
		<updated>2020-12-04T05:07:56Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Preparing the Unit Service File */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergefs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=writes --vfs-read-chunk-size-limit=off --vfs-cache-max-age=6h --vfs-read-chunk-size=128M --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessable by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt; Feel free to remove the &amp;lt;code&amp;gt;# comment&amp;lt;/code&amp;gt; lines, they are there for those who want to know what those flags are doing and were taken from the rclone documentation.&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount gdrive: /cloud \&lt;br /&gt;
  # Allow mounting over a non-empty directory (not Windows).&lt;br /&gt;
  --allow-non-empty \&lt;br /&gt;
  # In memory buffer size when reading files for each --transfer. (default 16M)&lt;br /&gt;
  --buffer-size=128M \&lt;br /&gt;
  # Use mmap allocator (see docs).&lt;br /&gt;
  --use-mmap \&lt;br /&gt;
  # Time to cache directory entries for. (default 5m0s)&lt;br /&gt;
  --dir-cache-time=48h \&lt;br /&gt;
  # How long to cache file structure information (directory listings, file size, times etc). (default 6h0m0s)&lt;br /&gt;
  --cache-info-age=48h \&lt;br /&gt;
  # Cache mode off|minimal|writes|full (default off)&lt;br /&gt;
  --vfs-cache-mode=full \&lt;br /&gt;
  # Max age of objects in the cache. (default 1h0m0s)&lt;br /&gt;
  --vfs-cache-max-age=6h \&lt;br /&gt;
  # Override the permission bits set by the filesystem.&lt;br /&gt;
  --umask 002 \&lt;br /&gt;
  # Location where rclone logs will be stored&lt;br /&gt;
  --log-file=~/.config/rclone/logs/rclone.log \&lt;br /&gt;
  # Logging level for rclone logs&lt;br /&gt;
  --log-level INFO \&lt;br /&gt;
  # Location where the rclone.conf file is located&lt;br /&gt;
  --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== mergefs ===&lt;br /&gt;
mergefs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/cloud&amp;gt;, &amp;lt;code&amp;gt;mergefs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergefs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergefs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2603</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2603"/>
		<updated>2020-12-03T22:04:08Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Overview */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Application Overview ==&lt;br /&gt;
&lt;br /&gt;
Recommendations:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
&lt;br /&gt;
To connect with your Gdrive, you will need to use two applications:&lt;br /&gt;
# Rclone - https://rclone.org/install/&lt;br /&gt;
# mergefs - https://github.com/trapexit/mergerfs&lt;br /&gt;
&lt;br /&gt;
=== Rclone ===&lt;br /&gt;
Rclone's core purpose for the Arr's is to allow access to your data depository that is located in Gdrive. Rclone will mount and serve your file automatically, with your apps not knowing they are accessing data in the cloud.&lt;br /&gt;
&lt;br /&gt;
==== Setting up Rclone ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=writes --vfs-read-chunk-size-limit=off --vfs-cache-max-age=6h --vfs-read-chunk-size=128M --log-file=~/.config/rclone/logs/rclone.log --log-level INFO cloud: /cloud &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you executed &amp;lt;code&amp;gt;rclone config&amp;lt;/code&amp;gt; above, it created a file &amp;lt;code&amp;gt;rclone.conf&amp;lt;/code&amp;gt; and placed it at &amp;lt;code&amp;gt;~/.config/rclone.conf&amp;lt;/code&amp;gt;. If you intend to have your OS auto-mount your new rclone mount using systemd, ensure this file is accessable by the user you have in your .conf file.&lt;br /&gt;
&lt;br /&gt;
==== Rclone Linux Autostart using Systemd ====&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory. &lt;br /&gt;
===== Preparing the Unit Service File =====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that Rclone will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that Rclone will run as.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;Rclone.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;, Rclone's executable is placed in &amp;lt;code&amp;gt;/usr/bin/&amp;lt;/code&amp;gt;, your cloud storage is being mounted to &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt;, and you have previously ran Rclone and set up a config file, which is located at &amp;lt;code&amp;gt;~/.config/rclone/rclone.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  [Unit]&lt;br /&gt;
  Description=Google Drive Encrypted (rclone)&lt;br /&gt;
  Wants=network-online.target&lt;br /&gt;
  After=network-online.target&lt;br /&gt;
  &lt;br /&gt;
  [Service]&lt;br /&gt;
  Type=notify&lt;br /&gt;
  ExecStart=/usr/bin/rclone mount gdrive: /cloud --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=writes --vfs-read-chunk-size-limit=off --vfs-cache-max-age=6h --vfs-read-chunk-size=128M --log-file=~/.config/rclone/logs/rclone.log --log-level INFO --config ~/.config/rclone/rclone.conf&lt;br /&gt;
  ExecStop=/bin/fusermount -uz /cloud&lt;br /&gt;
  Restart=on-abort&lt;br /&gt;
  User=plex&lt;br /&gt;
  KillMode=none&lt;br /&gt;
  RestartSec=5&lt;br /&gt;
  &lt;br /&gt;
  [Install]&lt;br /&gt;
  WantedBy=default.target&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running Rclone has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder. In the example below, the user and group are both &amp;lt;code&amp;gt;plex&amp;lt;/code&amp;gt;.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /cloud&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /cloud&lt;br /&gt;
 $ ls -lad /home/plex/.config/rclone/&lt;br /&gt;
 drwxr-xr-x 6 plex plex 24576 Nov 28 21:30 /home/plex/.config/rclone/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== mergefs ===&lt;br /&gt;
mergefs core purpose for the Arr's is to allow you to have a single merged directory structure, based on two different directories. For example, if you used rclone to mount a directory named &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; and you have a locally mounted directory named &amp;lt;code&amp;gt;/local&amp;lt;/cloud&amp;gt;, &amp;lt;code&amp;gt;mergefs&amp;lt;/code&amp;gt; would create a single merged directory of those two, which you could call &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt;. Your media server and Arrs would access &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; and see the combination of local + cloud storage.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
You have the first 4 episodes of 'Popular TV Show' located on your cloud drive, and Sonarr just downloaded and imported episode 5. If you looked in your cloud drive (/cloud), you would see:&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /cloud/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
If you looked in your local storage (/local) you would see:&lt;br /&gt;
  /local/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
And if you looked in the merged directory thanks to mergefs (/merge) you would see:&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E01.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E02.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E04.mkv&lt;br /&gt;
  /merge/TV Shows/Popular TV Show/S01E05.mkv&lt;br /&gt;
None of your applications know that these files have two different real file paths. All new files would always be written to your local HD, then you can use Rclone to sync them to the cloud later. When that sync is completed, its invisible to your apps so you do not need to worry about missing episodes or movies.&lt;br /&gt;
&lt;br /&gt;
==== Setting up mergefs ====&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2602</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2602"/>
		<updated>2020-12-03T21:01:45Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements. Some &amp;quot;arr&amp;quot; software supports repository based automatic installs, and some must be installed manually.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_linux_ubuntu_repository_installation}}&lt;br /&gt;
&lt;br /&gt;
====== Manual Install (Mono) ======&lt;br /&gt;
Manual Installs need to have dependencies installed first.&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
 wget --content-disposition '{{{ARRPackageFileMono}}}'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_linux_ubuntu_NetCore_manual_installation}}&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
==== Preparing the Unit Service File ====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
==== Enabling and starting the Unit Service File ====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
=== NGINX Reverse Proxy ===&lt;br /&gt;
A reverse proxy allows you to set up {{{ARRNAME}}} so you can access it from the web without using the port number. Rather than mydomain.com:{{{ARRPORT}}} you would use mydomain.com/{{{ARRNAME}}} instead.&lt;br /&gt;
&lt;br /&gt;
(Link to NGINX Install Wiki Page)&lt;br /&gt;
&lt;br /&gt;
Create a text file named {{{ARRNAME}}}.conf and place it in your default NGINX App directory, typically &amp;lt;code&amp;gt;/etc/nginx/conf.d/apps&amp;lt;/code&amp;gt;&lt;br /&gt;
                                                                              &lt;br /&gt;
  # {{{ARRNAME}}} Reverse Proxy&lt;br /&gt;
  # Be sure to set your Base-URL in {{{ARRNAME}}}&lt;br /&gt;
  location /{{{ARRNAME2}}} {&lt;br /&gt;
          proxy_pass http://127.0.0.1:{{{ARRPORT}}}/{{{ARRNAME2}}};&lt;br /&gt;
          proxy_set_header X-Real-IP $remote_addr;&lt;br /&gt;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
          proxy_set_header X-Forwarded-Proto $scheme;&lt;br /&gt;
          proxy_http_version 1.1;&lt;br /&gt;
          proxy_no_cache $cookie_session;&lt;br /&gt;
          proxy_set_header Upgrade $http_upgrade;&lt;br /&gt;
          proxy_set_header Connection $http_connection;&lt;br /&gt;
          # Allow the {{{ARRNAME}}} API&lt;br /&gt;
          location /{{{ARRNAME2}}}/api { auth_request off;&lt;br /&gt;
                  proxy_pass http://127.0.0.1:{{{ARRPORT}}}/{{{ARRNAME2}}}/api;&lt;br /&gt;
          }&lt;br /&gt;
  }&lt;br /&gt;
Please note: It is important to ensure that the line &amp;lt;code&amp;gt;proxy_set_header Connection $http_connection;&amp;lt;/code&amp;gt; is accurate. The NGINX documentation recommends setting this to &amp;lt;code&amp;gt;Upgrade&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;$http_connection;&amp;lt;/code&amp;gt; but this will NOT work.&lt;br /&gt;
&lt;br /&gt;
Once you have saved the file, test your NGINX config:&lt;br /&gt;
  sudo nginx -t&lt;br /&gt;
Which should show this:&lt;br /&gt;
  nginx: the configuration file /etc/nginx/nginx.conf syntax is ok&lt;br /&gt;
  nginx: configuration file /etc/nginx/nginx.conf test is successful&lt;br /&gt;
Now you can have NGINX reload it's configuration to use the new file:&lt;br /&gt;
  sudo nginx -s reload&lt;br /&gt;
Finally, make sure you add your URL Base to {{{ARRNAME}}}. This should match what you have next to the word Location in the {{{ARRNAME}}}.conf file, with the leading slash, likely this: &amp;lt;code&amp;gt;/{{{ARRNAME2}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
The URL base can be set here: https://wiki.servarr.com/{{{ARRNAME}}}_Settings#Host&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2600</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2600"/>
		<updated>2020-12-02T19:17:10Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Increase the Default Cache Size of your Plex DB */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The rules are:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
=== Setting up Rclone ===&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; gdrive &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=writes --vfs-read-chunk-size-limit=off --vfs-cache-max-age=6h --vfs-read-chunk-size=128M --log-file=path/to/drivemount.log --log-level INFO gdrive: /path/to/cloudmount &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MergerFS Command ===&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
# Stop Plex &lt;br /&gt;
# Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
# Run this command: &amp;lt;code&amp;gt;sqlite3 com.plexapp.plugins.library.db&amp;lt;/code&amp;gt;&lt;br /&gt;
# The SQLLite prompt will open up. Type this next: &amp;lt;code&amp;gt;PRAGMA default_cache_size = 6000000;&amp;lt;/code&amp;gt; and don't forget the trailing semicolon.&lt;br /&gt;
# There will be no confirmation that anything happened. Press CTRL + D to exit SqlLite.&lt;br /&gt;
# Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2599</id>
		<title>Cloud Setup</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Cloud_Setup&amp;diff=2599"/>
		<updated>2020-12-02T19:14:10Z</updated>

		<summary type="html">&lt;p&gt;Logvin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Rclone Mergerfs and Google Drive ==&lt;br /&gt;
&lt;br /&gt;
So you want to become a 'cloud pirate'?  You want to store your media in the cloud, but still be able to use the Arrs and Plex?  For this guide you will use [https://gsuite.google.com/products/drive/ Google Suite Unlimited Storage] or a similar [https://rclone.org/ Rclone] compatible storage service.&lt;br /&gt;
&lt;br /&gt;
Please note that this guide is for information only and you should only store legally obtained media.&lt;br /&gt;
&lt;br /&gt;
Additionally, to get unlimited storage you should have 5 users (as of writing $12*5 users = $60/mo).  If you have less users you ''technically'' do not have unlimited storage and Google may enforce said limits at any time.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
The rules are:&lt;br /&gt;
* '''Don't download into your Gdrive.'''&lt;br /&gt;
* '''Don't import to your Gdrive.'''&lt;br /&gt;
* '''Do all large writes locally.'''&lt;br /&gt;
* '''Move to cloud on a schedule.'''&lt;br /&gt;
* '''Absolutely do not write (large files) directly to the rclone mount&lt;br /&gt;
Instead, setup a &amp;lt;code&amp;gt;/merge&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;mergerfs&amp;lt;/code&amp;gt; that has some &amp;lt;code&amp;gt;/local&amp;lt;/code&amp;gt; storage where downloads and imports will live, merge that with your &amp;lt;code&amp;gt;/cloud&amp;lt;/code&amp;gt; rclone mount and use the mergerfs create [https://github.com/trapexit/mergerfs#policy-descriptions policy of &amp;lt;code&amp;gt;ff&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;epff&amp;lt;/code&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
=== Setting up Rclone ===&lt;br /&gt;
To get started with an Rclone Google Suite Team Drive Mount follow the below instructions.&lt;br /&gt;
&lt;br /&gt;
Making your own Google API Client ID&lt;br /&gt;
When you use rclone with Google drive in its default configuration you are using rclone's client_id. This is shared between all the rclone users. There is a global rate limit on the number of queries per second that each client_id can do set by Google. It is strongly recommended to use your own client ID as the default rclone ID is heavily used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Log into the Google API Console with your Google account. It doesn't matter what Google account you use. (It need not be the same account as the Google Drive you want to access)&lt;br /&gt;
&lt;br /&gt;
# Select a project or create a new project.&lt;br /&gt;
&lt;br /&gt;
# Under &amp;quot;ENABLE APIS AND SERVICES&amp;quot; search for &amp;quot;Drive&amp;quot;, and enable the &amp;quot;Google Drive API&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Click &amp;quot;Credentials&amp;quot; in the left-side panel (not &amp;quot;Create credentials&amp;quot;, which opens the wizard), then &amp;quot;Create credentials&amp;quot;&lt;br /&gt;
&lt;br /&gt;
# If you already configured an &amp;quot;Oauth Consent Screen&amp;quot;, then skip to the next step; if not, click on &amp;quot;CONFIGURE CONSENT SCREEN&amp;quot; button (near the top right corner of the right panel), then select &amp;quot;External&amp;quot; and click on &amp;quot;CREATE&amp;quot;; on the next screen, enter an &amp;quot;Application name&amp;quot; (&amp;quot;rclone&amp;quot; is OK) then click on &amp;quot;Save&amp;quot; (all other data is optional). Click again on &amp;quot;Credentials&amp;quot; on the left panel to go back to the &amp;quot;Credentials&amp;quot; screen.&lt;br /&gt;
&lt;br /&gt;
# Click on the &amp;quot;+ CREATE CREDENTIALS&amp;quot; button at the top of the screen, then select &amp;quot;OAuth client ID&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Choose an application type of &amp;quot;Desktop app&amp;quot; if you using a Google account or &amp;quot;Other&amp;quot; if you using a GSuite account and click &amp;quot;Create&amp;quot;. (the default name is fine)&lt;br /&gt;
&lt;br /&gt;
# It will show you a client ID and client secret. Write or copy these values down. Use these values in rclone config to add a new remote or edit an existing remote.&lt;br /&gt;
&lt;br /&gt;
 Setup your Google Service Account (SA) file this allows it to not be tied to a single user account.&lt;br /&gt;
# go to the Google Developer Console.&lt;br /&gt;
&lt;br /&gt;
# go to &amp;quot;IAM &amp;amp; admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Use the &amp;quot;Create Credentials&amp;quot; button. Fill in &amp;quot;Service account name&amp;quot; with something that identifies your client. e.g. &amp;lt;code&amp;gt; mount &amp;lt;/code&amp;gt; Leave &amp;quot;Role&amp;quot; Empty&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Furnish a new private key&amp;quot; - select &amp;quot;Key type JSON&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
# Tick &amp;quot;Enable G Suite Domain-wide Delegation&amp;quot;. These credentials are what rclone will use for authentication. If you ever need to remove access, press the &amp;quot;Delete service account key&amp;quot; button.&lt;br /&gt;
&lt;br /&gt;
Allow API access to Google Drive&lt;br /&gt;
# go to admin console&lt;br /&gt;
# Go into &amp;quot;Security&amp;quot; (or use the search bar)&lt;br /&gt;
# Select &amp;quot;Show more&amp;quot; and then &amp;quot;Advanced settings&amp;quot;&lt;br /&gt;
# Select &amp;quot;Manage API client access&amp;quot; in the &amp;quot;Authentication&amp;quot; section&lt;br /&gt;
# In the &amp;quot;Client Name&amp;quot; field enter the service account's &amp;quot;Client ID&amp;quot; - this can be found in the Developer Console under &amp;quot;IAM &amp;amp; Admin&amp;quot; -&amp;gt; &amp;quot;Service Accounts&amp;quot;, then &amp;quot;View Client ID&amp;quot; for the newly created service account. It is a ~21 character numerical string.&lt;br /&gt;
# In the next field, &amp;quot;One or More API Scopes&amp;quot;, enter https://www.googleapis.com/auth/drive to grant access to Google Drive specifically.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; rclone config &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - New Remote&lt;br /&gt;
# Enter a name for your mount e.g. &amp;lt;code&amp;gt; gdrive &amp;lt;/code&amp;gt;&lt;br /&gt;
# &amp;lt;code&amp;gt; 13 &amp;lt;/code&amp;gt; - Google Drive&lt;br /&gt;
# Enter your Google Application Client Id&lt;br /&gt;
# Enter your Google Application Client Secret&lt;br /&gt;
# &amp;lt;code&amp;gt; 1 &amp;lt;/code&amp;gt; - Full Access&lt;br /&gt;
# Leave Blank ID of the root folder &lt;br /&gt;
# enter the path and filename to your Google Drive SA Json&lt;br /&gt;
# &amp;lt;code&amp;gt; n &amp;lt;/code&amp;gt; - Do Not Use Auto Config&lt;br /&gt;
# &amp;lt;code&amp;gt; y &amp;lt;/code&amp;gt; - use team drive&lt;br /&gt;
# Review for Accuracy&lt;br /&gt;
# mount the drive using &amp;lt;Code&amp;gt;rclone mount --daemon --daemon-timeout=5m --allow-non-empty --buffer-size=128M --use-mmap --dir-cache-time=48h --cache-info-age=48h --vfs-cache-mode=writes --vfs-read-chunk-size-limit=off --vfs-cache-max-age=6h --vfs-read-chunk-size=128M --log-file=path/to/drivemount.log --log-level INFO gdrive: /path/to/cloudmount &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== MergerFS Command ===&lt;br /&gt;
&amp;lt;code&amp;gt; /home/{user}/local:/home/{user}/cloud=NC /home/{user}/merge -o rw,async_read=false,statfs_ignore=nc,use_ino,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true,nonempty &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setup ==&lt;br /&gt;
Set your download client to download to say &amp;lt;code&amp;gt; /merge/usenet/{tv|movies} &amp;lt;/code&amp;gt; and your library to say &amp;lt;code&amp;gt;/merge/media/{TV|Movies}&amp;lt;/code&amp;gt;. &lt;br /&gt;
Then what happens is the download is local, the import is local. And it all looks like it is in the same place. &lt;br /&gt;
In the background, you have a cron or systemd timer that does rsync move from your local storage to your cloud storage. &lt;br /&gt;
You can rotate service accounts if needed. &lt;br /&gt;
It is also way more efficient at uploading vs. just the rclone mount. &lt;br /&gt;
&lt;br /&gt;
The cloud mount allows sonarr/radarr to delete, rename and read stuff, but big writes don't need to go right to cloud. &lt;br /&gt;
&lt;br /&gt;
If you do get rate limited, it won't impact your imports because they're all local.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/local/media/{tv|movies}&amp;lt;/code&amp;gt; //this is where ARR imports to.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;/local/{usenet|torrents}/{tv/movies}&amp;lt;/code&amp;gt; // this is where downloads should be dropped to&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/cloud/&amp;lt;/code&amp;gt; //this is your rclone crypt mount (if going crypt) or GDrive Mount /cloud/media //this is your media folder in Gdrive&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/&amp;lt;/code&amp;gt; //is /cloud merged into /local/ using mergerfs&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;/merge/media/{tv|movies}&amp;lt;/code&amp;gt; //point plex and ARRs here as library/root folder&lt;br /&gt;
&lt;br /&gt;
and setup remote path in ARR to say remote /local/ is the same as remote /merge/&lt;br /&gt;
&lt;br /&gt;
Files will be downloaded into local and then imported into /local/media/ on a scheduled basis an rclone job would be created to move from local to gdrive so they will then automatically appear in cloud and it'll be like they never left merge&lt;br /&gt;
&lt;br /&gt;
== Recommended Plex Server Changes ==&lt;br /&gt;
=== Increase the Default Cache Size of your Plex DB ===&lt;br /&gt;
With unlimited storage, some servers may run into database locking/timeout issues. Increasing the default cache size could help alleviate this.&lt;br /&gt;
&lt;br /&gt;
1. Stop Plex &lt;br /&gt;
2. Locate your Plex DB. cd plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases &lt;br /&gt;
3. sqlite3 com.plexapp.plugins.library.db&lt;br /&gt;
PRAGMA default_cache_size = 6000000;&lt;br /&gt;
Press CTRL + D&lt;br /&gt;
4. Start Plex.&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2598</id>
		<title>Installation Misc</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2598"/>
		<updated>2020-12-02T18:38:48Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Manual Install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
=== Radarr ===&lt;br /&gt;
&amp;lt;section begin=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the Radarr download page, and pick the appropriate file: https://github.com/Radarr/Radarr/releases&lt;br /&gt;
&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: (Note: The link below will target the Linux .NET Core x64 file. Replace if needed with the file you chose previously)&lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf Radarr*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/Radarr/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv Radarr/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown radarr:radarr /opt/Radarr&lt;br /&gt;
&lt;br /&gt;
You can start Radarr with the following command:&lt;br /&gt;
 /opt/Radarr/Radarr -nobrowser&lt;br /&gt;
&amp;lt;section end=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sonarr ===&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
====== Repository Install (Mono) ======&lt;br /&gt;
Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
Add the Sonarr Repository:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
Update and install: &lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Big Sur====&lt;br /&gt;
&amp;lt;section begin=sonarr_osx_big_sur_installation /&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After downloading Sonarr V3 from [https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=macos&amp;amp;installer=true here]The &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt; file will be located in your downloads directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After the downlaod has finished you'll need to unzip the file from there you'll have a '''Sonarr.app''' in your downloads folder simply move the '''Sonarr.app''' to your Applications directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:Move-sonarr-to-applications.gif|center|frameless|750x750px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; From there if you go to your launch pad you'll notice that Sonarr is now in there, double click on Sonarr&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; You'll probably get a pop up that says &amp;quot;Sonarr.app&amp;quot; cannot be opened because the developer cannot be verified.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; Dont fret we can get this fixed.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click on System Preferences in your dock&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click Security and Privacy&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click '''Open Anyways'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; You'll get a pop up that looks something like this:&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified2.png|none|framless|250px]]&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Open &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now since Sonarr uses the Mono Framework Version 5.20 or later if you do not already have that installed you'll recieve a pop up like this&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-cannot-launch-sonarr-mono.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Note: If Mono is already installed skip these steps&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Download &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Safari (or default browser) will now open up to [https://www.mono-project.com/download/stable/#download-mac the Mono Project] for macOS. Click '''Download mono (Stable channel)'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Once the download is complete go to your downloads folder and click the new pkg file that was downloaded and install it&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; After installation is complete go back and reopen Sonarr &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now browse to &amp;lt;code&amp;gt;http://localhost:8989&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
Now you're all set Sonarr is now up and running on your system Have fun&lt;br /&gt;
&amp;lt;section end=sonarr_osx_big_sur_installation /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2597</id>
		<title>Installation Misc</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2597"/>
		<updated>2020-12-02T18:38:12Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Radarr */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
=== Radarr ===&lt;br /&gt;
&amp;lt;section begin=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the Radarr download page, and pick the appropriate file: https://github.com/Radarr/Radarr/releases&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: (Note: The link below will target the Linux .NET Core x64 file. Replace if needed with the file you chose previously)&lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf Radarr*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/Radarr/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv Radarr/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown radarr:radarr /opt/Radarr&lt;br /&gt;
&lt;br /&gt;
You can start Radarr with the following command:&lt;br /&gt;
 /opt/Radarr/Radarr -nobrowser&lt;br /&gt;
&amp;lt;section end=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sonarr ===&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
====== Repository Install (Mono) ======&lt;br /&gt;
Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
Add the Sonarr Repository:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
Update and install: &lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Big Sur====&lt;br /&gt;
&amp;lt;section begin=sonarr_osx_big_sur_installation /&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After downloading Sonarr V3 from [https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=macos&amp;amp;installer=true here]The &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt; file will be located in your downloads directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After the downlaod has finished you'll need to unzip the file from there you'll have a '''Sonarr.app''' in your downloads folder simply move the '''Sonarr.app''' to your Applications directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:Move-sonarr-to-applications.gif|center|frameless|750x750px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; From there if you go to your launch pad you'll notice that Sonarr is now in there, double click on Sonarr&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; You'll probably get a pop up that says &amp;quot;Sonarr.app&amp;quot; cannot be opened because the developer cannot be verified.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; Dont fret we can get this fixed.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click on System Preferences in your dock&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click Security and Privacy&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click '''Open Anyways'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; You'll get a pop up that looks something like this:&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified2.png|none|framless|250px]]&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Open &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now since Sonarr uses the Mono Framework Version 5.20 or later if you do not already have that installed you'll recieve a pop up like this&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-cannot-launch-sonarr-mono.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Note: If Mono is already installed skip these steps&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Download &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Safari (or default browser) will now open up to [https://www.mono-project.com/download/stable/#download-mac the Mono Project] for macOS. Click '''Download mono (Stable channel)'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Once the download is complete go to your downloads folder and click the new pkg file that was downloaded and install it&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; After installation is complete go back and reopen Sonarr &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now browse to &amp;lt;code&amp;gt;http://localhost:8989&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
Now you're all set Sonarr is now up and running on your system Have fun&lt;br /&gt;
&amp;lt;section end=sonarr_osx_big_sur_installation /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2596</id>
		<title>Installation Misc</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2596"/>
		<updated>2020-12-02T18:33:16Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
=== Radarr ===&lt;br /&gt;
&amp;lt;section begin=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file: {{{ArrDownloadLink}}}&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&amp;lt;section end=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Sonarr ===&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
====== Repository Install (Mono) ======&lt;br /&gt;
Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
Add the Sonarr Repository:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
Update and install: &lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Big Sur====&lt;br /&gt;
&amp;lt;section begin=sonarr_osx_big_sur_installation /&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After downloading Sonarr V3 from [https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=macos&amp;amp;installer=true here]The &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt; file will be located in your downloads directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After the downlaod has finished you'll need to unzip the file from there you'll have a '''Sonarr.app''' in your downloads folder simply move the '''Sonarr.app''' to your Applications directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:Move-sonarr-to-applications.gif|center|frameless|750x750px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; From there if you go to your launch pad you'll notice that Sonarr is now in there, double click on Sonarr&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; You'll probably get a pop up that says &amp;quot;Sonarr.app&amp;quot; cannot be opened because the developer cannot be verified.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; Dont fret we can get this fixed.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click on System Preferences in your dock&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click Security and Privacy&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click '''Open Anyways'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; You'll get a pop up that looks something like this:&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified2.png|none|framless|250px]]&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Open &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now since Sonarr uses the Mono Framework Version 5.20 or later if you do not already have that installed you'll recieve a pop up like this&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-cannot-launch-sonarr-mono.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Note: If Mono is already installed skip these steps&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Download &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Safari (or default browser) will now open up to [https://www.mono-project.com/download/stable/#download-mac the Mono Project] for macOS. Click '''Download mono (Stable channel)'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Once the download is complete go to your downloads folder and click the new pkg file that was downloaded and install it&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; After installation is complete go back and reopen Sonarr &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now browse to &amp;lt;code&amp;gt;http://localhost:8989&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
Now you're all set Sonarr is now up and running on your system Have fun&lt;br /&gt;
&amp;lt;section end=sonarr_osx_big_sur_installation /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2595</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2595"/>
		<updated>2020-12-02T18:28:43Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Debian / Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements. Some &amp;quot;arr&amp;quot; software supports repository based automatic installs, and some must be installed manually.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_linux_ubuntu_repository_installation}}&lt;br /&gt;
&lt;br /&gt;
====== Manual Install (Mono) ======&lt;br /&gt;
Manual Installs need to have dependencies installed first.&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
 wget --content-disposition '{{{ARRPackageFileMono}}}'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_linux_ubuntu_NetCore_manual_installation}}&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
==== Preparing the Unit Service File ====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
==== Enabling and starting the Unit Service File ====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2594</id>
		<title>Installation Misc</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2594"/>
		<updated>2020-12-02T18:25:55Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
=== Radarr ===&lt;br /&gt;
&amp;lt;section begin=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file: {{{ArrDownloadLink}}}&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&amp;lt;section end=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
=== Sonarr ===&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
====== Repository Install ======&lt;br /&gt;
Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
Add the Sonarr Repository:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
Update and install: &lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Big Sur====&lt;br /&gt;
&amp;lt;section begin=sonarr_osx_big_sur_installation /&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After downloading Sonarr V3 from [https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=macos&amp;amp;installer=true here]The &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt; file will be located in your downloads directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After the downlaod has finished you'll need to unzip the file from there you'll have a '''Sonarr.app''' in your downloads folder simply move the '''Sonarr.app''' to your Applications directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:Move-sonarr-to-applications.gif|center|frameless|750x750px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; From there if you go to your launch pad you'll notice that Sonarr is now in there, double click on Sonarr&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; You'll probably get a pop up that says &amp;quot;Sonarr.app&amp;quot; cannot be opened because the developer cannot be verified.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; Dont fret we can get this fixed.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click on System Preferences in your dock&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click Security and Privacy&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click '''Open Anyways'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; You'll get a pop up that looks something like this:&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified2.png|none|framless|250px]]&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Open &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now since Sonarr uses the Mono Framework Version 5.20 or later if you do not already have that installed you'll recieve a pop up like this&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-cannot-launch-sonarr-mono.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Note: If Mono is already installed skip these steps&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Download &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Safari (or default browser) will now open up to [https://www.mono-project.com/download/stable/#download-mac the Mono Project] for macOS. Click '''Download mono (Stable channel)'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Once the download is complete go to your downloads folder and click the new pkg file that was downloaded and install it&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; After installation is complete go back and reopen Sonarr &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now browse to &amp;lt;code&amp;gt;http://localhost:8989&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
Now you're all set Sonarr is now up and running on your system Have fun&lt;br /&gt;
&amp;lt;section end=sonarr_osx_big_sur_installation /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2593</id>
		<title>Installation Misc</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2593"/>
		<updated>2020-12-02T18:25:12Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
=== Radarr ===&lt;br /&gt;
&amp;lt;section begin=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file: {{{ArrDownloadLink}}}&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&amp;lt;section end=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
=== Sonarr ===&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
====== Repository Install ======&lt;br /&gt;
Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
Add the Sonarr Repository:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
Update and install: &lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
Sonarr does not currently support NetCore.&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
====Big Sur====&lt;br /&gt;
&amp;lt;section begin=sonarr_osx_big_sur_installation /&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After downloading Sonarr V3 from [https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=macos&amp;amp;installer=true here]The &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt; file will be located in your downloads directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After the downlaod has finished you'll need to unzip the file from there you'll have a '''Sonarr.app''' in your downloads folder simply move the '''Sonarr.app''' to your Applications directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:Move-sonarr-to-applications.gif|center|frameless|750x750px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; From there if you go to your launch pad you'll notice that Sonarr is now in there, double click on Sonarr&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; You'll probably get a pop up that says &amp;quot;Sonarr.app&amp;quot; cannot be opened because the developer cannot be verified.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; Dont fret we can get this fixed.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click on System Preferences in your dock&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click Security and Privacy&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click '''Open Anyways'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; You'll get a pop up that looks something like this:&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified2.png|none|framless|250px]]&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Open &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now since Sonarr uses the Mono Framework Version 5.20 or later if you do not already have that installed you'll recieve a pop up like this&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-cannot-launch-sonarr-mono.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Note: If Mono is already installed skip these steps&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Download &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Safari (or default browser) will now open up to [https://www.mono-project.com/download/stable/#download-mac the Mono Project] for macOS. Click '''Download mono (Stable channel)'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Once the download is complete go to your downloads folder and click the new pkg file that was downloaded and install it&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; After installation is complete go back and reopen Sonarr &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now browse to &amp;lt;code&amp;gt;http://localhost:8989&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
Now you're all set Sonarr is now up and running on your system Have fun&lt;br /&gt;
&amp;lt;section end=sonarr_osx_big_sur_installation /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2592</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2592"/>
		<updated>2020-12-02T18:23:37Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements. Some &amp;quot;arr&amp;quot; software supports repository based automatic installs, and some must be installed manually.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_linux_ubuntu_repository_installation}}&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Manual Installs need to have dependencies installed first.&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
 wget --content-disposition '{{{ARRPackageFileMono}}}'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_linux_ubuntu_NetCore_manual_installation}}&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
==== Preparing the Unit Service File ====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
==== Enabling and starting the Unit Service File ====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2591</id>
		<title>Installation Misc</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2591"/>
		<updated>2020-12-02T18:23:31Z</updated>

		<summary type="html">&lt;p&gt;Logvin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
=== Radarr ===&lt;br /&gt;
&amp;lt;section begin=radarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
Radarr does not currently support repository installation.&lt;br /&gt;
&amp;lt;section end=radarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
&amp;lt;section begin=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file: {{{ArrDownloadLink}}}&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&amp;lt;section end=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
=== Sonarr ===&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
====== Repository Install ======&lt;br /&gt;
Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
Add the Sonarr Repository:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
Update and install: &lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
Sonarr does not currently support NetCore.&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
====Big Sur====&lt;br /&gt;
&amp;lt;section begin=sonarr_osx_big_sur_installation /&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After downloading Sonarr V3 from [https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=macos&amp;amp;installer=true here]The &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt; file will be located in your downloads directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After the downlaod has finished you'll need to unzip the file from there you'll have a '''Sonarr.app''' in your downloads folder simply move the '''Sonarr.app''' to your Applications directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:Move-sonarr-to-applications.gif|center|frameless|750x750px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; From there if you go to your launch pad you'll notice that Sonarr is now in there, double click on Sonarr&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; You'll probably get a pop up that says &amp;quot;Sonarr.app&amp;quot; cannot be opened because the developer cannot be verified.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; Dont fret we can get this fixed.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click on System Preferences in your dock&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click Security and Privacy&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click '''Open Anyways'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; You'll get a pop up that looks something like this:&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified2.png|none|framless|250px]]&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Open &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now since Sonarr uses the Mono Framework Version 5.20 or later if you do not already have that installed you'll recieve a pop up like this&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-cannot-launch-sonarr-mono.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Note: If Mono is already installed skip these steps&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Download &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Safari (or default browser) will now open up to [https://www.mono-project.com/download/stable/#download-mac the Mono Project] for macOS. Click '''Download mono (Stable channel)'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Once the download is complete go to your downloads folder and click the new pkg file that was downloaded and install it&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; After installation is complete go back and reopen Sonarr &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now browse to &amp;lt;code&amp;gt;http://localhost:8989&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
Now you're all set Sonarr is now up and running on your system Have fun&lt;br /&gt;
&amp;lt;section end=sonarr_osx_big_sur_installation /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2590</id>
		<title>Installation Misc</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2590"/>
		<updated>2020-12-02T18:21:16Z</updated>

		<summary type="html">&lt;p&gt;Logvin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
=== Radarr ===&lt;br /&gt;
&amp;lt;section begin=radarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
Radarr does not currently support repository installation.&lt;br /&gt;
&amp;lt;section end=radarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
&amp;lt;section begin=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file: {{{ArrDownloadLink}}}&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&amp;lt;section end=radarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
=== Sonarr ===&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
====== Repository Install ======&lt;br /&gt;
Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
Add the Sonarr Repository:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
Update and install: &lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
Sonarr does not currently support NetCore.&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_NetCore_manual_installation /&amp;gt;&lt;br /&gt;
====Big Sur====&lt;br /&gt;
&amp;lt;section begin=sonarr_osx_big_sur_installation /&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After downloading Sonarr V3 from [https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=macos&amp;amp;installer=true here]The &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt; file will be located in your downloads directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After the downlaod has finished you'll need to unzip the file from there you'll have a '''Sonarr.app''' in your downloads folder simply move the '''Sonarr.app''' to your Applications directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:Move-sonarr-to-applications.gif|center|frameless|750x750px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; From there if you go to your launch pad you'll notice that Sonarr is now in there, double click on Sonarr&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; You'll probably get a pop up that says &amp;quot;Sonarr.app&amp;quot; cannot be opened because the developer cannot be verified.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; Dont fret we can get this fixed.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click on System Preferences in your dock&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click Security and Privacy&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click '''Open Anyways'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; You'll get a pop up that looks something like this:&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified2.png|none|framless|250px]]&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Open &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now since Sonarr uses the Mono Framework Version 5.20 or later if you do not already have that installed you'll recieve a pop up like this&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-cannot-launch-sonarr-mono.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Note: If Mono is already installed skip these steps&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Download &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Safari (or default browser) will now open up to [https://www.mono-project.com/download/stable/#download-mac the Mono Project] for macOS. Click '''Download mono (Stable channel)'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Once the download is complete go to your downloads folder and click the new pkg file that was downloaded and install it&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; After installation is complete go back and reopen Sonarr &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now browse to &amp;lt;code&amp;gt;http://localhost:8989&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
Now you're all set Sonarr is now up and running on your system Have fun&lt;br /&gt;
&amp;lt;section end=sonarr_osx_big_sur_installation /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2589</id>
		<title>Installation Misc</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Installation_Misc&amp;diff=2589"/>
		<updated>2020-12-02T18:10:26Z</updated>

		<summary type="html">&lt;p&gt;Logvin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Installation ==&lt;br /&gt;
=== Radarr ===&lt;br /&gt;
&amp;lt;section begin=radarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
Radarr does not currently support repository installation.&lt;br /&gt;
&amp;lt;section end=radarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
=== Sonarr ===&lt;br /&gt;
&amp;lt;section begin=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
Add the Sonarr Repository:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
Update and install: &lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&amp;lt;section end=sonarr_linux_ubuntu_repository_installation /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Big Sur====&lt;br /&gt;
&amp;lt;section begin=sonarr_osx_big_sur_installation /&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After downloading Sonarr V3 from [https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=macos&amp;amp;installer=true here]The &amp;lt;code&amp;gt;zip&amp;lt;/code&amp;gt; file will be located in your downloads directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;After the downlaod has finished you'll need to unzip the file from there you'll have a '''Sonarr.app''' in your downloads folder simply move the '''Sonarr.app''' to your Applications directory.&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:Move-sonarr-to-applications.gif|center|frameless|750x750px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; From there if you go to your launch pad you'll notice that Sonarr is now in there, double click on Sonarr&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; You'll probably get a pop up that says &amp;quot;Sonarr.app&amp;quot; cannot be opened because the developer cannot be verified.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;li&amp;gt; Dont fret we can get this fixed.&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click on System Preferences in your dock&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Click Security and Privacy&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click '''Open Anyways'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; You'll get a pop up that looks something like this:&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-developer-cannot-be-verified2.png|none|framless|250px]]&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Open &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now since Sonarr uses the Mono Framework Version 5.20 or later if you do not already have that installed you'll recieve a pop up like this&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:sonarr-cannot-launch-sonarr-mono.png|none|frameless|250px]]&lt;br /&gt;
  &amp;lt;ul&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;Note: If Mono is already installed skip these steps&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ul&amp;gt;&lt;br /&gt;
  &amp;lt;ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Click Download &amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Safari (or default browser) will now open up to [https://www.mono-project.com/download/stable/#download-mac the Mono Project] for macOS. Click '''Download mono (Stable channel)'''&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; Once the download is complete go to your downloads folder and click the new pkg file that was downloaded and install it&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt; After installation is complete go back and reopen Sonarr &amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;/ol&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt; Now browse to &amp;lt;code&amp;gt;http://localhost:8989&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
Now you're all set Sonarr is now up and running on your system Have fun&lt;br /&gt;
&amp;lt;section end=sonarr_osx_big_sur_installation /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2588</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2588"/>
		<updated>2020-12-02T18:07:36Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Mono Install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
Some &amp;quot;arr&amp;quot; software supports repository based automatic installs, and some must be installed manually. &lt;br /&gt;
&lt;br /&gt;
====== Repository Install ======&lt;br /&gt;
Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_linux_ubuntu_repository_installation}}&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Manual Installs need to have dependencies installed first.&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
 wget --content-disposition '{{{ARRPackageFileMono}}}'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file. Note that only Radarr currently has a .NET Core install path right now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
{{{ArrDownloadLink}}}&lt;br /&gt;
&lt;br /&gt;
Radarr: &lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
==== Preparing the Unit Service File ====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
==== Enabling and starting the Unit Service File ====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2586</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2586"/>
		<updated>2020-12-02T17:39:25Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Manual Install */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
Some &amp;quot;arr&amp;quot; software supports repository based automatic installs, and some must be installed manually. Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
&lt;br /&gt;
====== Repository Install ======&lt;br /&gt;
&lt;br /&gt;
Sonarr:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
First start by installing the dependencies:&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
 wget --content-disposition '{{{ARRPackageFileMono}}}'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file. Note that only Radarr currently has a .NET Core install path right now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
{{{ArrDownloadLink}}}&lt;br /&gt;
&lt;br /&gt;
Radarr: &lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
==== Preparing the Unit Service File ====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
==== Enabling and starting the Unit Service File ====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2585</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2585"/>
		<updated>2020-12-02T17:33:14Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
Some &amp;quot;arr&amp;quot; software supports repository based automatic installs, and some must be installed manually. Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
&lt;br /&gt;
====== Repository Install ======&lt;br /&gt;
&lt;br /&gt;
Sonarr:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
First start by installing the dependencies:&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
 wget --content-disposition '{{{ARRPackageFileMono}}}'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file. Note that only Radarr currently has a .NET Core install path right now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
&lt;br /&gt;
Radarr: {{{ArrDownloadLink}}}&lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
==== Preparing the Unit Service File ====&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
==== Verify Directory Permissions ====&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
==== Enabling and starting the Unit Service File ====&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2584</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2584"/>
		<updated>2020-12-02T17:31:31Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Debian / Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
Some &amp;quot;arr&amp;quot; software supports repository based automatic installs, and some must be installed manually. Repository installs will typically automatically install needed dependencies.&lt;br /&gt;
&lt;br /&gt;
====== Repository Install ======&lt;br /&gt;
&lt;br /&gt;
Sonarr:&lt;br /&gt;
 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0xA236C58F409091A18ACA53CBEBFF6B99D9B78493&lt;br /&gt;
 echo &amp;quot;deb http://apt.sonarr.tv/ master main&amp;quot; | sudo tee /etc/apt/sources.list.d/sonarr.list&lt;br /&gt;
 sudo apt update&lt;br /&gt;
 sudo apt install nzbdrone &lt;br /&gt;
To start Sonarr, you need to call the mono executable:&lt;br /&gt;
 /usr/bin/mono --debug /opt/NzbDrone/NzbDrone.exe&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
First start by installing the dependencies:&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
 wget --content-disposition '{{{ARRPackageFileMono}}}'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file. Note that only Radarr currently has a .NET Core install path right now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
&lt;br /&gt;
Radarr: {{{ArrDownloadLink}}}&lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Unit Service File ===&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
=== Verify Directory Permissions ===&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
=== Enabling and starting the Unit Service File ===&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2583</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2583"/>
		<updated>2020-12-02T17:21:20Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Debian / Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
First start by installing the dependencies:&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
 wget --content-disposition '{{{ARRPackageFileMono}}}'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file. Note that only Radarr currently has a .NET Core install path right now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Choose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
&lt;br /&gt;
Radarr: {{{ArrDownloadLink}}}&lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Unit Service File ===&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
=== Verify Directory Permissions ===&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
=== Enabling and starting the Unit Service File ===&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2582</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2582"/>
		<updated>2020-12-02T17:16:32Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Debian / Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
First start by installing the dependencies:&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Radarr: https://api.github.com/repos/Radarr/Radarr/releases&lt;br /&gt;
 wget --content-disposition '{{{ARRPackageFileMono}}}'&lt;br /&gt;
Sonarr: https://sonarr.tv/#download&lt;br /&gt;
 wget --content-disposition 'https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=linux'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file.&lt;br /&gt;
{{{ArrDownloadLink}}}&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Chose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
&lt;br /&gt;
Radarr: https://api.github.com/repos/Radarr/Radarr/releases&lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Unit Service File ===&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
=== Verify Directory Permissions ===&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
=== Enabling and starting the Unit Service File ===&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2560</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2560"/>
		<updated>2020-12-01T23:10:11Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Debian / Ubuntu */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
First start by installing the dependencies:&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
{{{ARRPackageFileMono}}}&lt;br /&gt;
&lt;br /&gt;
Radarr: https://api.github.com/repos/Radarr/Radarr/releases&lt;br /&gt;
 wget --content-disposition 'https://radarr.servarr.com/v1/update/master/updatefile?os=linux'&lt;br /&gt;
Sonarr: https://sonarr.tv/#download&lt;br /&gt;
 wget --content-disposition 'https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=linux'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file.&lt;br /&gt;
{{{ArrDownloadLink}}}&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Chose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
&lt;br /&gt;
Radarr: https://api.github.com/repos/Radarr/Radarr/releases&lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Unit Service File ===&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
=== Verify Directory Permissions ===&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
=== Enabling and starting the Unit Service File ===&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
	<entry>
		<id>https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2557</id>
		<title>Template:Installation</title>
		<link rel="alternate" type="text/html" href="https://wikiold.servarr.com/index.php?title=Template:Installation&amp;diff=2557"/>
		<updated>2020-12-01T20:45:12Z</updated>

		<summary type="html">&lt;p&gt;Logvin: /* Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&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 ARR&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;
			&amp;quot;default&amp;quot;: &amp;quot;Fake Radarr&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR Linux&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;RunArrCommandOSX&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Command to Start &amp;amp; Run ARR OSX&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/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;ArrExecutableNameWin&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Executable Name for Windows&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr.exe&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;ArrDownloadLink&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Link to the Arr Downloads&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;ArrLinuxAutoStart&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Autostart file instructions&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Port number for the ARR&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;number&amp;quot;,&lt;br /&gt;
			&amp;quot;default&amp;quot;: &amp;quot;7878&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true&lt;br /&gt;
		},&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;: {&lt;br /&gt;
			&amp;quot;description&amp;quot;: &amp;quot;Used for lowercase ARR names, this is not a required field only used if needed&amp;quot;,&lt;br /&gt;
			&amp;quot;example&amp;quot;: &amp;quot;radarr, sonarr, lidarr, readarr&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;string&amp;quot;&lt;br /&gt;
		}&lt;br /&gt;
	},&lt;br /&gt;
	&amp;quot;paramOrder&amp;quot;: [&lt;br /&gt;
		&amp;quot;ARRNAME&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandLinux&amp;quot;,&lt;br /&gt;
		&amp;quot;RunArrCommandOSX&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrExecutableNameWin&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrDownloadLink&amp;quot;,&lt;br /&gt;
		&amp;quot;ArrLinuxAutoStart&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRPORT&amp;quot;,&lt;br /&gt;
		&amp;quot;ARRNAME2&amp;quot;&lt;br /&gt;
	],&lt;br /&gt;
	&amp;quot;description&amp;quot;: &amp;quot;This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/templatedata&amp;gt;&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Installing =&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
== OSX ==&lt;br /&gt;
{{#lst::Installation Misc|{{{ARRNAME2}}}_osx_big_sur_installation}}&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
=== Debian / Ubuntu ===&lt;br /&gt;
Most of the &amp;quot;arr&amp;quot; software runs on mono, however newer version may run on .NET Core. If a .NET Core version is available, it will likely offer significant speed and resource enhancements.&lt;br /&gt;
&lt;br /&gt;
===== Mono Install =====&lt;br /&gt;
First start by installing the dependencies:&lt;br /&gt;
&lt;br /&gt;
Mono:&lt;br /&gt;
 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys FA7E0328081BFF6A14DA29AA6A19B38D3D831EF&lt;br /&gt;
 echo &amp;quot;deb https://download.mono-project.com/repo/ubuntu stable-focal main&amp;quot; | sudo tee /etc/apt/sources.list.d/mono-official-stable.list&lt;br /&gt;
 sudo apt update &amp;amp;&amp;amp; sudo apt install mono-devel&lt;br /&gt;
Curl&lt;br /&gt;
 sudo apt install curl&lt;br /&gt;
Mediainfo:&lt;br /&gt;
 sudo apt install mediainfo&lt;br /&gt;
sqlite3:&lt;br /&gt;
 sudo apt install sqlite3&lt;br /&gt;
&lt;br /&gt;
Now download the newest mono version release of {{{ARRNAME}}}:&lt;br /&gt;
&lt;br /&gt;
Radarr: https://api.github.com/repos/Radarr/Radarr/releases&lt;br /&gt;
 wget --content-disposition 'https://radarr.servarr.com/v1/update/master/updatefile?os=linux'&lt;br /&gt;
Sonarr: https://sonarr.tv/#download&lt;br /&gt;
 wget --content-disposition 'https://services.sonarr.tv/v1/download/phantom-develop/latest?version=3&amp;amp;os=linux'&lt;br /&gt;
&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser&lt;br /&gt;
&lt;br /&gt;
===== .NET Core Install =====&lt;br /&gt;
There are no dependencies needed for the .NET Core Install path.&lt;br /&gt;
&lt;br /&gt;
====== Manual Install ======&lt;br /&gt;
Go to the {{{ARRNAME}}} download page, and pick the appropriate file.&lt;br /&gt;
{{{ArrDownloadLink}}}&lt;br /&gt;
&lt;br /&gt;
In the example screenshot here, you can see multiple options. Chose the option that matches your OS and processor best. For most users, this would be &amp;lt;code&amp;gt;.linux-core-x64.tar.gz&amp;lt;/code&amp;gt; if it is available.&lt;br /&gt;
[[File:ARR Download Link Example.png|thumb|right|Example of Radarr download options]]&lt;br /&gt;
&lt;br /&gt;
Download this file onto your system: &lt;br /&gt;
&lt;br /&gt;
Radarr: https://api.github.com/repos/Radarr/Radarr/releases&lt;br /&gt;
  wget --content-disposition 'http://radarr.servarr.com/v1/update/master/updatefile?os=linux&amp;amp;runtime=netcore&amp;amp;arch=x64'&lt;br /&gt;
Uncompress:&lt;br /&gt;
 tar -xvzf {{{ARRNAME}}}*.linux-core-x64.tar.gz&lt;br /&gt;
Move to your preferred install location (typically &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;&lt;br /&gt;
 sudo mv {{{ARRNAME}}}/ /opt&lt;br /&gt;
Finally, make sure you grant the needed permission to your install directory:&lt;br /&gt;
 sudo chown {{{ARRNAME2}}}:{{{ARRNAME2}}} /opt/{{{ARRNAME}}}&lt;br /&gt;
&lt;br /&gt;
You can start {{{ARRNAME}}} with the following command:&lt;br /&gt;
 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser&lt;br /&gt;
&lt;br /&gt;
=== Auto Start Using Systemd ===&lt;br /&gt;
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started. It is important to remember that in Linux, capitalization matters. &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; account names and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; names are typically all lowercase, as are the directory structures mapped to them as part of the home directory.&lt;br /&gt;
&lt;br /&gt;
=== Preparing the Unit Service File ===&lt;br /&gt;
Several items may need to be changed to match your installation:&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; should match the service account that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; should match the service account group that {{{ARRNAME2}}} will run as.&lt;br /&gt;
# &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; has several items that should match your installation &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;&lt;br /&gt;
## Executable Path Default location is &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, but you may need to update if you installed {{{ARRNAME}}} elsewhere.&lt;br /&gt;
## Data Directory Default location is &amp;lt;code&amp;gt;-data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, but you may need to update if you want to keep your database and settings elsewhere.&lt;br /&gt;
## Mono Path (if Mono is being used) Default location is &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;, but you may need to update if you installed Mono elsewhere.&lt;br /&gt;
&lt;br /&gt;
The unit service file should be named &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt; and the best place for it is &amp;lt;code&amp;gt;/etc/systemd/system/&amp;lt;/code&amp;gt;. Alternative locations like &amp;lt;code&amp;gt;/usr/lib/systemd/system/&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/lib/systemd/system/&amp;lt;/code&amp;gt; may depend on the distribution used.&lt;br /&gt;
&lt;br /&gt;
This example unit assumes that the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt; are both &amp;lt;code&amp;gt;{{{ARRNAME2}}}&amp;lt;/code&amp;gt;, {{{ARRNAME}}}'s executable is placed in &amp;lt;code&amp;gt;/opt/{{{ARRNAME}}}/&amp;lt;/code&amp;gt;, the data directory is placed in &amp;lt;code&amp;gt;/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}&amp;lt;/code&amp;gt;, and the Mono executable (if being used) is placed in &amp;lt;code&amp;gt;/usr/bin/mono&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' Both &amp;lt;code&amp;gt;ExecStart&amp;lt;/code&amp;gt; lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).&lt;br /&gt;
&lt;br /&gt;
 [Unit]&lt;br /&gt;
 Description={{{ARRNAME}}} Daemon&lt;br /&gt;
 After=syslog.target network.target&lt;br /&gt;
 &lt;br /&gt;
 [Service]&lt;br /&gt;
 # Change the user and group variables here.&lt;br /&gt;
 User={{{ARRNAME2}}}&lt;br /&gt;
 Group={{{ARRNAME2}}}&lt;br /&gt;
 &lt;br /&gt;
 Type=simple&lt;br /&gt;
 &lt;br /&gt;
 # NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.&lt;br /&gt;
 # NetCore install:&lt;br /&gt;
 #ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 # Mono Install:&lt;br /&gt;
 #ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 &lt;br /&gt;
 TimeoutStopSec=20&lt;br /&gt;
 KillMode=process&lt;br /&gt;
 Restart=on-failure&lt;br /&gt;
 &lt;br /&gt;
 [Install]&lt;br /&gt;
 WantedBy=multi-user.target&lt;br /&gt;
&lt;br /&gt;
=== Verify Directory Permissions ===&lt;br /&gt;
Ensure the &amp;lt;code&amp;gt;User&amp;lt;/code&amp;gt; that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.&lt;br /&gt;
Running the command &amp;lt;code&amp;gt;ls -lad /directory/&amp;lt;/code&amp;gt; will show the permissions for that folder.&lt;br /&gt;
Example:&lt;br /&gt;
 $ ls -lad /opt/{{{ARRNAME}}}&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/&lt;br /&gt;
 $ ls -lad /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 drwxr-xr-x 6 {{{ARRNAME2}}} {{{ARRNAME2}}} 24576 Nov 28 21:30 /home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
&lt;br /&gt;
=== Enabling and starting the Unit Service File ===&lt;br /&gt;
Once you have created &amp;lt;code&amp;gt;{{{ARRNAME}}}.service&amp;lt;/code&amp;gt;, you will want to enable the service:&lt;br /&gt;
 sudo systemctl enable {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
You are now ready to start {{{ARRNAME}}}. You can do so with the &amp;lt;code&amp;gt;start&amp;lt;/code&amp;gt; command:&lt;br /&gt;
 sudo systemctl start {{{ARRNAME}}}.service&lt;br /&gt;
&lt;br /&gt;
If you want to verify {{{ARRNAME}}} is running, you can run the &amp;lt;code&amp;gt;status&amp;lt;/code&amp;gt; command:&lt;br /&gt;
  $ sudo systemctl status {{{ARRNAME}}}.service&lt;br /&gt;
 ● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service&lt;br /&gt;
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)&lt;br /&gt;
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago&lt;br /&gt;
  Main PID: 19978 ({{{ARRNAME}}})&lt;br /&gt;
     Tasks: 16 (limit: 4915)&lt;br /&gt;
    Memory: 114.6M&lt;br /&gt;
       CPU: 9.331s&lt;br /&gt;
    CGroup: /system.slice/{{{ARRNAME}}}.service&lt;br /&gt;
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME2}}}/.config/{{{ARRNAME}}}/&lt;br /&gt;
 Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.&lt;br /&gt;
&lt;br /&gt;
== NAS ==&lt;br /&gt;
=== FreeNAS ===&lt;br /&gt;
=== Qnap ===&lt;br /&gt;
=== Synology ===&lt;br /&gt;
&lt;br /&gt;
== Docker ==&lt;br /&gt;
&lt;br /&gt;
== Docker on unRAID ==&lt;br /&gt;
* Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.&lt;br /&gt;
&amp;lt;ol style=&amp;quot;list-style-type: decimal;&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Simply head on over to the community applications store on the top bar of your browser. &amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install1.png|frameless|750px|alt=Community Applications|Communitty Applications]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;In the search field type in {{{ARRNAME}}}&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;Select which docker image you would like to install. There are several to choose from&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:{{{ARRNAME}}}-unraid-install.png|frameless|none|750px|alt=Installation Options|Installation Options]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Depending on which container you go with will determine the steps in which you take. Some containers come preloaded with volumes mapped already. This is really up to your liking how you would like your container volumes to be laid out. It is highly recommended to follow the guide listed [[Docker Guide|here]] for your volume mapping&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;p&amp;gt; Depending on which container you select you may recieve a pop up asking you to '''Choose A Branch To Install''' when in doubt go with the &amp;lt;code&amp;gt;Default :latest&amp;lt;/code&amp;gt; branch&amp;lt;/p&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once you have selected which container you are going to go with, you will need to either create the volumes for {{{ARRNAME}}} to be able to use or simply use the pre-filled ones. (Highly recommended to remove the pre-filled and use your own, to remove the pre-filled ones).&amp;lt;br /&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; To remove the pre-filled paths simply select the toggle in the upper right from '''Basic''' to '''Advanced''' view then scroll down to the pre-filled path and click '''Remove'''&amp;lt;/p&amp;gt;&lt;br /&gt;
[[File:unraid-install3.png|frameless|750px|alt=Toggle Advanced|Toggle Advanced]]&lt;br /&gt;
    &amp;lt;ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; To create new volumes simply select the &amp;lt;code&amp;gt; Add another Path, Port, Variable, Label or Device&amp;lt;/code&amp;gt; text at the bottom above the '''Apply''' button.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Once the new window appears you will want to use the drop down box next to '''Config Type:''' and make sure that it is set to '''Path'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; From here you will want to fill out all pertinant information:&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;ol&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Name:''' The name of this path, this can be any unique name more like a note to know what this path is for.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Container Path:''' This will be the path that {{{ARRNAME}}} will see inside the container &amp;lt;code&amp;gt;/data&amp;lt;/code&amp;gt; is a favorite&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt;'''Host Path:''' This is the path to the host (unRAID) machine, This will be &amp;lt;code&amp;gt;/mnt/user/&amp;lt;Your User Share&amp;gt;&amp;lt;/code&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;p&amp;gt; '''NOTE''' If you follow the [[Docker Guide]] you will only need one Volume path to be made as all information that {{{ARRNAME}}} will need will be in one share &amp;lt;code&amp;gt;/mnt/user/data&amp;lt;/code&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; The last three items '''Default Value:''', '''Access Mode&amp;quot;''', and '''Description:''' Can be left alone.&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
        &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''ADD'''&amp;lt;br /&amp;gt;&lt;br /&gt;
        &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:unraid-install4.png|frameless|750px|alt=Add New path|Add New Path]]&lt;br /&gt;
      &amp;lt;/ol&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with &amp;lt;code&amp;gt;{{{ARRPORT}}}&amp;lt;/code&amp;gt;, ''UNLESS'' This port causes any conflicts with any other container. If it does please choose a different port that is not in use.&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''APPLY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
      &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;/ol&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the '''OK''' button at the bottom of the new pop up window&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
    &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Click '''DOCKER''' on the top row of your browser.&amp;lt;br /&amp;gt;&lt;br /&gt;
    &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now all you will need to do is simply left click on your newly created container and select '''WebUI'''.&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
  [[File:unraid-install2.png|frameless|none|250x240px|alt=Select WebUI|Select WebUI]]&lt;br /&gt;
  &amp;lt;li&amp;gt;&amp;lt;p&amp;gt; Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. '''ENJOY'''&amp;lt;br /&amp;gt;&lt;br /&gt;
  &amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Logvin</name></author>
	</entry>
</feed>