Madsonic at this point appears to be abandonware. You might consider moving off to a newer implementation. Both below suggestions run on multiple platforms, I'm a Windows guy so some of my supplemental info isn't as useful to non-Windows users.
If you're looking for a very lateral move, consider Airsonic Advanced https://github.com/airsonic-advanced/airsonic-advanced
- It is in active development with frequent snapshot updates https://github.com/airsonic-advanced/airsonic-advanced/releases
. Same feature set as Madsonic (API, Sonos, etc.) with updated code. As it is open source, you also get most of the features Madsonic Premium gives you, but for free. You would need to to come up with your own DDNS solution. Minimal effort for installation (latest Java installed, then a command line shortcut to the war file - upgrades even easier with just a fast war file change).
If you're really more API focused, and looking just for a music streaming service, you might consider moving off the Subsonic family of servers altogether. Check out Navidrome https://www.navidrome.org/
. That product is primarily to supply the API with a completely new back-end, and refocuses to just support for audio (no video, podcast, internet radio, etc.). There is not yet built in support for Sonos, but you can find easy linking with something like Bonob https://github.com/simojenki/bonob
. As with Airsonic Advanced, no subscription or fee to access the API. Navidrome does have a simplified web UI if desired.
Both products support running as a service with something like NSSM https://nssm.cc/
and IIS works great as a reverse proxy if you wish to run them as SSL.