Go to file
2025-06-22 02:37:03 +05:00
img Break inexistence of this 2025-06-22 02:37:03 +05:00
example.nginx.conf Break inexistence of this 2025-06-22 02:37:03 +05:00
LICENSE Break inexistence of this 2025-06-22 02:37:03 +05:00
mcroute.js Break inexistence of this 2025-06-22 02:37:03 +05:00
README.md Break inexistence of this 2025-06-22 02:37:03 +05:00

Nginx as a minecraft proxy

This njs script will allow you to use nginx as a reverse proxy for Minecraft: Java Edition servers. Multiple servers can share one IP:Port pair in a similar fashion to Virtual Hosting on the web i.e. where connections are routed to depends on the destination hostname sent by the client. If the hostname sent by the client is not known, it will respond like this:

Serverlist

Kicked

Installation

Copy mcroute.js to /etc/nginx (or other directory depending on where your nginx config is), and add the contents of example.nginx.conf to your nginx config. Adjust it to include your server IPs and domains (the domains must point to your nginx).