A highly opinionated gateway
with no opinions

Multi-tenant HTTP routing with embedded Lua. You write the logic, we handle the HTTP.

Terminal
# Download and run git clone https://github.com/ygalsk/keystone-gateway.git cd keystone-gateway make dev
Key-Way the kiwi mascot directing HTTP traffic

What It Does

HTTP primitives. No built-in opinions about your business logic.

Multi-Service Routing

Route requests to different backends per tenant, path, or any custom logic you write.

Lua-Powered Flexibility

Change routing rules on the fly. Full LuaRocks ecosystem. No gateway rebuild required.

Bring Your Own Logic

No built-in auth, rate limiting, or opinions. Just HTTP primitives.

Quick Start

1. Configure routes

config.yaml
lua_routing: enabled: true scripts_dir: "./scripts" global_scripts: - "api" routes: - method: "GET" pattern: "/users" handler: "get_users" middleware: - "auth_middleware"

2. Write handlers

scripts/api.lua
-- Auth middleware function auth_middleware(req, next) if not req.headers["Authorization"] then return {status = 401, body = "Unauthorized"} end next() return nil end -- Handler function get_users(req) return {status = 200, body = "User data"} end
Terminal
# Start the gateway ./keystone-gateway -config config.yaml

Complete quick start guide →

Examples

Service Routing

Route requests to different backend services based on path, headers, or custom logic. Simple Lua functions control the routing.

View examples →

Custom Middleware

Implement authentication, logging, or rate limiting. Write middleware functions that check requests before routing.

View examples →