Command-line options
Normally the Kodi add-on starts the elementum binary itself, and you don’t need any of this.
You need it when you run the daemon separately from Kodi: on a NAS, in Docker,
as a Linux daemon or Windows service, or on a platform that has no Elementum binary.
The binary is inside the add-on zip, in resources/bin/<platform>/elementum (elementum.exe on Windows).
Flags
Flags use one dash and name=value form, e.g. -remoteHost=192.168.1.10. Run elementum -h to see the list for your version.
Flags with a list type can be repeated, e.g. -listenInterfaces=eth0 -listenInterfaces=wlan0.
The list below is generated from the source of the latest release.
From elementum v0.1.117.
| Flag | Type | Default | Description |
|---|---|---|---|
-enableRequestTracing | bool | Enable ReqAPI tracing | |
-enableDatabaseTracing | bool | Enable database tracing | |
-enableCacheTracing | bool | Enable cache tracing | |
-disableParentProcessWatcher | bool | Disable functionality that checks whether parent process is alive | |
-disableCache | bool | Disable caching for get/set methods | |
-disableCacheGet | bool | Disable caching for get methods | |
-disableCacheSet | bool | Disable caching for set methods | |
-disableBackup | bool | Disable database backup | |
-disableLibrarySync | bool | Disable library sync (local strm updates and Trakt sync process) | |
-listenInterfaces | string, repeat the flag for several values | List of interfaces/IPs to use for libtorrent listen_interfaces | |
-outgoingInterfaces | string, repeat the flag for several values | List of interfaces/IPs to use for libtorrent outgoing_interfaces | |
-remoteHost | string | Remote host IP or Hostname (Host with plugin.video.elementum running) | |
-remotePort | int | 65221 | Remote host Port (Host with plugin.video.elementum running) |
-serverExternalIp | string | Set to external IP if you run server behind NAT (e.g. in container with NAT network), so elementum will use this IP in replies and will not try to identify Kodi's IP based on client's IP | |
-localHost | string | Local host IP (IP that would be used for running Elementum HTTP server on a local host) | |
-localPort | int | 65220 | Local host Port (Port that would be used for running Elementum HTTP server on a local host) |
-localLogin | string | Local host Login (To use for authentication from plugin.video.elementum calls) | |
-localPassword | string | Local host Password (To use for authentication from plugin.video.elementum calls) | |
-logPath | string | Log file location path | |
-configPath | string | Custom path to Elementum config (Yaml or JSON format) | |
-addonPath | string | Custom path to addon folder (where Kodi stored files, coming with addon zip) | |
-profilePath | string | Custom path to addon files folder (where Elementum will write data) | |
-tempPath | string | Custom path to temp folder (where Elementum will write temporary files) | |
-libraryPath | string | Custom path to addon library folder | |
-torrentsPath | string | Custom path to addon torrent files folder | |
-downloadsPath | string | Custom path to addon downloads folder | |
-moveMoviesPath | string | Custom path to addon folder, used for moving completed Movie downloads | |
-moveShowsPath | string | Custom path to addon folder, used for moving completed Show downloads | |
-exportConfig | string | Export current configuration, taken from Kodi into a file. Should end with json or yml suffix | |
-librarySubstitutions | string, repeat the flag for several values | Define substitutions to perform for Kodi library paths in format: from|to. Can be used to operate cross-platform paths. |
The daemon runs in server mode when -configPath or -disableParentProcessWatcher is set.
Config file
With -configPath the daemon does not ask Kodi for settings at all, it reads them from a file.
The easiest way to get such a file is to export it from a working setup:
- Configure Elementum in Kodi as usual.
- Start the daemon once with
-exportConfig=/path/to/elementum.yml(plus-remoteHostif Kodi is on another device). It reads the settings from Kodi, writes them to the file and keeps running; stop it afterwards. - Edit the file if needed and start the daemon with
-configPath=/path/to/elementum.yml.
The file has the add-on info, the platform and a settings map. Keys in settings are the
IDs from Kodi add-on settings, for example:
Flags still win over the file: e.g. -downloadsPath overrides download_path.
Client-server mode
Kodi runs the add-on in client mode and talks to a daemon running elsewhere.
On the server (where the daemon runs):
192.168.1.20 is the Kodi device. Add -configPath=... to keep settings in a file instead of reading them from Kodi.
In Kodi, in Elementum → Configure → Addon Startup:
| Setting | Value |
|---|---|
| Do not start binary (client mode) | On |
| Remote host | IP of the server |
| Remote port | 65220 (the server’s -localPort) |
| Local port | 65221 (the server’s -remotePort) |
| Remote host login / password | the server’s -localLogin / -localPassword |
Restart Kodi after changing these. Kodi must allow remote control (Settings → Services → Control, both “Allow remote control” options), so the daemon can reach Kodi’s JSON-RPC.