Documentation Documentation

On Ubuntu

Install Tyk API Gateway on Ubuntu

Installing Tyk on Ubuntu is very straightforward, follow the guides and tutorials in this section to have Tyk up and running in no time.

NOTE: For a production environment, we recommend that the Gateway, Dashboard and Pump are installed on separate machines. If installing multiple Gateways, you should install each on a separate machine. For more information on deploying to a production environment, see here.


Before installing the Tyk components in the order below, you need to install firstly MongoDb, then Redis.

Install MongoDb 3.2

First import the public key as required by Ubuntu APT

sudo apt-key adv --keyserver hkp:// --recv EA312927

Then create a MongoDb source list file

On Ubuntu Trusty 14.04

echo "deb trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

On Ubuntu Xenial 16.04

echo "deb xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list

Reload the package database

sudo apt-get update

Then run the install script.

sudo apt-get install -y mongodb-org

Finally, start the mongod service - then ensure all is running.

On Ubuntu Trusty 14.04

# sudo service mongod start
# sudo service mongod status
mongod start/running, process 1904

On Ubuntu Xenial 16.04

# sudo service mongod start
# sudo service mongod status
● mongod.service - High-performance, schema-free document-oriented database
   Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-04-27 17:47:45 UTC; 5s ago
 Main PID: 1751 (mongod)
    Tasks: 23
   Memory: 168.7M
      CPU: 1.416s
   CGroup: /system.slice/mongod.service
           └─1751 /usr/bin/mongod --config /etc/mongod.conf

Apr 27 17:47:45 ubuntu-s-1vcpu-2gb-lon1-01 systemd[1]: Started High-performance, schema-free document-o

Install Redis

sudo apt-get install -y redis-server

We then recommend installing Tyk in the following order: