Deploy Tyk Gateway

Tyk Gateway 5.15: open-source API gateway with keys and rate limits.

Deploy Tyk Gateway

Just deployed

/data

/opt/tyk-gateway/apps

Deploy and Host Tyk Gateway on Railway

Tyk Gateway is an open-source API gateway written in Go. It sits in front of your services and handles API keys, JWT and OAuth validation, rate limits, quotas, caching and request transforms. APIs and keys are managed through the Gateway's own REST API, so it fits GitOps and CI pipelines without a dashboard.

About Hosting Tyk Gateway

This template runs the official tykio/tyk-gateway:v5.15.0 image with a Railway Redis database, which holds keys, quotas and rate-limit counters. API definitions and policies are JSON files on a Railway volume, so they survive redeploys. The management API under /tyk/ shares the public HTTPS domain and requires the generated TYK_GW_SECRET in the x-tyk-authorization header. Keys are stored hashed, and analytics are off. The image is distroless and cannot fix the volume's ownership, so it runs as root. Tyk's dashboard and developer portal are commercial and not included; this is the open-source gateway on its own.

Common Use Cases

  • API keys, rate limits and quotas in front of internal services
  • A single entry point that validates JWTs before requests reach your apps
  • Managing API definitions as code through the Gateway API in CI

Dependencies for Tyk Gateway Hosting

  • tykio/tyk-gateway:v5.15.0 (official OSS image)
  • Railway Redis and a volume at /opt/tyk-gateway/apps

Deployment Dependencies

Implementation Details

ServiceSourceNetworkingStorage
tyktykio/tyk-gateway:v5.15.0public HTTPSvolume at /opt/tyk-gateway/apps
RedisRailway Redisprivatevolume
VariablePurpose
TYK_GW_SECRETManagement API secret (x-tyk-authorization header)
TYK_GW_APPPATH, TYK_GW_POLICIES_POLICYPATHBoth point at the volume, so APIs and policies persist
TYK_GW_HASHKEYStrue: keys are stored hashed in Redis
TYK_URLPublic URL

Add an API, reload, create a key:

curl -XPOST "$TYK_URL/tyk/apis" -H "x-tyk-authorization: $TYK_GW_SECRET" -d @api.json
curl "$TYK_URL/tyk/reload/group" -H "x-tyk-authorization: $TYK_GW_SECRET"
curl -XPOST "$TYK_URL/tyk/keys" -H "x-tyk-authorization: $TYK_GW_SECRET" -d @key.json

Point proxy.target_url at private addresses such as http://api.railway.internal:8080. Tyk forwards the client's Authorization header to the upstream unless the API sets strip_auth_data. Because APIs and policies share one folder, Tyk logs a harmless parse warning for policy files at startup.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by Tyk Technologies.

Why Deploy Tyk Gateway on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Tyk Gateway on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
47
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51