Skip to content

Redis Cross Server Sync

TheCommandCraft edited this page Apr 6, 2026 · 3 revisions

Redis Cross-Server Sync

Redis enables real-time vanish state synchronization across multiple servers on the same network.

When To Use This

Use Redis if you have multiple Paper/Spigot servers (e.g. a lobby + survival + creative) and want a player's vanish state to be reflected across all of them simultaneously.

Setup

1. Install Redis

Install Redis on your server or use a managed Redis service. Default port is 6379.

2. Configure Vanish++

📁 plugins/Vanishpp/config.yml:

storage:
  redis:
    enabled: true
    host: "localhost"
    port: 6379
    password: ""        # Leave empty if no auth is configured

🔧 In-game: /vconfig storage.redis.enabled true
🔄 Apply: /vreload

Enable Redis on every server in your network that runs Vanish++. All servers must point to the same Redis instance.

3. Storage Backend

Redis works alongside your primary storage (YAML, MYSQL, or POSTGRESQL). Redis handles live sync messages only - persistent data still goes to the primary backend.

How It Works

When a player vanishes or unvanishes on any server:

  1. Vanish++ publishes a sync message to a Redis channel
  2. All other servers subscribed to that channel receive the message
  3. They update their local vanish state for that player

Idempotency

Duplicate sync messages (caused by network flakiness or message replays) are ignored - the same state change will not be applied twice.

Shutdown Safety

The Redis subscriber thread is gracefully shut down on plugin reload and server stop, with a timeout and proper resource cleanup to prevent connection leaks.

Clone this wiki locally