Skip to main content

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.
This guide covers installing Tyk AI Studio and the Edge Gateway on Linux servers using DEB or RPM packages. This is suitable for bare-metal servers, virtual machines, and cloud instances. In this architecture, AI Studio acts as the control plane (hub) and the Edge Gateway acts as the data plane (spoke), receiving configuration via gRPC.

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:
Save these values, you will need them for both the AI Studio and Edge Gateway configuration.

Part 1: Install AI Studio

Add Package Repository

Debian / Ubuntu (DEB):
RHEL / CentOS / Amazon Linux (RPM):

Install the Package

DEB:
RPM:
The package installs: The installer automatically creates a tyk user and group to run the service.

Configure AI Studio

Edit the environment configuration file:
At minimum, set these values:
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

View logs:

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):
RHEL / CentOS / Amazon Linux (RPM):

Install the Package

DEB:
RPM:
The package installs:

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.
Edit the environment configuration file:
At minimum, set these values:
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:
The default configuration is:
Expandable
Then enable it in /etc/default/tyk-microgateway:

Start Edge Gateway

Verify

View logs:
Check the AI Studio logs for a successful edge gateway connection:

Database Setup

PostgreSQL for AI Studio

AI Studio defaults to SQLite, which is fine for development. For production, use PostgreSQL:
Then set in /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:
  1. Access the application: Open your browser and navigate to http://your-server:8080
  2. Register with admin email: Use the EXACT email address you set in the ADMIN_EMAIL environment variable
  3. 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:

Firewall Configuration

Open the following ports based on your deployment: Example using ufw:
Example using 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):
Edge Gateway (/etc/default/tyk-microgateway):

Upgrading

DEB:
RPM:
Note: Package upgrades will not overwrite your configuration in /etc/default/. The services are automatically restarted after upgrade.

Troubleshooting

Common causes:
  • Missing or invalid TYK_AI_SECRET_KEY
  • Database connection failure (check DATABASE_URL)
  • Port already in use
The services run as the tyk user. Ensure data directories are owned correctly:
If SELinux is enforcing and blocking the service:
The Plugin Marketplace requires 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:
Restart the service after making this change:
  • Verify CONTROL_ENDPOINT points to the correct AI Studio host and gRPC port
  • Verify EDGE_AUTH_TOKEN matches GRPC_AUTH_TOKEN exactly
  • Verify ENCRYPTION_KEY matches MICROGATEWAY_ENCRYPTION_KEY exactly
  • Check firewall rules allow traffic on the gRPC port (default 50051)
  • Check AI Studio logs: