How to install Team City 10.x on ubuntu 16.X

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

Add a reference to the Oracle PPA then update your package repository


Install Oracle JDK 8


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 Postgres SQL, Install Postgres SQL 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


We will install TeamCity to the opt so we need to move the TeamCity Dirctory to /opt/ and set permissions to the user running the TeamCity Applicaiton.


Configure TeamCity to start automatically with the correct use by creating a script to start and stop TeamCity. We’ll create a simple bash script using the nano text editor


If you are going to running the team city service under username other than the one you are currently installing it with then you will need to replace $user in the code snippet with that username.

Copy and paste the following code into the editor or clone to gist from Github


Change the permissions required to execute the script and add it to the starup to ensure Team City is started whenever the the server is start/restart


Download database driver

The database drivers are usually not included in the TeamCity set up files. We will need to download the PostGres Driver seperately and place them in the /opt/JetBrains/TeamCity/.BuildServer/lib/jdbc folder.

Change into the directory


Download the driver


We are now ready to start Team City and begin the configuratio in the Team City UI


Navigate to http://[Server name or IP]:8111 and verify that you see “TeamCity First Start” page.

Congratulations TeamCity is installed continue the steps on the web page to configure it.


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

Gary Woodfine

Freelance Full Stack Developer at
Helps businesses by improving their technical proficiencies and eliminating waste from the software development pipelines.

A unique background as business owner, marketing, software development and business development ensures that he can offer the optimum business consultancy services across a wide spectrum of business challenges.

Latest posts by Gary Woodfine (see all)