Availability
This guide focuses on the Enterprise Edition of Tyk AI Studio. For the Community Edition, please refer to the Tyk AI Studio GitHub repository.The Community Edition uses different Docker images (
tykio/tyk-ai-studio and tykio/tyk-microgateway) and does not require a license key.Prerequisites
- Docker Engine 20.10+ and Docker Compose v2
- At least 4 GB RAM available
- A Tyk AI License key (contact support@tyk.io or your account manager to obtain)
Running on Podman, containerd, or another container runtime? See Container Runtimes.
Generate Secrets
Before starting, generate the required secret keys. These will be used in the configuration files to secure communication and encrypt data:Instructions
1. Create Directory Structure
Create a new directory for your project and set up the required folders:2. Create compose.yaml
Create a compose.yaml file with the following content. This configuration sets up AI Studio, the Edge Gateway, and a PostgreSQL database.
Expandable
3. Create confs/studio.env
Create the AI Studio configuration file. Replace the CHANGE-ME values with the secrets you generated earlier, and add your Tyk AI License key.
Expandable
4. Create confs/microgateway.env
Create the Edge Gateway configuration file. Ensure the security tokens match the ones used in studio.env.
Expandable
5. Create confs/analytics-pulse.yaml
This configures the Edge Gateway to send analytics data back to the AI Studio control plane:
Expandable
6. Start Services
Important: Make sure all configuration files (
studio.env, microgateway.env, analytics-pulse.yaml) exist before running docker compose up. If a file-mounted volume target does not exist, Docker will create it as a directory, causing errors.7. Verify
Check that all services are running correctly:Accessing the Portal
Once the services are running, you can access the different components:- AI Studio UI:
http://localhost:8080 - Embedded Gateway:
http://localhost:9090 - Edge Gateway:
http://localhost:9091
First User Registration
After starting the service, you need to create your first admin user:- Access the application: Open your browser and navigate to
http://localhost:8080 - Register with admin email: Use the EXACT email address you set in the
ADMIN_EMAILenvironment variable instudio.env. - Complete registration: The first user who registers with the admin email will automatically become the administrator.
Important: The first user registration must use the same email address specified in the
ADMIN_EMAIL environment variable. This user will have full administrative privileges.Shared Secrets Reference
These values must match between the AI Studio and Edge Gateway configuration files:Port Reference
Using an External Database
To use an existing PostgreSQL instance instead of the bundled container, remove thepostgres service and pgdata volume from compose.yaml, then update studio.env:
Upgrading
To upgrade to a newer version:Troubleshooting
Services fail to start
Services fail to start
Check the logs for specific services:
Edge Gateway cannot connect to AI Studio
Edge Gateway cannot connect to AI Studio
- Verify
CONTROL_ENDPOINTinmicrogateway.envmatches the AI Studio service name and gRPC port (e.g.,tyk-ai-studio:50051) - Verify
EDGE_AUTH_TOKENmatchesGRPC_AUTH_TOKEN - Verify
ENCRYPTION_KEYmatchesMICROGATEWAY_ENCRYPTION_KEY - Check that
GATEWAY_MODE=controlis set instudio.env
Database connection errors
Database connection errors
- Ensure the
postgrescontainer is healthy:docker compose ps - Verify
DATABASE_URLcredentials match thePOSTGRES_USER/POSTGRES_PASSWORDincompose.yaml - For external databases, verify network connectivity and SSL mode
Marketplace page is empty
Marketplace page is empty
The Plugin Marketplace requires Restart AI Studio after making this change.The marketplace is enabled by default (
AI_STUDIO_OCI_CACHE_DIR to be set. Without it, the marketplace service does not start and no plugins will appear. Add this to your studio.env:MARKETPLACE_ENABLED=true), but it will not function without the OCI cache directory configured.Port conflicts
Port conflicts
If ports 8080, 9090, or 9091 are already in use, change the left-hand side of the port mapping in Then update
compose.yaml:SITE_URL in studio.env accordingly.