How to upgrade to macOS Server from server running OS X 10.9.5 and OS X Server 3.2.2
I successfully could upgrade server 3.2.2 (osx10.9.5) to macos server 5.2 (sierra) on my mac mini by following steps.


Install Yosemite to your mac.
Purchase Server 5.2 with your Apple ID. You can buy it on the mac 10.11.6 or later.
Open App Store. Select Server 5.2 and Press INSTALL button. The operation leads to install Server 5.0.15 !!!
Launching Server 5.0.15 will proceed the migration process.
And then install Sierra and Server5.2.


More info in my weblog below (in Japanese...)
http://memorandums.hatenablog.com/entry/2016/10/26/220901