A highly opinionated gateway
with no opinions

Service router with embedded Lua scripting. Write custom routing logic without rebuilding. LuaJIT-powered performance with LuaRocks ecosystem support out of the box.

Terminal
# Download and run git clone https://github.com/ygalsk/keystone-gateway.git cd keystone-gateway make dev
Keystone Gateway mascot

What You Can Do

Everything you need to build custom routing logic. Nothing you don't.

One Binary

Single executable. No containers or orchestrators. Download, configure, run. Everything you need in one stateless binary.

Multi-Service Routing

Route requests to different backend services. Isolate service logic without separate deployments. One gateway, many services.

LuaJIT Performance

Powered by LuaJIT for exceptional speed. Full LuaRocks ecosystem support out of the box—use any Lua library without modification.

Bring Your Own Logic

No built-in auth, rate limiting, or workflows. You write the policies you need in Lua. No vendor lock-in, complete flexibility.

From zero to routing
in 60 seconds

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 function get_users(req) return {status = 200, body = "User data"} end
Terminal
# Start the gateway ./keystone-gateway -config config.yaml

Complete quick start guide →

Real problems.
Real solutions.

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, rate limiting—whatever you need. Write middleware functions that check requests before routing.

View examples →