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

The analytics pulse sends the analytics, proxy logs, and budget spend of the Edge Gateway to AI Studio. Without it, AI Studio does not see edge traffic, and budgets and budget alerts do not count edge spend. From v2.2.0, new installations enable the analytics pulse. /etc/default/tyk-microgateway sets PLUGINS_CONFIG_PATH=/opt/tyk-microgateway/config/analytics-pulse-config.yaml. The package installs that file as a configuration file, so upgrades keep your changes. The default configuration is:
Expandable
Upgrading from a package before 2.2? Package upgrades keep your existing /etc/default/tyk-microgateway. In versions before 2.2, this file had PLUGINS_CONFIG_PATH commented out. If the line is not in your file, add it:
If you do not add it, AI Studio receives no analytics or spend data from this Edge Gateway. To find a missing or unreadable file, search the Edge Gateway log for startup path.

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. From v2.2.0, the database uses WAL mode, so the data directory must be writable for the -wal and -shm files.

First User Registration

After you start the services, create the first user:
  1. Open http://your-server:8080 in your browser.
  2. Select Sign up, then enter a name, an email address, and a password.
  3. 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:
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.
When you upgrade an Edge Gateway from a version before 2.2, add PLUGINS_CONFIG_PATH to /etc/default/tyk-microgateway. Refer to Configure Analytics Pulse.

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: