Skip to main content

Lite Mode

Gate Lite is an ultra-thin lightweight reverse proxy that efficiently routes client connections based on the hostname the player joins with. This allows you to protect multiple backend servers behind a single port using different domains or subdomains.

Overview

Lite mode makes Gate act as a minimal-overhead reverse proxy between the client and backend servers for host-based connection forwarding. Player connections are offloaded to the destined backend server, including ping requests and player authentication.
Gate Lite routing diagram

Key Features

  • Hostname-based routing - Route players based on the domain they connect with
  • Minimal overhead - Ultra-lightweight with minimal resource usage
  • Multiple backends - Single Gate instance supports multiple backend servers
  • Load balancing - Multiple strategies for distributing connections
  • Proxy behind proxy - Support for multi-layer proxy setups
Advanced features like backend server switching or proxy commands are not available in Lite mode. Use standard Gate mode if you need these features.

Use Cases

Multi-Server Hosting

Host multiple independent Minecraft servers behind a single IP address:
Players connect to different servers using different domain names, all through port 25565.

Development & Testing

Quickly route localhost connections to different backend servers:

Kubernetes/Cloud Deployments

Dynamically route to backend services using hostname parameters:

Configuration

Basic Routing

Route connections based on the hostname:
In this configuration:
  • abc.example.com10.0.0.3:25568
  • Any subdomain of example.com10.0.0.1:25567
  • example.com or localhost10.0.0.2:25566

Hostname Parameter Routing

Extract parts of hostnames using wildcard patterns and use them in backend addresses:

Parameter Indexing

  • $1 refers to the first wildcard match (* or ?)
  • $2 refers to the second wildcard match
  • $3 refers to the third wildcard match
  • And so on…
Wildcards are numbered in the order they appear in the pattern from left to right.

Wildcard Types

  • * matches any sequence of characters (including empty) and captures it
  • ? matches any single character and captures it
Gate validates your configuration and will warn you about invalid parameter usage, such as parameters without wildcards or out-of-range parameter indices.

Load Balancing Strategies

When multiple backends are configured, Gate Lite can distribute connections using different strategies:
Performance Notes:
  • All strategies return instantly without health checks
  • Failed connections automatically retry next backend
  • Latency measurement uses status ping timing for accuracy
  • Thread-safe with atomic operations

Ping Response Caching

Gate Lite caches server list ping responses to reduce network traffic:

Disabling the Cache

Set TTL to -1s to disable response caching:

Fallback Status

Define a custom status response when all backends of a route are offline:

Advanced Features

Modify Virtual Host

Modify the virtual host to match the backend address, useful when backends require specific domains:
Lite will modify the player’s handshake packet from localhostplay.example.com before forwarding.

Proxy Behind Proxy

Use another proxy (Gate, BungeeCord, Velocity) as a backend server while preserving real player IP:
Ensure the backend proxy also has proxy protocol enabled. See documentation for:

Complete Configuration Example

Here’s a complete config-lite.yml example:

Security Considerations

If you use Lite mode and your backend servers handle player authentication, you’re protected by default. For DDoS protection, see the Anti-DDoS guide.
Lite mode forwards authentication to backend servers. Ensure your backends are properly configured for online mode or use proxy protocol for secure setups.