We have a Linux server with Samba. Kodi connects to it beautifully. Even my kids can use it fine. Combine with VM that runs a VPN and deluge for optimal fun. Add a few simple IPTables rules to prevent traffic from leaking except over your VPN to calm down annoying Torrent monitors that your ISP might use. Been working for years. We vastly prefer to pay for content, but we ancient DVD rips and such that are not amenable to the modern media tech stack.