|You are viewing documentation of TeamCity 5.x, which is not the most recent released version of TeamCity. Please refer to the listing to choose another version.|
Installing and Configuring the TeamCity server
This page covers:
Installing the TeamCity Server
After you obtained the TeamCity installation package, proceed with corresponding installation intructions:
If you cannot access TeamCity web UI after successful installation, please refer to #Troubleshooting TeamCity Installation Issues section.
Installing TeamCity via Windows installation package
For the Windows platform, run the executable file and follow the installation instructions. You have options to install the TeamCity web server and one build agent that can be run as a Windows service.
When prompted, specify the server configuration directory (aka TeamCity Data Directory). Make sure the path to this directory contains latin charachters only, if you're planning to use default HSQLDB database.
If you opted to install the services, use standard Windows
If you did not change the default port (80) during installation, the TeamCity web UI can be accessed via "http://localhost/" address in a web browser. Please note that 80 port can be used by other programs (e.g. Skype, or other web servers like IIS). In this case you can specify another port during the installation and use "http://localhost:<port>/" address in the browser.
Installing TeamCity bundled with Tomcat servlet container (Linux, Mac OS X, Windows)
Please review software requirements before the installation.
Ensure you have JRE or JDK installed and JAVA_HOME environment variable is pointing to Java installation directory. Latest Sun Java 1.6 update is recommended.
Starting TeamCity server
If TeamCity server is installed as Windows server, follow the usual procedure of starting and stopping services.
No matter how TeamCity is installed, TeamCity server can be started and stopped by the scripts provided in the
To start/stop TeamCity server and one default agent at the same time, use the
By default, TeamCity runs on http://localhost:8111/ and has one registered build agent that runs on the same computer.
See below for changing the server port.
If you need to pass special properties to the server, please refer to TeamCity Startup Properties.
Installing TeamCity into Existing J2EE Container
Up to date values and
TeamCity J2EE container distribution is tested to work with Tomcat 6.x servlet container. (Tomcat version 5.5.20 is not compatible with TeamCity because this version of Tomcat contains a number of errors)
Troubleshooting TeamCity Installation
Upon successful installation, TeamCity server web UI can be accessed via a web browser.
If TeamCity web UI cannot be accessed, please check:
One of the most common issues with the server installation is using a port that is already used by another program. See
Changing Server Port
If you use TeamCity server Windows installer you can set the port to use during installation.
Use the following instructions to change the port if you use .tar.gz distribution
To change the server's port, in the
To apply changes, you should restart the server.
If you run another Tomcat server on the same machine, you might need to also change other Tomcat server service ports (search for "port=" in the server.xml file).
TeamCity server is a web application that runs in an J2EE application server (a JVM application). A JVM application requires a JRE installation to run.
TeamCity (both server and agent) requires JRE 1.5 (or later) to operate. Using Sun JSDK 1.6 is recommended (download page). Please also note that TeamCity agent needs JDK (not JRE) to operate properly.
The necessary steps to prepare Java installation depends on the distribution used.
Setting Up Memory settings for TeamCity Server
As a JVM application, TeamCity utilizes only the memory devoted to the JVM.
If you run TeamCity via
32 bit JVM can use up to 1.3Gb memory. If more memory is necessary, 64 bit JVM should be used assigning not less then 2.5Gb. It's highly unlikely that you will need to dedicate more then 4Gb of memory to the TeamCity process.
A rule of thumb is that 64 bit JVM should be assigned twice as much memory as 32 bit for the same application. If you switch to 64 bit JVM please make sure you adjust the memory settings (both
Using 64 bit Java to Run TeamCity Server
TeamCity can run under both 32 and 64 bit JVM.
If you choose to use x64 JVM please note that the memory usage is almost doubled when switching from 32 to 64 bit JVM, so please make sure you specify at least twice as much memory as for 32 bit JVM, see #Setting Up Memory settings for TeamCity Server.
Configuring the TeamCity Server
Configuring TeamCity Data Directory
The default placement of the TeamCity data directory can be changed. See corresponding section: TeamCity data directory for details.
Editing Server Configuration
After successful server start, any TeamCity page request will redirect to prompt for the server administrator username and password. Please make sure that no one can access the server pages until the administrator account is setup.
After administration account setup you may begin to create Project and Build Configurations in the TeamCity server. You may also want to configure the following settings in the Server Administration section: