| Edition | Deployment Type |
|---|---|
| Enterprise | Self-Managed, Hybrid |
Running on Podman, containerd, or another container runtime? See Container Runtimes.
From v5.5.0 onwards, Docker images are based on distroless. You cannot obtain a shell with
docker run --rm -it tykio/tyk-gateway:v5.5.0 sh. Use dive or Docker Desktop to inspect images.Prerequisites
- Docker Engine 24.0 or later
- Docker Compose v2.20 or later
- Tyk license keys — Dashboard license and Portal license (optional). Get a free trial at tyk.io/self-managed-trial.
- 4GB RAM or more available
Instructions
Step 1: Clone and configure
-
Clone the tyk-install repository and navigate to the Docker self-managed directory:
-
Copy the example environment file and add your license keys:
-
Open
.envand set your license keys:
Step 2: Start services
| Container | Port | Status |
|---|---|---|
tyk-dashboard | 3000 | Running |
tyk-gateway | 8080 | Running |
tyk-pump | N/A | Running |
tyk-portal | 3001 | Running |
tyk-redis | 6379 | Running |
tyk-postgres | 5432 | Running |
Step 3: Bootstrap the stack
Choose one of the following options to complete the initial setup.Option A: Automated bootstrap (recommended)
Use the Bootstrap Utility from the repository to automatically create an organization, admin user, test API, policy, API key, and Portal configuration.-
Navigate to the bootstrap utility directory and create an
.envfile with your license key: -
Run the bootstrap:
Option B: Manual bootstrap
-
Open
http://localhost:3000in your browser. -
Fill in the bootstrap form:
- Organization Name
- Admin Email
- Admin Password
Use a combination of alphanumeric characters with both upper and lower case letters for your password. - Click Bootstrap to save.
-
Log in to the Tyk Dashboard at
http://localhost:3000with the credentials you just created. -
Bootstrap the Developer Portal by calling its API:
Save the
api_tokenfrom the response — you will need it to configure the Portal provider.
Step 4: Verify the installation
Test that all components are responding:Access URLs
| Service | URL | Description |
|---|---|---|
| Dashboard | http://localhost:3000 | Admin UI |
| Gateway | http://localhost:8080 | API Gateway |
| Developer Portal | http://localhost:3001 | Developer Portal |
| Redis | localhost:6379 | Cache and session storage |
| PostgreSQL | localhost:5432 | Analytics and config database |
Configuration
The following environment files control each component’s settings:| File | Purpose |
|---|---|
.env | License keys and component versions |
confs/tyk.env | Gateway configuration |
confs/tyk_analytics.env | Dashboard configuration |
confs/pump.env | Pump configuration |
confs/portal.env | Developer Portal configuration |