|
| 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) |
0 commit comments