Multi-proxy
Share global chat, private messages, the online player list, and the chat toggle across several proxies with Redis.
If your network runs more than one proxy, for example behind a load balancer, players on different proxies cannot see each other's global chat. The multi-proxy bridge links the proxies through Redis. It is off by default. With a single proxy, you can skip this page.
Requirements
- A Redis server (6.x or newer) that every proxy can reach. A standalone server is enough. Passwords and TLS are supported.
- Every proxy points at the same Redis server, the same
database, and the samechannels.prefix. - Every proxy runs the same NexusShout version.
Set up
- On every proxy, in
config.yml:
multi-proxy:
enabled: true
redis:
host: "10.0.0.5"
port: 6379
password: "your-redis-password"
- Restart each proxy, or run
nshoutreload. - Test it: send
/gchat helloas a player on one proxy. A player on another proxy should see it.
The console shows Multi-proxy bridge enabled (proxy-id=...) and connected to Redis when it works.
Settings
All settings are under multi-proxy in config.yml.
| Setting | Default | Notes |
|---|---|---|
enabled | false | |
proxy-id | "" | This proxy's name. Empty: a random ID is created and saved in proxy-id.txt in the plugin folder. Set your own for readable logs, such as proxy-eu-1 |
redis.host | localhost | |
redis.port | 6379 | |
redis.password | "" | Empty when Redis has no password |
redis.database | 0 | |
redis.timeout-ms | 3000 | |
redis.use-ssl | false | true for a TLS connection |
redis.pool-max-total | 8 | Most connections used for sending |
redis.pool-max-idle | 4 | Most idle connections kept open |
channels.prefix | nexusshout | Put in front of every Redis key and channel. Use a different prefix for each separate network on one Redis server |
heartbeat-interval | 10 | Seconds, from 1 to 60. A crashed proxy's players drop off the shared player list after three times this |
Every proxy needs its own proxy-id. A proxy ignores messages that carry its own ID, so two proxies with the same ID cannot see each other. If you copy the plugin folder to a new proxy, delete proxy-id.txt in the copy first.
Features
multi-proxy:
features:
chat: true
private-messages: true
online-roster: true
toggle-state: true
cooldown: false
| Feature | Default | What it shares |
|---|---|---|
chat | On | Global chat, and Discord messages brought in by the bot |
private-messages | On | /nmsg and /nr to players on other proxies. Needs online-roster |
online-roster | On | The list of players on other proxies, used to find private message targets and for tab completion |
toggle-state | On | Global chat mode follows the player to any proxy and is kept when they reconnect |
cooldown | Off | Cooldowns count across proxies, so players cannot skip one by switching proxy. Adds one Redis call per message |
Discord on several proxies
You can use the same discord.yml on every proxy:
- Minecraft to Discord: only the proxy where the message was sent posts it.
- Discord to Minecraft: when several proxies run the bot, one of them takes each Discord message and shares it with the others.
Joins and leaves are posted by the proxy the player is on. The bot status counts players on its own proxy only.
Good to know
- Use the same
formaton every proxy. The proxy where a message is sent builds it with its own format and placeholders, and the other proxies show it as it is. - Each proxy still applies its own
enabled-serverswhen showing messages. - Players who are vanished (PremiumVanish or SayanVanish) when they join or switch servers are left out of the shared player list. Players on other proxies cannot reach them with
/nmsgor/nr, even withnshout.vanish.see. Someone who vanishes mid-session stays on the list until they switch servers. - Keep Redis on a private network with a password. Anyone who can reach it can post chat and private messages as any player.
nshoutreloaddisconnects from Redis and connects again.
When Redis is down
- At startup: a warning is logged, local chat keeps working, and NexusShout keeps trying to connect in the background.
- Later on: messages to other proxies are lost while it is down. NexusShout reconnects on its own, waiting 1 to 30 seconds between tries. The shared player list expires.
- Discord messages that arrive while Redis is down are shown once on each proxy, without duplicates.
- If a proxy crashes, its players drop off the shared player list after three times
heartbeat-intervalseconds.