Radarr: Difference between revisions

MsHaze (talk | contribs)
m The default port for Radarr is 7878 - 8989 is the Sonarr default.
Djacu (talk | contribs)
m Lost a `trust` configuration for postgres in the previous edit.
 
(3 intermediate revisions by 3 users not shown)
Line 18: Line 18:
Radarr can be further configured using NixOS options.
Radarr can be further configured using NixOS options.


<syntaxHighlight lang=nix>
<syntaxhighlight lang="nix">
services.radarr = {
services.radarr = {
   ...
   #...
   user = "user";
   user = "user";
   group = "group";
   group = "group";
   dataDir = "path/to/directory"
   dataDir = "path/to/directory";
};
};
</syntaxHighlight>
</syntaxhighlight>


Both the <code>user</code> and <code>group</code> options are used to specify which user and group is used to run Radarr. The <code>dataDir</code> option specifies the directory where Radarr stores its data files, and can be set to a custom location. When setting the <code>dataDir</code> option, be careful of permissions as a specified user still needs the correct read/write permissions in this directory.
Both the <code>user</code> and <code>group</code> options are used to specify which user and group is used to run Radarr. The <code>dataDir</code> option specifies the directory where Radarr stores its data files, and can be set to a custom location. When setting the <code>dataDir</code> option, be careful of permissions as a specified user still needs the correct read/write permissions in this directory.


= Postgresql configuration =
Radarr uses SQLite by default. It can be configured to use PostgreSQL.<syntaxhighlight lang="nix">
services.radarr = {
  #...
  settings = {
    postgres.host = "127.0.0.1";
    postgres.logdb = "radarr-log";
    postgres.maindb = "radarr-main";
    postgres.password = config.services.radarr.user;
    # Not secure if the port is exposed
    postgres.user = config.services.radarr.user;
    server.port = 7878;
  };
};


services.postgresql = {
  authentication = ''
    # this is for local database access with psql
    local all all trust
    # this is for radarr to connect
    host all ${config.services.radarr.user} 127.0.0.1/32 trust
    host all ${config.services.radarr.user} ::1/128      trust
  '';
  enable = true;
  ensureDatabases = [
    "radarr-log"
    "radarr-main"
  ];
  ensureUsers = [
    {
      name = config.services.radarr.user;
      # required for table creation
      ensureClauses.superuser = true;
    }
  ];
};
</syntaxhighlight>This is a minimal configuration to ensure that the necessary databases are created and accessible to Radarr. See the [https://wiki.servarr.com/radarr/postgres-setup Radarr Postgres Setup] wiki page for information about the databases necessary, supported versions, and migrations. See the [https://wiki.servarr.com/radarr/environment-variables Radarr Environment Variables] wiki page for information about settings.
[[Category:Applications]]
[[Category:Applications]]
[[Category:Server]]