Introduction
The backbone of all our products is our open source Gateway. You can install our Open Source / Community Edition on the following platforms:
Read time: 10 minsInstall with Docker.

Read time: 10 minsInstall with K8s.

Read time: 10 minsInstall with Ansible.

Read time: 10 minsInstall on RHEL / CentOS.

Read time: 10 minsInstall on Debian / Ubuntu.

Read time: 10 minsVisit our Gateway GitHub Repo.
Install Tyk Gateway with Docker
We will show you two methods of installing our Community Edition Gateway on Docker. The quickest way to get started is using docker-compose. Visit our Dockerhub to view the official images.Prerequisites
The following are required for a Tyk OSS installation:- Redis - Required for all Tyk installations. Simple Redis installation instructions are included below.
- MongoDB - Required only if you chose to use the Tyk Pump with your Tyk OSS installation. Same goes with any other pump data stores you choose to use.
Steps for Installation
- Create a network
- Deploy Redis into the network, with the
6379
port open
- Next, let’s download a JSON
tyk.conf
configuration file
- Run the Gateway, mounting the conf file into the container
Test Installation
Your Tyk Gateway is now configured and ready to use. Confirm this by making a network request to the ‘hello’ endpoint:Install Tyk Gateway with Kubernetes
The main way to install the Open Source Tyk Gateway in a Kubernetes cluster is via Helm charts. We are actively working to add flexibility and more user flows to our chart. Please reach out to our teams on support or the community forum if you have questions, requests or suggestions for improvements. Get started with our Quick Start guide or go to Tyk Open Source helm chart for detailed installation instructions and configuration options.Quick Start with Helm Chart
At the end of this quick start, Tyk Gateway should be accessible through the servicegateway-svc-tyk-oss-tyk-gateway
at port 8080
.
The following guides provide instructions to install Redis and Tyk Open Source with default configurations. It is intended for a quick start only. For production, you should install and configure Redis separately.
Prerequisites
Steps for Installation
- Install Redis and Tyk
- Done!
gateway-svc-tyk-oss-tyk-gateway
at port 8080
.
You are now ready to create an API.
For the complete installation guide and configuration options, please see Tyk OSS Helm Chart.
Configure Legacy Tyk Headless Helm Chart
tyk-headless
chart is deprecated. Please use our Tyk Chart for Tyk Open Source at tyk-oss instead.We recommend all users migrate to the tyk-oss
Chart. Please review the Configuration section of the new helm chart and cross-check with your existing configurations while planning for migration.Prerequisites
The following are required for a Tyk OSS installation:- Redis - required for all the Tyk installations and must be installed in the cluster or reachable from inside K8s. You can find instructions for a simple Redis installation below.
- MongoDB/SQL - Required only if you choose to use the MongoDB/SQL Tyk pump with your Tyk OSS installation. The same goes for any other pump you choose to use.
- Helm - Tyk Helm supports the Helm 3+ version.
Steps for Installation
As well as our official OSS Helm repo, you can also find it in ArtifactHub. Open in ArtifactHub If you are interested in contributing to our charts, suggesting changes, creating PRs, or any other way, please use GitHub Tyk-helm-chart repo- Add Tyk official Helm repo
- Create a namespace for Tyk deployment
- Getting values.yaml
values.yaml
file run:
- Installing Redis
-
Recommended: via Bitnami chart - For Redis, you can use these rather excellent chart provided by Bitnami.
Copy the following commands to add it:
Please make sure you are installing Redis versions that are supported by Tyk. Please refer to Tyk docs to get a list of supported versions.
tyk-redis-master.tyk.svc.cluster.local:6379
You can update them in your local values.yaml
file under redis.addrs
and redis.pass
Alternatively, you can use --set
flag to set it in the Tyk installation. For example --set redis.pass=$REDIS_PASSWORD
For evaluation only: Use simple-redis chart
Another option for Redis, to get started quickly, is to use our simple-redis chart.
Please note that these provided charts must never be used in production or for anything
but a quick start evaluation only. Use Bitnami Redis or Official Redis Helm chart in any other case.
We provide this chart, so you can quickly deploy Tyk gateway, but it is not meant for long-term storage of data.
- Installing Tyk Open Source Gateway
Deployment
with ReplicaCount
as 1. You should not update this part because multiple instances of OSS gateways won’t sync the API Definition.
Installation Video
See our short video on how to install the Tyk Open Source Gateway. Please note that this video shows the use of the Github repository since it was recorded before the official repo was available, However, it’s very similar to the above commands.Pump Installation
By default pump installation is disabled. You can enable it by settingpump.enabled
to true
in values.yaml
file.
Alternatively, you can use --set pump.enabled=true
while doing Helm install.
Quick Pump configuration(Supported from tyk helm v0.10.0)
1. Mongo Pump
To configure the Mongo pump, make the following changes in values.yaml
file:
- Set
backend
tomongo
. - Set connection string in
mongo.mongoURL
.
values.yaml
file:
- Set
backend
topostgres
. - Set connection string parameters in
postgres
section.
Optional - Using TLS
You can turn on the TLS option under the gateway section in your localvalues.yaml
file which will make your Gateway
listen on port 443 and load up a dummy certificate.
You can set your own default certificate by replacing the file in the certs/
folder.
Optional - Mounting Files
To mount files to any of the Tyk stack components, add the following to the mounts array in the section of that component. For example:Optional - Tyk Ingress
To set up an ingress for your Tyk Gateways see our Tyk Operator GitHub repository.Install Tyk Gateway with Ansible
Prerequisites
- Ansible is required to run the following commands.
- Ensure port
8080
is open: this is used in this guide for Gateway traffic (the API traffic to be proxied).
Steps for Installation
- Clone the tyk-ansible repository
cd
into the directory
- Run the init script to initialize the environment
-
Modify the
hosts.yml
file to update SSH variables to your server(s). For more information about the host file, visit the [Ansible inventory documentation] (https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html) -
Run ansible-playbook to install
tyk-ce
-t redis
. However, Redis is a requirement and needs to be installed for the gateway to run.
Supported Distributions
Distribution | Version | Supported |
---|---|---|
Amazon Linux | 2 | ✅ |
CentOS | 8 | ✅ |
CentOS | 7 | ✅ |
Debian | 10 | ✅ |
Debian | 9 | ✅ |
RHEL | 8 | ✅ |
RHEL | 7 | ✅ |
Ubuntu | 21 | ✅ |
Ubuntu | 20 | ✅ |
Ubuntu | 18 | ✅ |
Ubuntu | 16 | ✅ |
Variables
vars/tyk.yaml
Variable | Default | Comments |
---|---|---|
secrets.APISecret | 352d20ee67be67f6340b4c0605b044b7 | API secret |
secrets.AdminSecret | 12345 | Admin secret |
redis.host | Redis server host if different than the host url | |
redis.port | 6379 | Redis server listening port |
redis.pass | Redis server password | |
redis.enableCluster | false | Enable if Redis is running in cluster mode |
redis.storage.database | 0 | Redis server database |
redis.tls | false | Enable if Redis connection is secured with SSL |
gateway.service.host | Gateway server host if different than the host url | |
gateway.service.port | 8080 | Gateway server listening port |
gateway.service.proto | http | Gateway server protocol |
gateway.service.tls | false | Set to true to enable SSL connections |
gateway.sharding.enabled | false | Set to true to enable filtering (sharding) of APIs |
gateway.sharding.tags | The tags to use when filtering (sharding) Tyk Gateway nodes. Tags are processed as OR operations. If you include a non-filter tag (e.g. an identifier such as node-id-1 , this will become available to your Dashboard analytics) |
vars/redis.yaml
Variable | Default | Comments |
---|---|---|
redis_bind_interface | 0.0.0.0 | Binding address of Redis |
Install Tyk Gateway with Ubuntu
The Tyk Gateway can be installed following different installation methods including Ansible and Shell. Please select by clicking the tab with the installation path most suitable for you.Install Tyk Gateway On Ubuntu Through Shell
Distribution | Version | Supported |
---|---|---|
Debian | 11 | ✅ |
Ubuntu | 20 | ✅ |
Ubuntu | 18 | ✅ |
Ubuntu | 16 | ✅ |
Prerequisites
- Ensure port
8080
is open: this is used in this guide for Gateway traffic (the API traffic to be proxied).
Steps for Installation
- Install Redis
- First import the public key as required by Ubuntu APT
- Run Installation Scripts via our PackageCloud Repositories
- Via the correct package for your Ubuntu version. We have packages for the following:
- Xenial
- Trusty
- Precise
- Via Quick Installation Instructions. You can use:
- Manual Instructions
- Chef
- Puppet
- CI and Build Tools
- Configure The Gateway
You need to replace
<hostname>
for --redishost=<hostname>
with your own value to run this script.--listenport=8080
: Listen on port8080
for API traffic.--redishost=<hostname>
: The hostname for Redis.--redisport=6379
: Use port6379
for Redis.--domain=""
: Do not filter domains for the Gateway, see the note on domains below for more about this.
- Starting Tyk
Install Tyk Gateway On Ubuntu Through Ansible
Supported Distributions
Distribution | Version | Supported |
---|---|---|
Debian | 11 | ✅ |
Ubuntu | 20 | ✅ |
Ubuntu | 18 | ✅ |
Ubuntu | 16 | ✅ |
Prerequisites
Before you begin the installation process, make sure you have the following:- Git - required for getting the installation files.
- Ansible is required to run the following commands.
- Ensure port
8080
is open: this is used in this guide for Gateway traffic (the API traffic to be proxied).
Steps for Installation
- Clone the tyk-ansible repository
cd
into the directory
- Run initalisation script to initialise environment
-
Modify
hosts.yml
file to update ssh variables to your server(s). You can learn more about the hosts file here -
Run ansible-playbook to install
tyk-gateway-ce
Installation flavors can be specified by using the -t at the end of the ansible-playbook command. In this case we are using:
-
tyk-gateway-ce
: Tyk Gateway with CE config
-redis
: Redis database as Tyk Gateway dependencyVariables
vars/tyk.yaml
Variable | Default | Comments |
---|---|---|
secrets.APISecret | 352d20ee67be67f6340b4c0605b044b7 | API secret |
secrets.AdminSecret | 12345 | Admin secret |
redis.host | Redis server host if different than the hosts url | |
redis.port | 6379 | Redis server listening port |
redis.pass | Redis server password | |
redis.enableCluster | false | Enable if redis is running in cluster mode |
redis.storage.database | 0 | Redis server database |
redis.tls | false | Enable if redis connection is secured with SSL |
gateway.service.host | Gateway server host if different than the hosts url | |
gateway.service.port | 8080 | Gateway server listening port |
gateway.service.proto | http | Gateway server protocol |
gateway.service.tls | false | Set to true to enable SSL connections |
gateway.sharding.enabled | false | Set to true to enable filtering (sharding) of APIs |
gateway.sharding.tags | The tags to use when filtering (sharding) Tyk Gateway nodes. Tags are processed as OR operations. If you include a non-filter tag (e.g. an identifier such as node-id-1 , this will become available to your Dashboard analytics) |
vars/redis.yaml
Variable | Default | Comments |
---|---|---|
redis_bind_interface | 0.0.0.0 | Binding address of Redis |
Install Tyk Gateway on Red Hat (RHEL / CentOS)
The Tyk Gateway can be installed following different installation methods including Shell and Ansible. Please select by clicking the tab with the installation path most suitable for you.Install Tyk Gateway Through Shell
Supported Distributions
Distribution | Version | Supported |
---|---|---|
CentOS | 8 | ✅ |
CentOS | 7 | ✅ |
RHEL | 8 | ✅ |
RHEL | 7 | ✅ |
Prerequisites
Before you begin the installation process, make sure you have the following:- Ensure port
8080
is open for Gateway traffic (the API traffic to be proxied). - The Tyk Gateway has a dependency on Redis. Follow the steps provided by Red Hat to make the installation of Redis, conducting a search for the correct version and distribution.
Steps for Installation
- Create Tyk Gateway Repository Configuration
/etc/yum.repos.d/tyk_tyk-gateway.repo
that contains the repository configuration settings for YUM repositories tyk_tyk-gateway
and tyk_tyk-gateway-source
used to download packages from the specified URLs. This includes GPG key verification and SSL settings, on a Linux system.
Make sure to replace el
and 8
in the config below with your Linux distribution and version:
- Install Tyk Gateway
You may be asked to accept the GPG key for our two repos and when the package installs, hit yes to continue.
- Start Redis
- Configuring The Gateway
Replace
<hostname>
in --redishost=<hostname>
with your own value to run this script.--listenport=8080
: Listen on port8080
for API traffic.--redishost=<hostname>
: The hostname for Redis.--redisport=6379
: Use port6379
for Redis.--domain=""
: Do not filter domains for the Gateway, see the note on domains below for more about this.
- Start the Tyk Gateway
Install Tyk Gateway Through Ansible
Supported Distributions
Distribution | Version | Supported |
---|---|---|
CentOS | 8 | ✅ |
CentOS | 7 | ✅ |
RHEL | 8 | ✅ |
RHEL | 7 | ✅ |
Prerequisites
Before you begin the installation process, make sure you have the following:- Git - required for getting the installation files.
- Ansible - required for running the commands below.
- Ensure port
8080
is open: this is used in this guide for Gateway traffic (the API traffic to be proxied).
Steps for Installation
- Clone the tyk-ansible repository
cd
into the directory
- Run the initalisation script to initialise your environment
-
Modify the
hosts.yml
file to update ssh variables to your server(s). You can learn more about the hosts file here -
Run ansible-playbook to install
tyk-gateway-ce
Installation flavors can be specified by using the -t at the end of the ansible-playbook command. In this case we are using:
-
tyk-gateway-ce
: Tyk Gateway with CE config
-redis
: Redis database as Tyk Gateway dependencyVariables
vars/tyk.yaml
Variable | Default | Comments |
---|---|---|
secrets.APISecret | 352d20ee67be67f6340b4c0605b044b7 | API secret |
secrets.AdminSecret | 12345 | Admin secret |
redis.host | Redis server host if different than the hosts url | |
redis.port | 6379 | Redis server listening port |
redis.pass | Redis server password | |
redis.enableCluster | false | Enable if redis is running in cluster mode |
redis.storage.database | 0 | Redis server database |
redis.tls | false | Enable if redis connection is secured with SSL |
gateway.service.host | Gateway server host if different than the hosts url | |
gateway.service.port | 8080 | Gateway server listening port |
gateway.service.proto | http | Gateway server protocol |
gateway.service.tls | false | Set to true to enable SSL connections |
gateway.sharding.enabled | false | Set to true to enable filtering (sharding) of APIs |
gateway.sharding.tags | The tags to use when filtering (sharding) Tyk Gateway nodes. Tags are processed as OR operations. If you include a non-filter tag (e.g. an identifier such as node-id-1 , this will become available to your Dashboard analytics) |
vars/redis.yaml
Variable | Default | Comments |
---|---|---|
redis_bind_interface | 0.0.0.0 | Binding address of Redis |