Documentation Index
Fetch the complete documentation index at: https://mintlify.com/renja-g/RiftRelay/llms.txt
Use this file to discover all available pages before exploring further.
Environment Variables
RiftRelay is configured entirely through environment variables. All configuration options have sensible defaults.Create a
.env file in the root directory or set environment variables directly in your shell.Required Configuration
RIOT_TOKEN
Required - Your Riot Games API token(s)..env
.env
Common Settings
These are the most frequently configured options:| Variable | Default | Description |
|---|---|---|
PORT | 8985 | Server port |
QUEUE_CAPACITY | 2048 | Max queued requests |
ADMISSION_TIMEOUT | 5m | Max wait time for admission (how long a request can wait in the queue) |
SHUTDOWN_TIMEOUT | 20s | Graceful shutdown timeout |
ENABLE_METRICS | false | Enable /metrics endpoint |
ENABLE_PPROF | false | Enable pprof endpoints |
ENABLE_SWAGGER | true | Enable Swagger UI |
Example Configuration
.env
Advanced Configuration
Server Timeouts
Server Timeouts
Control how long the server waits for various operations:Defaults from config.go:
.env
HTTP Transport Settings
HTTP Transport Settings
Fine-tune the HTTP client used to communicate with Riot’s API:Defaults from config.go:
.env
Rate Limiting Behavior
Rate Limiting Behavior
.env
The
DEFAULT_APP_RATE_LIMIT format is limit:window,limit:window where window is in seconds.
Example: 20:1,100:120 means 20 requests per second and 100 requests per 120 seconds.Feature Flags
ENABLE_METRICS
Exposes Prometheus-compatible metrics at/metrics:
.env
ENABLE_PPROF
Enables Go profiling endpoints for performance analysis:.env
/debug/pprof/- Index page/debug/pprof/heap- Heap profile/debug/pprof/goroutine- Goroutine profile/debug/pprof/profile- CPU profile
ENABLE_SWAGGER
Enables the Swagger UI for API exploration:.env
http://localhost:8985/swagger/
Configuration File
The complete.env.example from the source repository:
.env.example
Duration Format
All timeout and duration values use Go’s duration format:ms- Milliseconds (e.g.,150ms)s- Seconds (e.g.,30s)m- Minutes (e.g.,5m)h- Hours (e.g.,2h)
Validation
RiftRelay validates all configuration on startup. Invalid values will cause the application to exit with an error message. Common validation errors:RIOT_TOKEN env var is required
RIOT_TOKEN env var is required
You must set the
RIOT_TOKEN environment variable.PORT must be <= 65535
PORT must be <= 65535
The port number must be a valid TCP port (1-65535).
QUEUE_CAPACITY must be >= 1
QUEUE_CAPACITY must be >= 1
Queue capacity must be a positive integer.
Duration must be >= 0
Duration must be >= 0
Timeout values cannot be negative.
Docker Configuration
When running with Docker Compose, set environment variables in your.env file:
docker-compose.yml
Loading Configuration
The configuration loading process frominternal/config/config.go:
config.go
Next Steps
Priority Requests
Learn about sending high-priority requests
Multiple Tokens
Configure multiple API tokens for higher throughput