NGINX is optional but recommended for production deployments. It enables TLS (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/lDEVinux/eaglercraft/llms.txt
Use this file to discover all available pages before exploring further.
wss://), real IP forwarding for IP bans and rate limiting, security headers, and can serve the web client on the same domain as your server endpoint.
Installing NGINX
- Debian/Ubuntu
- Other Platforms
Open your terminal and run:To verify the installation, open any web browser and navigate to
localhost. You should see the NGINX welcome page confirming it is running correctly.Basic WebSocket Proxy Configuration
Create a configuration file named after your domain
Use your preferred editor to create a new file. For example:
Paste the proxy configuration
Replace
example.com with your actual domain and app_server_address with the ip:port of your EaglercraftBungee instance (e.g. 127.0.0.1:25565).eaglercraft.example.com
Forwarding Real Client IPs
Forwarding the real client IP to EaglercraftBungee is required for IP bans and rate limiting to work correctly. Without it, all incoming connections appear to originate from127.0.0.1.
Step 1 — Add the header to your NGINX location block, directly below the proxy_pass line:
forward_ip in EaglercraftBungee’s config.yml:
config.yml
Security Headers
Adding the following headers prevents players from using bookmarklets to load a client from a different URL onto your server page (cross-site scripting protection). Place these lines after theproxy_pass directive inside the location block:
These headers prevent players from bookmarklet-loading a different client from another URL onto your server page. The
Content-Security-Policy header explicitly allows WebSocket connections (ws: and wss:) and inline assets while blocking external script sources.location block with all recommended settings looks like this:
eaglercraft.example.com
Serving the Web Client
If you also want to host the Eaglercraft web client on the same domain, you can serve thestable-download/web/ folder using NGINX’s root directive. Keep the client files and the WebSocket endpoint on separate paths to avoid routing conflicts.
For example, you might serve the client at https://eaglercraft.example.com/ using a root directive pointing to /var/www/html (where you’ve uploaded the contents of stable-download/web/), while the WebSocket proxy lives at https://eaglercraft.example.com/server:
eaglercraft.example.com