Run Commands & Environment Variables¶
The basic command to run Kometa is as follows:
To customize the running of Kometa according to your needs, you can use either run commands or environmental variables. Environmental variables take precedence over run command attributes. However, if you encounter a race condition where an attribute has been set both via an environmental variable and a shell command, the environmental variable will be given priority.
Please note that these instructions assume that you have a basic understanding of Docker concepts. If you need to familiarize yourself with Docker, you can check out the official tutorial.
Another way to specify environmental variables is by adding them to a .env file located in your config folder.
Environment variables are expressed as KEY=VALUE
depending on the context where you are specifying them, you may enter
those two things in two different fields, or some other way. The examples below show how you would specify the
environment variable in a script or a docker run
command. Things like Portainer or a NAS Docker UI will have
different ways to specify these things.
Combining Commands or Variables
Some Commands or Variables can be combined in a single run, this is mainly beneficial when you want to run a specific command and have it run immediately rather than waiting until the next scheduled run.
For example, if I want to run Collections Only to only run Collection Files, and Run Immediately to skip waiting until my next scheduled run, I can use both commands at the same time:
Config Location -c
/--config
KOMETA_CONFIG
¶
Specify the location of the configuration YAML file. Will default to config/config.yml
when not
specified.
Accepted Values: Path to YAML config file
Shell Flags: -c
or --config
(ex. --config /data/config.yml
)
Environment Variable: KOMETA_CONFIG
(ex. KOMETA_CONFIG=/data/config.yml
)
Time to Run -t
/--times
KOMETA_TIMES
¶
Specify the time of day that Kometa will run. Will default to 05:00
when not
specified.
Accepted Values: Comma-separated list in HH:MM
format
Shell Flags: -t
or --times
(ex. --times 06:00,18:00
)
Environment Variable: KOMETA_TIMES
(ex. KOMETA_TIMES=06:00,18:00
)
Run Immediately -r
/--run
KOMETA_RUN
¶
Perform a run immediately, bypassing the time to run flag.
Shell Flags: -r
or --run
(ex. --run
)
Environment Variable: KOMETA_RUN
(ex. KOMETA_RUN=true
)
Run Tests -ts
/--tests
KOMETA_TESTS
¶
Perform a debug test run immediately, bypassing the time to run flag. This will only run
collections with test: true
in the definition.
Shell Flags: -ts
or --tests
(ex. --tests
)
Environment Variable: KOMETA_TESTS
(ex. KOMETA_TESTS=true
)
Example
Debug -db
/--debug
KOMETA_DEBUG
¶
Perform a debug test run immediately, bypassing the time to run flag. This will only run
collections with test: true
in the definition.
Shell Flags: -db
or --debug
(ex. --debug
)
Environment Variable: KOMETA_DEBUG
(ex. KOMETA_DEBUG=true
)
Trace -tr
/--trace
KOMETA_TRACE
¶
Run with extra Trace Debug Logs.
Shell Flags: -tr
or --trace
(ex. --trace
)
Environment Variable: KOMETA_TRACE
(ex. KOMETA_TRACE=true
)
Log Requests -lr
/--log-requests
KOMETA_LOG_REQUESTS
¶
Run with every network request printed to the Logs. This can potentially have personal
information in it.
Shell Flags: -lr
or --log-requests
(ex. --log-requests
)
Environment Variable: KOMETA_LOG_REQUESTS
(ex. KOMETA_LOG_REQUESTS=true
)
Timeout -ti
/--timeout
KOMETA_TIMEOUT
¶
Change the timeout in seconds for all non-Plex services (such as TMDb, Radarr, and Trakt). This will default to 180
when not specified and is overwritten by any timeouts mentioned for specific services in the Configuration File.
Accepted Values: Integer (value is in seconds)
Shell Flags: -ti
or --timeout
(ex. --timeout 360
)
Environment Variable: KOMETA_TIMEOUT
(ex. KOMETA_TIMEOUT=360
)
No Verify SSL -nv
/--no-verify-ssl
KOMETA_NO_VERIFY_SSL
¶
Turn SSL Verification off.
Note
set to false if your log file shows any errors similar to "SSL: CERTIFICATE_VERIFY_FAILED"
Accepted Values: Integer (value is in seconds)
Shell Flags: -nv
or --no-verify-ssl
(ex. --no-verify-ssl
)
Environment Variable: KOMETA_NO_VERIFY_SSL
(ex. KOMETA_NO_VERIFY_SSL=true
)
Collections Only -co
/--collections-only
KOMETA_COLLECTIONS_ONLY
¶
Only run collection YAML files, skip library operations, metadata, overlays, and playlists.
Shell Flags: -co
or --collections-only
(ex. --collections-only
)
Environment Variable: KOMETA_COLLECTIONS_ONLY
(ex. KOMETA_COLLECTIONS_ONLY=true
)
Metadata Only -mo
/--metadata-only
KOMETA_METADATA_ONLY
¶
Only run metadata files, skip library operations, collections, overlays, and playlists.
Shell Flags: -mo
or --metadata-only
(ex. --metadata-only
)
Environment Variable: KOMETA_METADATA_ONLY
(ex. KOMETA_METADATA_ONLY=true
)
Playlists Only -po
/--playlists-only
KOMETA_PLAYLISTS_ONLY
¶
Only run playlist YAML files, skip library operations, overlays, collections, and metadata.
Shell Flags: -po
or --playlists-only
(ex. --playlists-only
)
Environment Variable: KOMETA_PLAYLISTS_ONLY
(ex. KOMETA_PLAYLISTS_ONLY=true
)
Operations Only -op
/--operations-only
KOMETA_OPERATIONS_ONLY
¶
Only run library operations skipping collections, metadata, playlists, and overlays.
Shell Flags: -op
or --operations-only
(ex. --operations-only
)
Environment Variable: KOMETA_OPERATIONS_ONLY
(ex. KOMETA_OPERATIONS_ONLY=true
)
Overlays Only -ov
/--overlays-only
KOMETA_OVERLAYS_ONLY
¶
Only run library overlay files skipping collections, metadata, playlists, and operations.
Shell Flags: -ov
or --overlays-only
(ex. --overlays-only
)
Environment Variable: KOMETA_OVERLAYS_ONLY
(ex. KOMETA_OVERLAYS_ONLY=true
)
Run Collections -rc
/--run-collections
KOMETA_RUN_COLLECTIONS
¶
Perform a collections run immediately to run only the pre-defined collections, bypassing
the time to run flag.
Accepted Values: Pipe-separated list of Collection Names to run; the "pipe" character is "|" as shown in the examples below.
Shell Flags: -rc
or --run-collections
(ex. --run-collections "Harry Potter|Star Wars"
)
Environment Variable: KOMETA_RUN_COLLECTIONS
(ex. KOMETA_RUN_COLLECTIONS=Harry Potter|Star Wars
)
Run Libraries -rl
/--run-libraries
KOMETA_RUN_LIBRARIES
¶
Perform a libraries run immediately to run only the pre-defined libraries, bypassing the
time to run flag.
Accepted Values: Pipe-separated list of Library Names to run; the "pipe" character is "|" as shown in the examples below.
Shell Flags: -rl
or --run-libraries
(ex. --run-libraries "Movies - 4K|TV Shows - 4K"
)
Environment Variable: KOMETA_RUN_LIBRARIES
(ex. KOMETA_RUN_LIBRARIES=Movies - 4K|TV Shows - 4K
)
Run Files -rf
/--run-files
KOMETA_RUN_FILES
¶
Perform a run immediately to run only the pre-defined Collection, Metadata or Playlist files,
bypassing the time to run flag. This works for all different paths i.e. default
, git
, url
, file
, or repo
.
Warning
Do not use this to run Overlay files, as Overlay files must run all together or not at all due to their nature.
Accepted Values: Pipe-separated list of Collection, Metadata or Playlist Filenames to run; the "pipe" character is "|" as shown in the examples below.
Shell Flags: -rf
or --run-files
(ex. --run-files "Movies.yml|MovieCharts"
)
Environment Variable: KOMETA_RUN_FILES
(ex. KOMETA_RUN_FILES=Movies.yml|MovieCharts
)
Ignore Schedules -is
/--ignore-schedules
KOMETA_IGNORE_SCHEDULES
¶
Ignore all schedules for the run. Range Scheduled collections (such as Christmas
movies) will still be ignored.
Shell Flags: -is
or --ignore-schedules
(ex. --ignore-schedules
)
Environment Variable: KOMETA_IGNORE_SCHEDULES
(ex. KOMETA_IGNORE_SCHEDULES=true
)
Ignore Ghost -ig
/--ignore-ghost
KOMETA_IGNORE_GHOST
¶
Ignore all ghost logging for the run. A ghost log is what's printed to the console to show
progress during steps.
Shell Flags: -ig
or --ignore-ghost
(ex. --ignore-ghost
)
Environment Variable: KOMETA_IGNORE_GHOST
(ex. KOMETA_IGNORE_GHOST=true
)
Delete Collections -dc
/--delete-collections
KOMETA_DELETE_COLLECTIONS
¶
Delete all collections in a Library prior to running collections/operations.
Warning
You will lose all collections in the library - this will delete all collections, including ones not created or maintained by Kometa.
Shell Flags: -dc
or --delete-collections
(ex. --delete-collections
)
Environment Variable: KOMETA_DELETE_COLLECTIONS
(ex. KOMETA_DELETE_COLLECTIONS=true
)
Delete Labels -dl
/--delete-labels
KOMETA_DELETE_LABELS
¶
Delete all labels on every item in a Library prior to running collections/operations.
Warning
To preserve functionality of Kometa, this will not remove the Overlay label, which is required for Kometa to know which items have Overlays applied.
This will impact any Smart Label Collections that you have in your library.
We do not recommend using this on a regular basis if you also use any operations or collections that update labels, as you are effectively deleting and adding labels on each run.
Shell Flags: -dl
or --delete-labels
(ex. --delete-labels
)
Environment Variable: KOMETA_DELETE_LABELS
(ex. KOMETA_DELETE_LABELS=true
)
Resume Run -re
/--resume
KOMETA_RESUME
¶
Perform a resume run immediately resuming from the first instance of the specified collection,
bypassing the time to run flag.
Shell Flags: -re
or --resume
(ex. --resume "Star Wars"
)
Environment Variable: KOMETA_RESUME
(ex. KOMETA_RESUME=Star Wars
)
No Countdown -nc
/--no-countdown
KOMETA_NO_COUNTDOWN
¶
Run without displaying a countdown to the next scheduled run.
Shell Flags: -nc
or --no-countdown
(ex. --no-countdown
)
Environment Variable: KOMETA_NO_COUNTDOWN
(ex. KOMETA_NO_COUNTDOWN=true
)
No Missing -nm
/--no-missing
KOMETA_NO_MISSING
¶
Run without utilizing the missing movie/show functions.
Shell Flags: -nm
or --no-missing
(ex. --no-missing
)
Environment Variable: KOMETA_NO_MISSING
(ex. KOMETA_NO_MISSING=true
)
No Report -nr
/--no-report
KOMETA_NO_REPORT
¶
Run without saving the report.
Shell Flags: -nr
or --no-report
(ex. --no-report
)
Environment Variable: KOMETA_NO_REPORT
(ex. KOMETA_NO_REPORT=true
)
Read Only Config -ro
/--read-only-config
KOMETA_READ_ONLY_CONFIG
¶
Run without writing to the configuration file.
Shell Flags: -ro
or --read-only-config
(ex. --read-only-config
)
Environment Variable: KOMETA_READ_ONLY_CONFIG
(ex. KOMETA_READ_ONLY_CONFIG=true
)
Divider Character -d
/--divider
KOMETA_DIVIDER
¶
Change the terminal output divider character. Will default to =
if not specified.
Accepted Values: Any character
Shell Flags: -d
or --divider
(ex. --divider *
)
Environment Variable: KOMETA_DIVIDER
(ex. KOMETA_DIVIDER=*
)
Screen Width -w
/--width
KOMETA_WIDTH
¶
Change the terminal output width. Will default to 100
if not specified.
Accepted Values: Integer between 90 and 300
Shell Flags: -w
or --width
(ex. --width 150
)
Environment Variable: KOMETA_WIDTH
(ex. KOMETA_WIDTH=150
)
Config Secrets --kometa-***
KOMETA_***
¶
All Run Commands that are in the format --kometa-***
and Environment Variables that are in the
format KOMETA_***
, where ***
is the name you want to call the variable, will be loaded in as Config Secrets.
These Config Secrets can be loaded into the config by placing <<***>>
in any field in the config, where ***
is
whatever name you called the variable.
Shell Flags: --kometa-***
(ex. --kometa-mysecret 123456789
)
Environment Variable: KOMETA_***
(ex. KOMETA_MYSECRET=123456789
)