Kodi has a built-in UPnP A/V media server (UPnP-server). Originally added to help share files to other Kodi instances as a UPnP media source, Kodi's UPnP server also enables you to share media with other UPnP-clients on your local network. Kodi's UPnP server can share files that are normally only locally accessible on the Host Kodi device, as well as metadata (summaries, cover art, etc) to supporting clients. As of v12, the UPnP server can also share video files that are not scanned into the library, however music still requires being added to the library to be shared.
UPnP server settings
To turn on the UPnP server in Kodi, go toand enable "Share video and music libraries through UPnP".
Kodi to Kodi sharing
see|HOW-TO:Share libraries using UPnP