To use Xcode server, you have to download and install macOS Server (formerly known as OS X Server) from the App Store on a Mac.
Note
Installing is straightforward, and you can find detailed instructions at https://developer.apple.com/library/prerelease/content/documentation/IDEs/Conceptual/xcode_guide-continuous_integration/adopt_continuous_integration.html - //apple_ref/doc/uid/TP40013292-CH3-SW1.
The Xcode Server needs a code repository to do work and is compatible with either Git or Subversion. Any bots that you create will need access to a repository. A bot will try to connect to a repository via SSH or HTTPS. Apple does a really good job of describing your repository setup options.
Note
You can refer to the following section of their setup guide for step-by-step instructions on how to configure your repos to give access to Xcode Server and your bot: https://developer.apple.com/library/prerelease/content/documentation/IDEs/Conceptual...