Availability
| Edition | Deployment Type |
|---|---|
| Enterprise | Self-Managed, Hybrid |
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 packages (
tyk-ai-studio and tyk-microgateway) and does not require a license key.Prerequisites
- OS: Ubuntu/Debian (DEB) or RHEL 7-9/CentOS 7-9/Amazon Linux 2/2023 (RPM)
-
Architecture: amd64 (x86_64), arm64 (aarch64), or s390x
RPM packages are published for EL 7, 8, 9 and Amazon Linux 2/2023. If you are running a different RPM-based distribution (e.g. CentOS Stream 10, Fedora), you can edit the repo file to use the closest supported version:
- PostgreSQL 14+ (for AI Studio production use; SQLite is the default for development)
- systemd (for service management)
- cosign (for plugin signature verification in the Marketplace, install instructions)
- Root or sudo access
- A Tyk AI License key (contact support@tyk.io or your account manager to obtain)
Generate Secrets
Before configuring, generate the required secret keys:Part 1: Install AI Studio
Add Package Repository
Debian / Ubuntu (DEB):Install the Package
DEB:| Path | Description |
|---|---|
/opt/tyk-ai-studio/tyk-ai-studio | Application binary |
/opt/tyk-ai-studio/tyk-ai-studio.conf.example | Example configuration |
/etc/default/tyk-ai-studio | Environment configuration (systemd) |
/lib/systemd/system/tyk-ai-studio.service | Systemd service unit |
tyk user and group to run the service.
Configure AI Studio
Edit the environment configuration file:Expandable
Note:
DEVMODE=true disables secure cookie flags so that login works over HTTP. For production deployments with HTTPS, remove this setting.Start AI Studio
Verify
Part 2: Install Edge Gateway
The Edge Gateway is the data plane component for hub-spoke deployments. It connects to AI Studio via gRPC to receive configuration and processes AI requests locally. Skip this section if you’re using AI Studio in standalone mode with its embedded gateway.Add Package Repository
If you haven’t already added the Enterprise repository in Part 1, add it now: Debian / Ubuntu (DEB):Install the Package
DEB:| Path | Description |
|---|---|
/opt/tyk-microgateway/tyk-microgateway | Server binary |
/opt/tyk-microgateway/mgw | CLI tool |
/opt/tyk-microgateway/data/ | Data directory (SQLite database) |
/opt/tyk-microgateway/examples/analytics-pulse-config.yaml | Analytics pulse example config |
/etc/default/tyk-microgateway | Environment configuration (systemd) |
/lib/systemd/system/tyk-microgateway.service | Systemd service unit |
Configure Edge Gateway
Important: If you are installing the Edge Gateway on the same machine as AI Studio, you must change the
PORT to something other than 8080 (e.g. 9091) to avoid a port conflict. AI Studio already listens on port 8080.Expandable
Configure Analytics Pulse
To send analytics data from the Edge Gateway back to the AI Studio control plane, configure the analytics pulse plugin. Copy the example config:Expandable
/etc/default/tyk-microgateway:
Start Edge Gateway
Verify
Database Setup
PostgreSQL for AI Studio
AI Studio defaults to SQLite, which is fine for development. For production, use PostgreSQL:/etc/default/tyk-ai-studio:
SQLite for Edge Gateway
The Edge Gateway uses SQLite by default, stored at/opt/tyk-microgateway/data/microgateway.db. No additional setup is required.
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://your-server:8080 - Register with admin email: Use the EXACT email address you set in the
ADMIN_EMAILenvironment variable - 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
When running AI Studio with an Edge Gateway, these values must match:| AI Studio Variable | Edge Gateway Variable | Purpose |
|---|---|---|
GRPC_AUTH_TOKEN | EDGE_AUTH_TOKEN | Authenticates the gRPC connection |
MICROGATEWAY_ENCRYPTION_KEY | ENCRYPTION_KEY | Encrypts synced configuration data |
TYK_AI_LICENSE | TYK_AI_LICENSE | Enterprise license |
Firewall Configuration
Open the following ports based on your deployment:| Port | Component | Required |
|---|---|---|
| 8080 | AI Studio (API + UI) | Always |
| 9090 | AI Studio (embedded gateway) | Standalone mode |
| 50051 | AI Studio (gRPC control server) | Hub-spoke mode |
| 9091 | Edge Gateway (proxy API) | Hub-spoke mode (on edge gateway host) |
ufw:
firewalld:
TLS Configuration (Production)
For production deployments, enable TLS on the gRPC connection between AI Studio and the Edge Gateway. AI Studio (/etc/default/tyk-ai-studio):
/etc/default/tyk-microgateway):
Upgrading
DEB:Note: Package upgrades will not overwrite your configuration in
/etc/default/. The services are automatically restarted after upgrade.Troubleshooting
Service fails to start
Service fails to start
- Missing or invalid
TYK_AI_SECRET_KEY - Database connection failure (check
DATABASE_URL) - Port already in use
Permission errors
Permission errors
The services run as the
tyk user. Ensure data directories are owned correctly:SELinux issues (RHEL/CentOS)
SELinux issues (RHEL/CentOS)
If SELinux is enforcing and blocking the service:
Marketplace page is empty
Marketplace page is empty
The Plugin Marketplace requires Restart the service after making this change:
AI_STUDIO_OCI_CACHE_DIR to be set. Without it, the marketplace service does not start and no plugins will appear.Add this to /etc/default/tyk-ai-studio:Edge Gateway cannot connect to AI Studio
Edge Gateway cannot connect to AI Studio
- Verify
CONTROL_ENDPOINTpoints to the correct AI Studio host and gRPC port - Verify
EDGE_AUTH_TOKENmatchesGRPC_AUTH_TOKENexactly - Verify
ENCRYPTION_KEYmatchesMICROGATEWAY_ENCRYPTION_KEYexactly - Check firewall rules allow traffic on the gRPC port (default
50051) - Check AI Studio logs: