Skip to main content
EditionDeployment Type
EnterpriseSelf-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

Instructions

Step 1: Clone and configure

  1. Clone the tyk-install repository and navigate to the Docker self-managed directory:
    git clone https://github.com/TykTechnologies/tyk-install
    cd tyk-install/docker/self-managed
    
  2. Copy the example environment file and add your license keys:
    cp .env.example .env
    
  3. Open .env and set your license keys:
    TYK_LICENSE_KEY=<your-dashboard-license>
    TYK_PORTAL_LICENSE=<your-portal-license>
    
    Ensure there are no spaces around the = sign. Spaces will cause the configuration to fail silently.
    # Correct
    TYK_LICENSE_KEY=eyJhbGciOiJSUzI1NiIsInR5cCI6...
    
    # Wrong — will fail
    TYK_LICENSE_KEY = eyJhbGciOiJSUzI1NiIsInR5cCI6...
    

Step 2: Start services

docker compose up -d
Wait for all health checks to pass (approximately 30–60 seconds), then verify all containers are running:
docker compose ps
Expected containers:
ContainerPortStatus
tyk-dashboard3000Running
tyk-gateway8080Running
tyk-pumpN/ARunning
tyk-portal3001Running
tyk-redis6379Running
tyk-postgres5432Running
If any container is not running, check the logs:
docker compose logs -f

Step 3: Bootstrap the stack

Choose one of the following options to complete the initial setup. Use the Bootstrap Utility from the repository to automatically create an organization, admin user, test API, policy, API key, and Portal configuration.
  1. Navigate to the bootstrap utility directory and create an .env file with your license key:
    cd tyk-install/utils/bootstrap
    echo "TYK_LICENSE_KEY=<your-dashboard-license>" > .env
    
  2. Run the bootstrap:
    docker compose --profile tools run --rm tyk-bootstrap
    
Credentials are printed to the terminal on completion.

Option B: Manual bootstrap

  1. Open http://localhost:3000 in your browser.
  2. 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.
  3. Click Bootstrap to save.
  4. Log in to the Tyk Dashboard at http://localhost:3000 with the credentials you just created.
  5. Bootstrap the Developer Portal by calling its API:
    curl "http://localhost:3001/portal-api/bootstrap" \
      -H 'Content-Type: application/json' \
      -d '{
        "username": "portal-admin@example.com",
        "password": "portalpass123",
        "first_name": "Portal",
        "last_name": "Admin"
      }'
    
    Save the api_token from the response — you will need it to configure the Portal provider.

Step 4: Verify the installation

Test that all components are responding:
# Gateway
curl http://localhost:8080/hello

# Dashboard
curl http://localhost:3000/hello

# Portal
curl http://localhost:3001/ready

Access URLs

ServiceURLDescription
Dashboardhttp://localhost:3000Admin UI
Gatewayhttp://localhost:8080API Gateway
Developer Portalhttp://localhost:3001Developer Portal
Redislocalhost:6379Cache and session storage
PostgreSQLlocalhost:5432Analytics and config database

Configuration

The following environment files control each component’s settings:
FilePurpose
.envLicense keys and component versions
confs/tyk.envGateway configuration
confs/tyk_analytics.envDashboard configuration
confs/pump.envPump configuration
confs/portal.envDeveloper Portal configuration
For production deployments, review the Planning for Production guide and apply the recommendations noted in the config file comments.

Cleanup

Stop all services and remove volumes:
docker compose down -v
To also remove orphaned networks:
docker compose down -v --remove-orphans
docker network prune -f