Setting Up a Proxy Network with Multiple Servers (Step by Step)
Setting up a proxy network for Minecraft servers is a sophisticated method to enhance the player experience, bolster security, and improve the scalability of your server infrastructure. At its core, a proxy server acts as a central gateway, providing a single entry point for players to connect to your network. This gateway then intelligently routes them to various backend game servers, which could host different game modes like survival, creative, or minigames.
![]()
The primary advantage of this architecture is unified access. Players connect to one IP address, and from there, they can seamlessly switch between different game servers without ever needing to disconnect and reconnect. Beyond convenience, a proxy network offers significant benefits in terms of security and performance:
- DDoS Protection: The proxy server effectively hides the true IP addresses of your backend game servers. This crucial layer of abstraction protects them from direct denial-of-service (DDoS) attacks, as attackers can only target the proxy, leaving your game servers untouched.
- Load Balancing: Proxies are capable of distributing player traffic across multiple backend servers. This prevents any single server from becoming overloaded, ensuring a smoother and more stable experience for all players, even during peak times.
- Centralized Management: A proxy network enables global features across your entire server ecosystem. This includes synchronized player data (such as ranks and permissions), global chat functionality, and centralized authentication, simplifying administration and creating a cohesive community feel.
When choosing proxy software, modern options are highly recommended. Velocity stands out as the superior choice due to its excellent performance, robust security features, and active development. Waterfall serves as a stable alternative, particularly for those who might require compatibility with older plugins. However, BungeeCord is generally considered outdated and is not recommended for new setups.
Step-by-step Process for Setting Up a Proxy Network (Using Velocity)
This guide will focus on setting up a proxy network using Velocity, the recommended modern proxy software. Following these steps carefully will ensure a secure and efficient setup.
- 1. Prepare Environment: Begin by dedicating a separate server instance specifically for your proxy. This isolation is crucial for both performance and security. Ensure this proxy server uses the standard Minecraft port, 25565, as its primary connection point.
- 2. Install Proxy Software: Download the latest version of your chosen proxy software, such as Velocity, and install it on the dedicated proxy server. This typically involves placing the JAR file in its own directory.
- 3. Initialize Proxy: Run the proxy’s JAR file once. This initial execution will automatically generate the necessary configuration files, such as `velocity.toml` for Velocity, which you will need to edit in the next step.
- 4. Configure Proxy: Open and edit the generated configuration file (e.g., `velocity.toml`). Within this file, you will need to define your backend servers. This involves mapping their internal IP addresses and ports so the proxy knows where to send players. Crucially, set a default fallback server, often a lobby or hub, where players will initially connect upon joining your network.
- 5. Configure Backend Servers: This is a critical phase requiring careful attention to each of your backend game servers.
- First, stop all your backend game servers before making any configuration changes.
- In each backend server’s `server.properties` file, set `online-mode` to `false`. This is vital because the proxy will handle player authentication, preventing direct, unauthenticated connections to your game servers.
- Enable proxy forwarding in each backend server’s configuration. For Paper servers, this is typically found in `paper-global.yml` and is referred to as Velocity forwarding. During this step, you must also set a unique forwarding secret for each backend server.
- Finally, use a firewall to block public access to your backend server ports. This ensures that players can only connect through your proxy, significantly enhancing security.
- 6. Enable Online Mode on Proxy: Return to your proxy’s configuration file and ensure that `online-mode` is set to `true`. The proxy is responsible for authenticating players with Mojang’s servers, verifying their legitimate Minecraft accounts.
- 7. Match Forwarding Secrets: This step is non-negotiable for a functional network. Verify that the forwarding secret you configured in your proxy’s configuration file matches exactly with the unique forwarding secrets set in each of your backend server configurations. Any mismatch will prevent proper communication.
- 8. Start and Test: First, start your proxy server. Once it’s fully operational, proceed to start your backend servers. Finally, connect to the proxy’s IP address using your Minecraft client. Test thoroughly by attempting to switch between different backend servers to ensure seamless transitions and proper functionality.
Important Tips for a Robust Proxy Network
Adhering to these best practices will help you build a stable, secure, and high-performing Minecraft proxy network.
- Isolation: Always run your proxy server on a separate machine or instance from your backend game servers. This separation maximizes performance by allocating dedicated resources to the proxy and significantly enhances security by creating a distinct layer between players and your game servers.
- Security Configuration: Meticulously configure `online-mode` (true on the proxy, false on backend servers) and implement strict firewall rules. This setup is paramount for protecting your backend servers from direct connections and potential exploits.
- Modern Software: For any new proxy network setup, opt for Velocity. Its performance benefits, continuous updates, and active development community make it the most reliable choice for a modern Minecraft server network.
- Forwarding Mode: In Velocity, set `player-info-forwarding-mode` to `modern`. This ensures that player UUIDs and IP addresses are properly synced and forwarded to backend servers, which is crucial for plugin functionality and player management.
- Minimum Servers: To establish a functional proxy network, you will need at least three servers: one dedicated to the proxy itself, and at least two backend game servers (e.g., a hub/lobby server and a specific gamemode server).
- Plugins: Install proxy-compatible plugins directly on the proxy server. These plugins can provide network-wide features such as global permissions management (e.g., LuckPerms), centralized chat, and additional anti-DDoS measures that protect the entire network.
Common Mistakes to Avoid
Understanding and preventing these common errors will save you significant troubleshooting time and potential security vulnerabilities.
- Co-locating Proxy and Backend Servers: Running the proxy on the same port or server instance as a game server is a critical mistake. It compromises both security and performance, defeating the purpose of a proxy.
- Leaving Backend Servers `online-mode` Enabled: If `online-mode` is left as `true` on your backend servers, they become vulnerable to direct connections, bypassing the proxy’s authentication and security measures. Always set it to `false`.
- Exposing Backend Ports: Failing to block public access to your backend server ports using a firewall is a major security flaw. This allows players (and attackers) to connect directly to your game servers, circumventing the proxy’s protection.
- Mismatched Forwarding Secrets: The forwarding secret configured in your proxy and backend servers must match exactly. Incorrectly configured or mismatched secrets will prevent the proxy from properly communicating with and authenticating players to your backend servers, leading to connection errors.
- Using Outdated Proxy Software: Relying on older proxies like BungeeCord can lead to performance issues, a lack of modern features, and increased security vulnerabilities due to less active development and support.
- Unstable Proxy Server: An overloaded or improperly resourced proxy server can become unstable, causing frequent “lost connection” errors for players and disrupting their experience across the entire network.
- Incorrect Proxy Settings: Simple typographical errors in IP addresses, ports, or other configuration parameters within the proxy’s settings can prevent servers from connecting or players from joining. Double-check all configurations.
- Firewall Interference: Local firewalls on your server machines or even ISP-level firewalls can block necessary connections between the proxy and your backend servers. Ensure all required ports are open for internal communication within your network.