How to install Team City on Ubuntu Server

In any software development project a Continuous Integration / Continuous Deployment DevOps environment is essential. A recent project I elected to make use of Team City & Octopus Deploy all on an Azure stack.

In this post I twill detail the steps on how to install and configure Team City 10.x on a Ubuntu 16.X server.

Install Java

Team City is a Java Based application and therefore needs the JRE & JDK installed with the JAVA_HOME environment variable pointing to the Java installation directory. I am installing on a fresh install of ubuntu 16.X and Java is not installed by default.

In order to Install Java we will need to SSH on to the box and install Java Via via apt.

To install Java on your ubuntu server follow these steps

Open a Terminal window , in my case from a ubuntu box CTRL + ALT + T

Install default Java JDK


Check your Java Version


The version information returned should be similar too:


Install Database software

Team City is able to store TeamCity stores build history, users, build results and some run time data to a number of Relation Database Management Systems (RDBMS) including

  • Postrgre SQL
  • MySQL
  • MS SQL
  • Oracle
  • Default Internal DB

In my particular case I make use of MySQL, how to install MySQL on Ubuntu


Never use internal HSQLDB database for production TeamCity instances.

Download & Install Team city

Download the latest TeamCity for linux from Jetbrains


After the download completes unpack the file


Install Nginx

We are installing TeamCity on a headless server via SSH so we will not be able to access TeamCity configuration screens using a browser on my server and navigating to http://localhost:8111.

We will therefore need to install nginx so we will be able to access the configuration screens.

Installing nginx is straight forward all we need to do is execute the command below


Once nginx installed we can create a new site, which we will call teamcity


Paste following configuration code into the file


Save the file by using CTRL + X then we need to create a symlink to the sites-enabled folder


What are SymLinks ?

Symbolic links are basically advanced shortcuts. There are two type of symbolic links: Hard and soft.

Soft symbolic links work similarly to a standard shortcut. When you open a soft link to a folder, you will be redirected to the folder where the files are stored. 
Hard Symbolic Link makes it appear as though the file or folder actually exists at the location of the symbolic link, and your applications won’t know any better. 

I generally delete the default site that nginx creates and also the symlink


We can now restart nginx to ensure it picks up the new information


Start Team City Service

We are now ready to start TeamCity and now all we have to do is


You should now be able to browse to your server location and continue to configure and Install TeamCity using the Web Application frontend


Team City is a vary easy to use to and configure CI/CD (Continuous Integration/Continuous Deployment) platform. A Freemium license for up to 20 build configurations and 3 free Build Agent licenses is available.

It is possible to use Team City to build Microsoft .net core applications on a Linux Server and all that is required is the basic configuration. Once the basic configuration is complete you can move on to either configuring a Windows Build Agent or Configure Ubuntu headless server 16.x as TeamCity Build Agent to use Cake

Latest posts by Gary Woodfine (see all)