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.

Affiliate Disclaimer

Disclosure: Please note that some of the links included in the blog posts are affiliate links, which means I will earn a commission if you decide to make a purchase.

I only include affiliate links to products, services and companies that I have personal experience and have actually used. I only recommend them because they are helpful and useful, not because of the small commissions I make if you decide to buy something.

Please do not spend any money on these products unless you feel they are relevant, suitable and will help you achieve your goals.

Buying anyone of these products and the commisions earned will not make me an overnite multi millionaire, but they will help to cover the hosting costs and compensate for the countless hours and effort I put in to create meaningful and valuable free content I provide to help others succeed.

You've also undoubtedly noticed that I also use various advertising networks - unless of of course you're using an Ad blocker, this is also an attempt to reduce my monthly deficit I experience in providing free relevant, valuable and on occassion insightful content for the benefit of others.

I only really make some money if people click on the ads, unless of course you consider 1c per 1000 impressions real money!

Bear in mind just how many impressions I need to make before I can cover my £20 hosting costs a month!

If you are using an adblocker and guilt stricken you can of course donate using any of the buttons below, but I won't be holding my breath.

Buy me a coffeeBuy me a coffee