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 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:
The installer automatically creates a
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: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 you start the services, create the first user:- Open
http://your-server:8080in your browser. - Select Sign up, then enter a name, an email address, and a password.
- Log in with the new account.
The first user who registers becomes the administrator. You can use any email address. Other users must verify their email address before they can log in, so configure SMTP before you invite them. AI Studio ignores the deprecated
ADMIN_EMAIL variable.Shared Secrets Reference
When running AI Studio with an Edge Gateway, these values must match:Firewall Configuration
Open the following ports based on your deployment:
Example using
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: