Skip to content

Commit e8c70f1

Browse files
Merge branch 'minekube:master' into master
2 parents 0582df0 + 6c8de83 commit e8c70f1

135 files changed

Lines changed: 12660 additions & 3665 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# Gate + Geyser Bedrock Support Example
2+
3+
This example demonstrates how to set up Gate with Geyser for Bedrock Edition support, allowing both Java and Bedrock players to join the same server.
4+
5+
## Quick Start
6+
7+
1. **Generate Floodgate Key** (first time only):
8+
9+
```bash
10+
# Generate a new Floodgate key
11+
docker run --rm -v $(pwd)/geyser:/data itzg/minecraft-server \
12+
sh -c "mkdir -p /data && openssl genpkey -algorithm RSA -out /data/key.pem -pkcs8"
13+
```
14+
15+
2. **Start the services**:
16+
17+
```bash
18+
docker compose up -d
19+
```
20+
21+
3. **Check logs**:
22+
23+
```bash
24+
docker compose logs -f
25+
```
26+
27+
4. **Connect**:
28+
- **Java players**: Connect to `localhost:25565`
29+
- **Bedrock players**: Connect to `localhost:19132`
30+
31+
## Architecture
32+
33+
```
34+
Bedrock Players (19132/udp) โ†’ Geyser โ†’ Gate (25567) โ†’ Backend Servers
35+
Java Players (25565/tcp) โ†’ Gate โ†’ Backend Servers
36+
```
37+
38+
## Services
39+
40+
- **Gate**: Main proxy server handling both Java and translated Bedrock connections
41+
- **Geyser**: Protocol translator converting Bedrock to Java Edition protocol
42+
- **Server1**: Backend Minecraft server (no plugins required)
43+
- **Volumes**: Persistent world data
44+
45+
## Configuration Files
46+
47+
- `gate.yml` - Gate proxy configuration with Bedrock support enabled
48+
- `geyser/config.yml` - Geyser standalone configuration
49+
50+
- `server.properties` - Backend server properties
51+
- `docker-compose.yml` - Docker services orchestration
52+
53+
## Security Notes
54+
55+
- The Gate Bedrock listener (port 25567) should only accept connections from Geyser
56+
- In production, use firewall rules to restrict access to this port
57+
- The `key.pem` file enables secure authentication between Geyser and Gate (no backend plugins required)
58+
59+
## Troubleshooting
60+
61+
### Bedrock players can't connect
62+
63+
- Check that UDP port 19132 is accessible
64+
- Verify Geyser logs for connection errors
65+
- Ensure the Floodgate key is properly shared
66+
67+
### Authentication errors
68+
69+
- Verify the `key.pem` is accessible by both Geyser and Gate
70+
- Check file permissions on the key file
71+
- Ensure backend servers have `online-mode=false` (since Gate handles authentication)
72+
73+
### Performance issues
74+
75+
- Adjust Geyser's `compression-level` and `mtu` settings
76+
- Monitor resource usage of the Geyser container
77+
- Consider using `use-direct-connection: true` in Geyser config
78+
79+
## Customization
80+
81+
### Username Format
82+
83+
Change the Bedrock username prefix in `gate.yml`:
84+
85+
```yaml
86+
bedrock:
87+
usernameFormat: 'BE_%s' # Prefix with "BE_"
88+
```
89+
90+
### Resource Packs
91+
92+
Add Bedrock-compatible resource packs to the Geyser configuration.
93+
94+
### Plugins
95+
96+
Install additional plugins on the backend server. Most Java plugins work with Bedrock players since Gate handles the protocol translation and presents them as regular Java players.
97+
98+
## Production Deployment
99+
100+
For production use:
101+
102+
1. Use proper secrets management for the Floodgate key
103+
2. Configure firewall rules to protect the Bedrock listener port
104+
3. Set up monitoring and logging
105+
4. Use persistent volumes for world data
106+
5. Configure backup strategies
107+
6. Consider using Gate's Connect integration for DDoS protection
108+
109+
## Support
110+
111+
- [Gate Documentation](https://gate.minekube.com/)
112+
- [Geyser Wiki](https://wiki.geysermc.org/)
113+
- [Gate Discord](https://minekube.com/discord)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
services:
2+
gate:
3+
image: ghcr.io/minekube/gate:latest
4+
restart: unless-stopped
5+
environment:
6+
- GATE_CONFIG_PATH=/gate/gate.yml
7+
volumes:
8+
- ./gate.yml:/gate/gate.yml
9+
- ./geyser/key.pem:/gate/floodgate.pem
10+
ports:
11+
- '25565:25565' # Java Edition
12+
- '25567:25567' # Geyser listener
13+
depends_on:
14+
- server1
15+
16+
geyser:
17+
image: itzg/minecraft-server
18+
restart: unless-stopped
19+
environment:
20+
EULA: 'TRUE'
21+
TYPE: 'CUSTOM'
22+
CUSTOM_SERVER: 'https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/standalone'
23+
ports:
24+
- '19132:19132/udp' # Bedrock Edition
25+
volumes:
26+
- ./geyser/config.yml:/data/config.yml
27+
- ./geyser/key.pem:/data/key.pem
28+
depends_on:
29+
- gate
30+
31+
server1:
32+
image: itzg/minecraft-server
33+
restart: unless-stopped
34+
environment:
35+
EULA: 'TRUE'
36+
TYPE: PAPER
37+
VERSION: 1.21.4
38+
PAPER_BUILD: latest
39+
EXTRA_ARGS: '--world-dir ./worlds/'
40+
volumes:
41+
- worlds:/worlds
42+
- ./server.properties:/data/server.properties
43+
expose:
44+
- '25565'
45+
46+
volumes:
47+
worlds:

โ€Ž.examples/bedrock/gate.ymlโ€Ž

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
config:
2+
bind: 0.0.0.0:25565
3+
onlineMode: true
4+
servers:
5+
server1: server1:25566
6+
try:
7+
- server1
8+
# forwarding:
9+
# mode: legacy
10+
# velocitySecret: 'bedrock-crossplay-secret'
11+
status:
12+
motd: |
13+
ยงbGate + Geyser Cross-Play
14+
ยงeJava & Bedrock Players Welcome!
15+
16+
# Enable Bedrock edition support (Manual mode - Geyser runs as separate container)
17+
bedrock:
18+
enabled: true
19+
# Gate โ†” Geyser connection (Geyser container connects to Gate container)
20+
geyserListenAddr: 'gate:25567'
21+
# Bedrock player settings
22+
usernameFormat: '.%s'
23+
# Floodgate authentication key (shared between containers)
24+
floodgateKeyPath: '/gate/floodgate.pem'
25+
# managed: false (default - Docker manages Geyser container, not Gate)
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
bedrock:
2+
port: 19132
3+
motd1: "Gate + Geyser"
4+
motd2: "Cross-Play Server"
5+
server-name: "Gate Bedrock"
6+
compression-level: 6
7+
8+
remote:
9+
# Connect to Gate's Bedrock listener
10+
address: gate
11+
port: 25567
12+
auth-type: floodgate
13+
use-proxy-protocol: true
14+
forward-hostname: false
15+
16+
# Point to the shared Floodgate key
17+
floodgate-key-file: key.pem
18+
19+
# Enable passthrough for better integration
20+
passthrough-motd: true
21+
passthrough-player-counts: true
22+
legacy-ping-passthrough: false
23+
ping-passthrough-interval: 3
24+
25+
# Performance settings
26+
forward-player-ping: true
27+
max-players: 100
28+
debug-mode: false
29+
30+
# Bedrock-specific settings
31+
show-cooldown: title
32+
show-coordinates: true
33+
disable-bedrock-scaffolding: false
34+
emote-offhand-workaround: "disabled"
35+
36+
# Custom skulls and items
37+
allow-custom-skulls: true
38+
max-visible-custom-skulls: 128
39+
custom-skull-render-distance: 32
40+
add-non-bedrock-items: true
41+
42+
# Resource packs
43+
force-resource-packs: true
44+
45+
# Xbox features
46+
xbox-achievements-enabled: false
47+
48+
# Logging
49+
log-player-ip-addresses: true
50+
notify-on-new-bedrock-update: true
51+
52+
# Advanced settings
53+
scoreboard-packet-threshold: 20
54+
enable-proxy-connections: false
55+
mtu: 1400
56+
use-direct-connection: true
57+
disable-compression: true
58+
59+
config-version: 4
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
๏ฟฝf๏ฟฝ9๏ฟฝV??๏ฟฝ
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Minecraft server properties for Gate + Bedrock setup
2+
3+
# Server settings
4+
server-name=Gate Bedrock Server
5+
server-port=25565
6+
server-ip=
7+
8+
# Game settings
9+
gamemode=survival
10+
difficulty=easy
11+
hardcore=false
12+
max-players=20
13+
pvp=true
14+
allow-flight=false
15+
16+
# World settings
17+
level-name=world
18+
level-seed=
19+
level-type=minecraft\:normal
20+
generate-structures=true
21+
spawn-protection=16
22+
23+
# Authentication - MUST be false when using Gate proxy
24+
online-mode=false
25+
# Required for Bedrock players and chat compatibility
26+
enforce-secure-profile=false
27+
28+
# Whitelist and ops
29+
white-list=false
30+
enforce-whitelist=false
31+
op-permission-level=4
32+
33+
# Resource pack settings
34+
resource-pack=
35+
resource-pack-sha1=
36+
require-resource-pack=false
37+
38+
# Network settings
39+
network-compression-threshold=256
40+
max-tick-time=60000
41+
42+
# Logging
43+
enable-rcon=false
44+
enable-query=false
45+
enable-status=true
46+
47+
# Performance
48+
view-distance=10
49+
simulation-distance=10
50+
max-world-size=29999984
51+
52+
# Chat settings
53+
broadcast-console-to-ops=true
54+
broadcast-rcon-to-ops=true
55+
enable-command-block=false
56+
57+
# Other settings
58+
allow-nether=true
59+
spawn-npcs=true
60+
spawn-animals=true
61+
spawn-monsters=true
62+
function-permission-level=2

โ€Ž.examples/bedrock/start.shโ€Ž

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/bash
2+
3+
# Gate + Geyser Bedrock Support Example
4+
# This script helps you get started with Bedrock support in Gate
5+
6+
set -e
7+
8+
echo "๐Ÿš€ Starting Gate + Geyser Bedrock Support Example"
9+
echo "================================================="
10+
11+
# Check if Docker is running
12+
if ! docker info > /dev/null 2>&1; then
13+
echo "โŒ Docker is not running. Please start Docker and try again."
14+
exit 1
15+
fi
16+
17+
# Check if key.pem exists
18+
if [ ! -f "geyser/key.pem" ]; then
19+
echo "๐Ÿ”‘ Generating Floodgate key..."
20+
openssl genpkey -algorithm RSA -out geyser/key.pem
21+
echo "โœ… Floodgate key generated at geyser/key.pem"
22+
else
23+
echo "โœ… Floodgate key already exists"
24+
fi
25+
26+
# Start services
27+
echo "๐Ÿ“ฆ Starting Docker services..."
28+
docker compose up -d
29+
30+
echo ""
31+
echo "๐ŸŽ‰ Services started successfully!"
32+
echo ""
33+
echo "๐Ÿ“Š Service Status:"
34+
docker compose ps
35+
36+
echo ""
37+
echo "๐ŸŽฎ Connection Information:"
38+
echo " Java Players: localhost:25565"
39+
echo " Bedrock Players: localhost:19132"
40+
echo ""
41+
echo "๐Ÿ“‹ Useful Commands:"
42+
echo " View logs: docker compose logs -f"
43+
echo " Stop services: docker compose down"
44+
echo " Restart: docker compose restart"
45+
echo ""
46+
echo "๐Ÿ” Troubleshooting:"
47+
echo " - Check logs if players can't connect"
48+
echo " - Ensure ports 25565 (Java) and 19132/udp (Bedrock) are open"
49+
echo " - Verify the Floodgate key is shared between all services"
50+
echo ""
51+
echo "๐Ÿ“– Documentation: https://gate.minekube.com/guide/bedrock"

0 commit comments

Comments
ย (0)