Skip to main content

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.

RiftRelay can be installed in several ways depending on your needs. Choose the method that best fits your environment. The easiest way to run RiftRelay is using Docker with the automated setup script:
curl -fsSL "https://raw.githubusercontent.com/renja-g/RiftRelay/main/scripts/setup-docker-stack.sh" | bash
This downloads the necessary files, prompts for your Riot API token, and starts RiftRelay.

Manual Docker run

If you prefer to run Docker manually:
docker pull renjag/riftrelay:latest

docker run -d \
  --name riftrelay \
  -p 8985:8985 \
  -e RIOT_TOKEN="your-riot-token" \
  --restart unless-stopped \
  renjag/riftrelay:latest
Replace your-riot-token with your actual Riot API token from the Riot Developer Portal

Docker Compose

For production deployments or if you need more control, use Docker Compose.
1

Create docker-compose.yml

Create a docker-compose.yml file with the following content:
docker-compose.yml
name: riftrelay

services:
  riftrelay:
    image: renjag/riftrelay:latest
    restart: unless-stopped
    init: true
    env_file:
      - .env
    environment:
      PORT: "8985"
    ports:
      - "8985:8985"
    healthcheck:
      test: ["CMD-SHELL", "wget --spider -q http://127.0.0.1:8985/healthz || exit 1"]
      interval: 15s
      timeout: 3s
      retries: 3
      start_period: 20s
    read_only: true
    tmpfs:
      - /tmp:size=64m,mode=1777
    cap_drop:
      - ALL
    security_opt:
      - no-new-privileges:true
    stop_grace_period: 25s
This configuration includes security hardening with read-only filesystem, dropped capabilities, and health checks
2

Create .env file

Create a .env file in the same directory:
.env
# Required: Riot token (comma separated for multiple tokens)
RIOT_TOKEN=your-riot-token

# Optional: RiftRelay image to pull/run in docker compose
RIFTRELAY_IMAGE=renjag/riftrelay:latest

# Optional overrides
PORT=8985
ENABLE_METRICS=false
ENABLE_PPROF=false
ENABLE_SWAGGER=true
SHUTDOWN_TIMEOUT=20s
Never commit your .env file with real API tokens to version control. Add it to .gitignore
3

Start the service

Start RiftRelay using Docker Compose:
docker compose up -d
Check the logs to verify it started successfully:
docker compose logs -f riftrelay
4

Verify it's running

Test the health endpoint:
curl http://localhost:8985/healthz

From source

If you want to run RiftRelay from source or contribute to development:
1

Prerequisites

Ensure you have Go 1.26.0 or later installed:
go version
2

Clone the repository

git clone https://github.com/renja-g/RiftRelay.git
cd RiftRelay
3

Set environment variables

Export your Riot API token:
export RIOT_TOKEN="your-riot-token"
Optionally, configure other settings:
export PORT=8985
export ENABLE_SWAGGER=true
export QUEUE_CAPACITY=2048
4

Run the server

Start RiftRelay:
go run .
The server starts on http://localhost:8985 by default.
5

Build a binary (optional)

To create a production binary:
go build -o riftrelay .
./riftrelay

Environment variables

RiftRelay is configured entirely through environment variables. The only required variable is RIOT_TOKEN.

Required

VariableDescriptionExample
RIOT_TOKENYour Riot API token(s)RGAPI-xxxxx or token1,token2,token3

Common settings

VariableDefaultDescription
PORT8985Server port
QUEUE_CAPACITY2048Maximum queued requests
ADMISSION_TIMEOUT5mMax wait time in queue
SHUTDOWN_TIMEOUT20sGraceful shutdown timeout
ENABLE_METRICSfalseEnable /metrics endpoint
ENABLE_PPROFfalseEnable pprof endpoints
ENABLE_SWAGGERtrueEnable Swagger UI at /swagger/
For a complete list of available configuration options, see the Configuration page or check .env.example in the repository

Multiple tokens

To increase your rate limits, you can provide multiple Riot API tokens as comma-separated values:
RIOT_TOKEN=token1,token2,token3
Or in your .env file:
.env
RIOT_TOKEN=RGAPI-xxxxx,RGAPI-yyyyy,RGAPI-zzzzz
RiftRelay will automatically rotate between tokens to maximize throughput.

Port configuration

By default, RiftRelay runs on port 8985. To change this: With Docker:
docker run -d \
  -p 3000:3000 \
  -e PORT=3000 \
  -e RIOT_TOKEN="your-token" \
  renjag/riftrelay:latest
With environment variable:
export PORT=3000
go run .
In .env file:
PORT=3000

Verify installation

After installation, verify RiftRelay is working correctly:
curl http://localhost:8985/healthz
# Expected: 200 OK

Next steps

Quickstart guide

Learn how to make your first requests through RiftRelay

Configuration

Explore advanced configuration options and tuning

API reference

View all available endpoints and headers

Metrics

Set up Prometheus metrics for production monitoring

Build docs developers (and LLMs) love