Difference between revisions of "Template:Installation"

From Servarr
Line 68: Line 68:
  
 
=== Auto Start Using Systemd ===
 
=== Auto Start Using Systemd ===
 +
Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started.
 +
 +
===== Preparing the Unit Service File =====
 +
Several items may need to be changed to match your installation:
 +
 +
# <code>User</code> should match the service account that {{{ARRNAME}}} will run as.
 +
# <code>Group</code> should match the service account group that {{{ARRNAME}}} will run as.
 +
# <code>ExecStart</code> has several items that should match your installation <code>/opt/{{{ARRNAME}}}/{{{ARRNAME}}}</code>
 +
## Executable Path Default location is <code>/opt/{{{ARRNAME}}}/{{{ARRNAME}}}</code>, but you may need to update if you installed {{{ARRNAME}}} elsewhere.
 +
## Data Directory Default location is <code>-data=/home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/</code>, but you may need to update if you want to keep your database and settings elsewhere.
 +
## Mono Path (if Mono is being used) Default location is <code>/usr/bin/mono</code>, but you may need to update if you installed Mono elsewhere.
 +
 +
The unit service file should be named <code>{{{ARRNAME}}}.service</code> and the best place for it is <code>/etc/systemd/system/</code>. Alternative locations like <code>/usr/lib/systemd/system/</code> and <code>/lib/systemd/system/</code> may depend on the distribution used.
 +
 +
This example unit assumes that the <code>User</code> and <code>Group</code> are both <code>{{{ARRNAME}}}</code>, {{{ARRNAME}}}'s executable is placed in <code>/opt/{{{ARRNAME}}}/</code>, the data directory is placed in <code>/home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}</code>, and the Mono executable (if being used) is placed in <code>/usr/bin/mono</code>.
 +
 +
'''Important note:''' Both <code>ExecStart</code> lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).
 +
 +
[Unit]
 +
Description={{{ARRNAME}}} Daemon
 +
After=syslog.target network.target
 +
 +
[Service]
 +
# Change the user and group variables here.
 +
User={{{ARRNAME}}}
 +
Group={{{ARRNAME}}}
 +
 +
Type=simple
 +
 +
# NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.
 +
# NetCore install:
 +
#ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/
 +
 +
# Mono Install:
 +
#ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/
 +
 +
TimeoutStopSec=20
 +
KillMode=process
 +
Restart=on-failure
 +
 +
[Install]
 +
WantedBy=multi-user.target
 +
 +
===== Verify Directory Permissions =====
 +
Ensure the <code>User</code> that will be running {{{ARRNAME}}} has access to both the executable directory and data directory.
 +
Running the command <code>ls -lad /directory/</code> will show the permissions for that folder.
 +
Example:
 +
$ ls -lad /opt/{{{ARRNAME}}}
 +
drwxr-xr-x 6 {{{ARRNAME}}} {{{ARRNAME}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/
 +
$ ls -lad /home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/
 +
drwxr-xr-x 6 {{{ARRNAME}}} {{{ARRNAME}}} 24576 Nov 28 21:30 /home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/
 +
 +
===== Enabling and starting the Unit Service File =====
 +
Once you have created <code>{{{ARRNAME}}}.service</code>, you will want to enable the service:
 +
sudo systemctl enable {{{ARRNAME}}}.service
 +
 +
You are now ready to start {{{ARRNAME}}}. You can do so with the <code>start</code> command:
 +
sudo systemctl start {{{ARRNAME}}}.service
 +
 +
If you want to verify {{{ARRNAME}}} is running, you can run the <code>status</code> command:
 +
  $ sudo systemctl status {{{ARRNAME}}}.service
 +
● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service
 +
    Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)
 +
    Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago
 +
  Main PID: 19978 ({{{ARRNAME}}})
 +
    Tasks: 16 (limit: 4915)
 +
    Memory: 114.6M
 +
      CPU: 9.331s
 +
    CGroup: /system.slice/{{{ARRNAME}}}.service
 +
            └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/
 +
Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.
  
 
== NAS ==
 
== NAS ==

Revision as of 18:25, 1 December 2020


This template is expressly for the steps and processes of installing all the various ARR software on multiple different platforms

Template parameters

ParameterDescriptionTypeStatus
ARRNAMEARRNAME

Name of the ARR

Default
Fake Radarr
Example
Radarr
Stringrequired
RunArrCommandLinuxRunArrCommandLinux

Command to Start & Run ARR Linux

Example
./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/Radarr/
Stringrequired
RunArrCommandOSXRunArrCommandOSX

Command to Start & Run ARR OSX

Example
./opt/Radarr/Radarr -nobrowser -data=/home/radarr/.config/Radarr/
Stringrequired
ArrExecutableNameWinArrExecutableNameWin

Executable Name for Windows

Example
Radarr.exe
Stringrequired
ArrDownloadLinkArrDownloadLink

Link to the Arr Downloads

URLrequired
ArrLinuxAutoStartArrLinuxAutoStart

Autostart file instructions

Unknownrequired
ARRPORTARRPORT

Port number for the ARR

Default
7878
Example
Radarr: 7878, Sonarr: 8989, Lidarr: 8686, Readarr: 8787
Numberrequired


Installing

Windows

OSX

Linux

Auto Start Using Systemd

Most modern Linux distributions have switched to systemd, which involves a simple unit service file which gets enabled and started.

Preparing the Unit Service File

Several items may need to be changed to match your installation:

  1. User should match the service account that {{{ARRNAME}}} will run as.
  2. Group should match the service account group that {{{ARRNAME}}} will run as.
  3. ExecStart has several items that should match your installation /opt/{{{ARRNAME}}}/{{{ARRNAME}}}
    1. Executable Path Default location is /opt/{{{ARRNAME}}}/{{{ARRNAME}}}, but you may need to update if you installed {{{ARRNAME}}} elsewhere.
    2. Data Directory Default location is -data=/home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/, but you may need to update if you want to keep your database and settings elsewhere.
    3. Mono Path (if Mono is being used) Default location is /usr/bin/mono, but you may need to update if you installed Mono elsewhere.

The unit service file should be named {{{ARRNAME}}}.service and the best place for it is /etc/systemd/system/. Alternative locations like /usr/lib/systemd/system/ and /lib/systemd/system/ may depend on the distribution used.

This example unit assumes that the User and Group are both {{{ARRNAME}}}, {{{ARRNAME}}}'s executable is placed in /opt/{{{ARRNAME}}}/, the data directory is placed in /home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}, and the Mono executable (if being used) is placed in /usr/bin/mono.

Important note: Both ExecStart lines are commented out below. Remove the # from the line matching your install type (Mono vs NetCore).

[Unit]
Description={{{ARRNAME}}} Daemon
After=syslog.target network.target

[Service]
# Change the user and group variables here.
User={{{ARRNAME}}}
Group={{{ARRNAME}}}

Type=simple

# NOTE: Uncomment one of the two below ExecStart lines, based on if {{{ARRNAME}}} is using NetCore or Mono.
# NetCore install:
#ExecStart=/opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/

# Mono Install:
#ExecStart=/usr/bin/mono --debug /opt/{{{ARRNAME}}}/{{{ARRNAME}}}.exe -nobrowser -data=/home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/

TimeoutStopSec=20
KillMode=process
Restart=on-failure

[Install]
WantedBy=multi-user.target
Verify Directory Permissions

Ensure the User that will be running {{{ARRNAME}}} has access to both the executable directory and data directory. Running the command ls -lad /directory/ will show the permissions for that folder. Example:

$ ls -lad /opt/{{{ARRNAME}}}
drwxr-xr-x 6 {{{ARRNAME}}} {{{ARRNAME}}} 24576 Nov 28 21:30 /opt/{{{ARRNAME}}}/
$ ls -lad /home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/
drwxr-xr-x 6 {{{ARRNAME}}} {{{ARRNAME}}} 24576 Nov 28 21:30 /home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/
Enabling and starting the Unit Service File

Once you have created {{{ARRNAME}}}.service, you will want to enable the service:

sudo systemctl enable {{{ARRNAME}}}.service

You are now ready to start {{{ARRNAME}}}. You can do so with the start command:

sudo systemctl start {{{ARRNAME}}}.service

If you want to verify {{{ARRNAME}}} is running, you can run the status command:

 $ sudo systemctl status {{{ARRNAME}}}.service
● {{{ARRNAME}}}.service - {{{ARRNAME}}}Service
   Loaded: loaded (/usr/lib/systemd/system/{{{ARRNAME}}}.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2017-03-07 10:23:44 PST; 5min ago
 Main PID: 19978 ({{{ARRNAME}}})
    Tasks: 16 (limit: 4915)
   Memory: 114.6M
      CPU: 9.331s
   CGroup: /system.slice/{{{ARRNAME}}}.service
           └─19978 /opt/{{{ARRNAME}}}/{{{ARRNAME}}} -nobrowser -data=/home/{{{ARRNAME}}}/.config/{{{ARRNAME}}}/
Mar 07 10:23:44 apollo systemd[1]: Started {{{ARRNAME}}} Service.

NAS

FreeNAS

Qnap

Synology

Docker

Docker on unRAID

  • Installation of {{{ARRNAME}}} is quite simple when it comes to unRAID as they have made installing Docker containers a breeze.
  1. Simply head on over to the community applications store on the top bar of your browser.

  2. Community Applications
    Communitty Applications
  3. In the search field type in {{{ARRNAME}}}

  4. Select which docker image you would like to install. There are several to choose from

  5.  [[File:{{{ARRNAME}}}-unraid-install.png|thumb|none|alt=Installation Options|Installation Options]]
    
  6. 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 here for your volume mapping

  7. 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 Default :latest branch

  8. 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).

  9. 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

    Toggle Advanced
    Toggle Advanced
    1. To create new volumes simply select the Add another Path, Port, Variable, Label or Device text at the bottom above the Apply button.

    2. 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.

    3. From here you will want to fill out all pertinant information:

      1. Name: The name of this path, this can be any unique name more like a note to know what this path is for.

      2. Container Path: This will be the path that {{{ARRNAME}}} will see inside the container /data is a favorite

      3. Host Path: This is the path to the host (unRAID) machine, This will be /mnt/user/<Your User Share>

      4. 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 /mnt/user/data

      5. The last three items Default Value:, Access Mode", and Description: Can be left alone.

      6. Click ADD

      7. Add New path
        Add New Path
    4. Last thing to check is to make sure Host Port for {{{ARRPORT}}} is filled in with {{{ARRPORT}}}, UNLESS This port causes any conflicts with any other container. If it does please choose a different port that is not in use.

    5. Click APPLY

  10. Now the {{{ARRNAME}}}'s container is being downloaded, once complete simply click the OK button at the bottom of the new pop up window

  11. Click DOCKER on the top row of your browser.

  12. Now all you will need to do is simply left click on your newly created container and select WebUI.

  13. Select WebUI
    Select WebUI
  14. Now a new browser tab should show up with {{{ARRNAME}}} running in all its glory. ENJOY

Manual Updates

Windows

OSX

Linux

Docker

Getting Started

// Do we need sub sections that much?

Windows

OSX

Linux

Docker