Configuring TeamCity to use HTTPS

How to setup TeamCity (tested with versions 8 and 9 on Windows) with https with not valid certificate.


Official TeamCity 9 documentation “Using HTTPS to access TeamCity server“.

1. Generate a key that is compatible with Java
Java has it’s own key generation tool called keytool. It is placed in jdk/bin folder.
Run it with a *.jks file as a keystore parameter. This file will contain new generated certificate.


There is a nice GUI tool called Key Store Explorer that can create and store Java keys for us.
Key Store Explorer Stored key can be verified with this tool.

2. Change TeamCity server configuration
Http(s) connection is configured via %TEAMCITY%\conf\server.xml file
Change Connector parameters and use attribute keystoreFile for file with the generated key.


3. Change TeamCity Server URL setting
Login to TeamCity web interface as an administrator.
Under Administration -> Global Settongs -> Server Administration -> Server Url
Write a new URL using https there.


Restart TeamCity server.