====== Replicate Kodi Instance ====== ===== Overview ===== To replicate a Kodi instance to a new machine, it is only necessary to copy three directories from the original machine to the new one. These directories are **addons**, **media**, and **userdata**, and are stored under the Kodi directory. However, this directory is different depending on the OS they are installed in. - LibreELEC - /storage/.kodi/ - Windows - C:\Users\USERNAME\AppData\Roaming\Kodi\ - USERNAME is the user who will run kodi - Linux - ~/.kodi/ - ~ indicates the home directory of the user who will run kodi - MacOS - /Users/USERNAME/Library/Application Support/Kodi/ (hidden by default) - USERNAME is the user who will run kodi - IOS - /private/var/mobile/Library/Preferences/Kodi/ - Android - Android/data/org.xbmc.kodi/files/.kodi/ So, to copy the configuration from a LibreELEC instance to a Debian Linux derivative, you would copy **from** /storage/kodi on the LibreELEC machine to the ~/.kodi directory on the Linux machine. ===== Steps ===== Steps to take are: - On target machine (new machine) - Install kodi on the new machine - Run kodi at least one time (to generate path) - Shut down kodi - find and rename the kodi configuration directory - On source machine (old machine) - Shut down kodi, if possible - copy **addons**, **media**, and **userdata** to some media, or copy directly to the new machine - On target machine - Create directory **.kodi** to replace the one you renamed - copy the three directories above to that subdirectory - change the ownership of the entire tree (.kodi and all directories/files under it) to the user who will be running the program - look at the old, renamed directory for the correct ownership - Start kodi and verify it runs. ===== Example ===== Assume copying from a LibreELEC install to a Devuan Linux install. On the Devuan machine, the user to run will be named //acme//. You are logged into the devuan machine and able to access the LibreELEC machine via ssh. The name on the LibreELEC machine is //libreelec//. On the target machine, kodi has been run once, then shut down. LibreELECT makes it difficult to shut down kodi, so we just hope for the best. cd ~acme mv ~acme/.kodi ~acme/.kodi.old mkdir ~acme/.kodi scp -r libreelec:/storage/.kodi/addons ~acme/.kodi scp -r libreelec:/storage/.kodi/userdata ~acme/.kodi scp -r libreelec:/storage/.kodi/media ~acme/.kodi chown -fR acme:users ~acme/.kodi ===== Links ===== * https://www.reddit.com/r/kodi/comments/18xlzx9/migrate_kodi_settings_sources_config_addons_and/