Skip to content

Commit a617c61

Browse files
Merge branch 'minekube:master' into master
2 parents d27e054 + 2eaa020 commit a617c61

98 files changed

Lines changed: 4831 additions & 489 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.

โ€Ž.examples/bedrock/README.mdโ€Ž

Lines changed: 21 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,70 @@
1-
# Gate + Geyser Bedrock Support Example
1+
# Gate + geyserlite Bedrock Support Example
22

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.
3+
This example demonstrates Gate's managed Bedrock mode. Gate starts geyserlite automatically so Java and Bedrock players can join the same Paper backend.
44

55
## Quick Start
66

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**:
7+
1. **Start the services**:
168

179
```bash
1810
docker compose up -d
1911
```
2012

21-
3. **Check logs**:
13+
2. **Check logs**:
2214

2315
```bash
2416
docker compose logs -f
2517
```
2618

27-
4. **Connect**:
19+
3. **Connect**:
2820
- **Java players**: Connect to `localhost:25565`
2921
- **Bedrock players**: Connect to `localhost:19132`
3022

3123
## Architecture
3224

3325
```
34-
Bedrock Players (19132/udp) โ†’ Geyser โ†’ Gate (25567) โ†’ Backend Servers
26+
Bedrock Players (19132/udp) โ†’ Gate managed geyserlite โ†’ Paper
3527
Java Players (25565/tcp) โ†’ Gate โ†’ Backend Servers
3628
```
3729

3830
## Services
3931

4032
- **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
33+
- **geyserlite**: Native Geyser engine downloaded and started by Gate managed mode
34+
- **Server1**: Paper `26.1.2` backend running on Java 25
35+
- **Volumes**: Persistent Gate cache/data and Paper world data
4436

4537
## Configuration Files
4638

47-
- `gate.yml` - Gate proxy configuration with Bedrock support enabled
48-
- `geyser/config.yml` - Geyser standalone configuration
49-
39+
- `gate.yml` - Gate proxy configuration with `bedrock: true`
5040
- `server.properties` - Backend server properties
41+
- `spigot.yml` - Enables Bungee/legacy forwarding for Gate
5142
- `docker-compose.yml` - Docker services orchestration
5243

5344
## Security Notes
5445

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)
46+
- The backend runs with `online-mode=false` because Gate authenticates players.
47+
- Restrict backend access so players cannot bypass Gate.
48+
- `spigot.yml` enables Bungee/legacy forwarding, which is required for Gate to pass player identity data.
5849

5950
## Troubleshooting
6051

6152
### Bedrock players can't connect
6253

6354
- Check that UDP port 19132 is accessible
64-
- Verify Geyser logs for connection errors
65-
- Ensure the Floodgate key is properly shared
55+
- Verify Gate logs for geyserlite startup errors
56+
- Ensure the Gate container can write to its cache/data volumes
6657

6758
### Authentication errors
6859

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)
60+
- Ensure backend servers have `online-mode=false`
61+
- Ensure `settings.bungeecord: true` is present in `spigot.yml`
62+
- Keep backend access restricted to Gate
7263

7364
### Performance issues
7465

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
66+
- Monitor resource usage of the Gate container
67+
- Configure advanced managed options in `gate.yml` if you need custom geyserlite settings
7868

7969
## Customization
8070

โ€Ž.examples/bedrock/docker-compose.ymlโ€Ž

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,42 +6,30 @@ services:
66
- GATE_CONFIG_PATH=/gate/gate.yml
77
volumes:
88
- ./gate.yml:/gate/gate.yml
9-
- ./geyser/key.pem:/gate/floodgate.pem
9+
- gate-cache:/gate/.cache
10+
- gate-data:/gate/data
1011
ports:
1112
- '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:
2413
- '19132:19132/udp' # Bedrock Edition
25-
volumes:
26-
- ./geyser/config.yml:/data/config.yml
27-
- ./geyser/key.pem:/data/key.pem
2814
depends_on:
29-
- gate
15+
- server1
3016

3117
server1:
32-
image: itzg/minecraft-server
18+
image: itzg/minecraft-server:java25
3319
restart: unless-stopped
3420
environment:
3521
EULA: 'TRUE'
3622
TYPE: PAPER
37-
VERSION: 1.21.4
23+
VERSION: 26.1.2
3824
PAPER_BUILD: latest
39-
EXTRA_ARGS: '--world-dir ./worlds/'
4025
volumes:
41-
- worlds:/worlds
26+
- server-data:/data
4227
- ./server.properties:/data/server.properties
28+
- ./spigot.yml:/data/spigot.yml
4329
expose:
4430
- '25565'
4531

4632
volumes:
47-
worlds:
33+
gate-cache:
34+
gate-data:
35+
server-data:

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

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,15 @@ config:
22
bind: 0.0.0.0:25565
33
onlineMode: true
44
servers:
5-
server1: server1:25566
5+
server1: server1:25565
66
try:
77
- server1
8-
# forwarding:
9-
# mode: legacy
10-
# velocitySecret: 'bedrock-crossplay-secret'
8+
forwarding:
9+
mode: legacy
1110
status:
1211
motd: |
13-
ยงbGate + Geyser Cross-Play
12+
ยงbGate + geyserlite Cross-Play
1413
ยงeJava & Bedrock Players Welcome!
1514
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)
15+
# Simplest managed setup: Gate starts geyserlite with defaults.
16+
bedrock: true

โ€Ž.examples/bedrock/geyser/config.ymlโ€Ž

Lines changed: 0 additions & 59 deletions
This file was deleted.

โ€Ž.examples/bedrock/geyser/key.pemโ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
settings:
2+
# Gate uses legacy/Bungee forwarding for backend player identity data.
3+
# Keep backend access restricted to the proxy when online-mode=false.
4+
bungeecord: true

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

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,38 @@
55

66
set -e
77

8-
echo "๐Ÿš€ Starting Gate + Geyser Bedrock Support Example"
8+
echo "Starting Gate + geyserlite Bedrock Support Example"
99
echo "================================================="
1010

1111
# Check if Docker is running
1212
if ! docker info > /dev/null 2>&1; then
13-
echo "โŒ Docker is not running. Please start Docker and try again."
13+
echo "Docker is not running. Please start Docker and try again."
1414
exit 1
1515
fi
1616

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-
2617
# Start services
27-
echo "๐Ÿ“ฆ Starting Docker services..."
18+
echo "Starting Docker services..."
2819
docker compose up -d
2920

3021
echo ""
31-
echo "๐ŸŽ‰ Services started successfully!"
22+
echo "Services started successfully."
3223
echo ""
33-
echo "๐Ÿ“Š Service Status:"
24+
echo "Service Status:"
3425
docker compose ps
3526

3627
echo ""
37-
echo "๐ŸŽฎ Connection Information:"
28+
echo "Connection Information:"
3829
echo " Java Players: localhost:25565"
3930
echo " Bedrock Players: localhost:19132"
4031
echo ""
41-
echo "๐Ÿ“‹ Useful Commands:"
32+
echo "Useful Commands:"
4233
echo " View logs: docker compose logs -f"
4334
echo " Stop services: docker compose down"
4435
echo " Restart: docker compose restart"
4536
echo ""
46-
echo "๐Ÿ” Troubleshooting:"
37+
echo "Troubleshooting:"
4738
echo " - Check logs if players can't connect"
4839
echo " - Ensure ports 25565 (Java) and 19132/udp (Bedrock) are open"
49-
echo " - Verify the Floodgate key is shared between all services"
40+
echo " - Ensure Paper has settings.bungeecord=true via spigot.yml"
5041
echo ""
51-
echo "๐Ÿ“– Documentation: https://gate.minekube.com/guide/bedrock"
42+
echo "Documentation: https://gate.minekube.com/guide/bedrock"

0 commit comments

Comments
ย (0)