Skip to main content
This guide covers advanced Docker configuration topics for deploying Gate in production environments.

Volume Mounts

Configuration File

The most basic volume mount is for the configuration file:
You can also mount it to a custom location:

Data Directory

For persistent data (plugins, extensions, logs):

Multiple Configuration Files

If you need to mount additional files:

Read-Only Mounts

For security, mount configuration as read-only:

Floodgate Key (Bedrock Support)

When using Bedrock cross-play:

Environment Variables

Gate supports environment variables for sensitive configuration values.

Velocity Forwarding Secret

In your config.yml:

BungeeGuard Secret

Using Environment Files

Create a .env file:
Then use it:
With Docker Compose:

Networking

Host Network Mode

Best performance, but less isolation:
With Docker Compose:
Host networking gives the container direct access to the host’s network stack. Only use in trusted environments.

Bridge Network Mode

Better isolation with custom networks:
With Docker Compose:

Internal Networks

Prevent backend servers from accessing the internet:

Custom Port Mappings

Multiple Ports

For Gate API and query protocol:
With Docker Compose:

IPv6 Support

Enable IPv6 in Docker:

Resource Limits

Memory Limits

With Docker Compose:

CPU Limits

With Docker Compose:

Security Configuration

Running as Non-Root User

The distroless image runs as non-root by default. For the JRE variant:

Read-Only Root Filesystem

Dropping Capabilities

Security Options with Docker Compose

Logging Configuration

JSON Logging Driver

Syslog Driver

Docker Compose Logging

Health Checks

TCP Health Check

Health checks require shell utilities, so use the JRE variant.

Docker Compose Health Check

Using Gate API for Health Checks

If you have the API enabled:

Bedrock Edition (Cross-Play) Setup

For Bedrock cross-play with managed Geyser:
In config.yml:

Troubleshooting

Container Won’t Start

Check logs:
Check if config file exists:

Permission Issues

Fix file permissions:

Network Connectivity Issues

Test network connectivity:
Check DNS resolution:

Port Already in Use

Find what’s using the port:

Cannot Connect to Backend Servers

Verify backend servers are running:
Check network connectivity:
Verify config:

High Memory Usage

Monitor resource usage:
Set memory limits:

Container Keeps Restarting

Check restart policy:
View last logs before crash:
Disable restart to debug:

Debug Mode

Enable debug logging in config.yml:
Then restart:

Inspecting Configuration

View loaded configuration:

Testing Connectivity

From host:
From another container:

Performance Tuning

For JRE Variant

Optimize Java flags:

Network Performance

Adjust compression settings in config.yml:

Connection Tuning

Next Steps

Production Guide

Best practices for production deployments

Monitoring

Monitor your Gate proxy in production