Kyoo/docs/setting_up/setting_up.md

4.9 KiB

uid, title
uid title
setting_up Setting Up

Welcome to Kyoo

Hi, and welcome to Kyoo, you are about to embark on this wonderful journey that is media management & streaming

To setup Kyoo, you need to make sure you installed it, then we'll configure some settings, maybe rearrange your files. This shouldn't take long if you are used to manage JSON files, and regex.

settings.json

If you installed Kyoo on Linux/macOS, their should be a /var/lib/Kyoo directory If you are on a Windows, it should be C:\ProgramData

Inside this folder, we'll find (almost) everything we need. The most important file is settings.json

At first, it'll look like this

We are going to take a look at the fields you might want to change to tailor Kyoo to your configuration:

  • basics

    • url: The port on which Kyoo will be exposed
    • publicUrl: The full URL for Kyoo. Warning The port must match with url For the 3 following fields, the path are relative to the directory settings.json is in
    • pluginsPath: The directory where the plugins are stored
    • transmuxPath: The directory where the transmux-ed video are stored (used as a cache)
    • transcodePath: The directory where the transcoded video are stored (used as a cache)
    • metadataInShow: A boolean telling if the Movie/Show metadata (posters, extracted subtitles, Chapters) will be stored in the same directory as the video, in an Extra directory, or in the metadataPath. For example, if metadataInShow is true, your file tree wil look something like this:
    /my-movies
    |
    -- My First Movie/
      |
      -- My First Movie.mp4
      -- Extra/
        |
        -- poster.jpe
        -- etc...
    

    Warning Therefore, if your shows are not in individual folders, it is recommended to set metadataInShow to false. If you don't, all the shows will share the same metadata we are sure you don't want that ;)

  • database

    • enabled: Which database to use. Either sqlite (by default) or postgres. SQLite is easier to use & manage if you don't have an SQL server on your machine
  • tasks

    • parallels: The number (as a string) of tasks that can be run at the same time. To avoid conflicts, we recommend leaving the value at 1
    • scheduled: An object with keys being the name of an automation task, with a value being the interval between each task of the same type.
      • The available keys can be found at publicUrl/api/tasks (as 'slug')
      • The values must be formatted like ```HH:MM:SS`` For Example in the default configuration, a file scan task will be executed every 24 hours
  • media

    • regex: An array of String to match files using Regex (PHP). The Regex must have the following groups:
      • Collection: The name of the collection. For example, you can move all the movie from a same saga in one directory, the collection's name will be the directory's. If the movie is at the root of the library, no collection will be created.
      • Show: the name of the show/movie
      • StartYear (optional): the start year for a TV Series, or Year for a movie, used to get the correct metadata in provider
      • Season (for TV Series): An integer being the number of the season
      • Episode (for TV Series): An integer being the number of the episode in the season
      • Absolute (optional if the two groups above are in the regex): The absolute number of the episode (from episode 1x01, ignoring seasons)
    • subtitleRegex: Same as regex, but to find Subtitles files.
      • Language: A String from 1 to 3 characters long defining the language of the subtitles
      • Default: If present, will set the subtitle as default track
      • Forced: If present, will set the subtitles as forced track
  • tvdb

    • apikey: The API key that will be used to interact with the TVDB's API. See there to get one
  • the-moviedb

    • apikey: The API key that will be used to interact with TMDB's API. See there to get one

Using a Container

If you use Kyoo from a container, we recommand using the docker-compose file from here and doing the following actions before launching the container:

  • If you use Postgres, configure the fields DATABASE__CONFIGURATIONS_*
  • If you use SQLite, set the DATABASE__ENABLED to sqlite
  • Set the *APIKEY values
  • Map the folder /var/lib/kyoo to a directory on your host, so you can access files easily, and it'll be persistent
  • Map the folder /video to the media directory
  • If you use Postgres, map /var/lib/postgresql/data to the host's Postgres server data folder