They're both powerful hardware, you need to provide a little more detail regarding your plans for your setup.
The i9-9900K still has slightly better single-threaded performance than the 3900X, so if you only plan on hosting a couple of servers, I'd suggest going with that. The 3900X on the other hand has a lot more threads, so it'd be better if you plan on hosting a larger number of servers or applications.