Multi Server Setup
Complete guide for configuring AnnouncementGUI across multiple servers in a network.
📋 Overview
AnnouncementGUI supports multi-server networks with real-time synchronization using MySQL. Create announcements on one server and they automatically sync to all others.
🎯 Key Concepts
Server IDs
Each server in your network has a unique identifier:
localServerId: "lobby" # This server's IDTarget Selection
Announcements can target:
Specific Server: e.g., "lobby", "survival", "creative"
ALL Servers: Broadcasts network-wide
Synchronization
With MySQL storage:
Create on one server → Appears on all
Edit on any server → Updates everywhere
Delete on any server → Removed from all
Toggle on any server → Status syncs everywhere
🏗️ Network Architecture
Example Network
Components:
MySQL Database: Central storage for all announcements
Lobby Server: localServerId = "lobby"
Survival Server: localServerId = "survival"
Creative Server: localServerId = "creative"
📦 Prerequisites
Required
2+ Minecraft Servers: Paper 1.21+ or Folia
MySQL Server: 5.7+ or MariaDB 10.2+
Network Connectivity: All servers can reach MySQL
AnnouncementGUI: Installed on all servers
Recommended
Dedicated MySQL Server: Better performance
Low Latency: Fast network between servers and MySQL
Backup System: Regular MySQL backups
🚀 Setup Process
Install MySQL (Step 1)
Option A: Self-Hosted MySQL
Ubuntu/Debian:
CentOS/RHEL:
Windows: Download and install from MySQL Downloads
Configure Each Server (Step 5)
Edit plugins/AnnouncementGUI/config.yml on each server.
Lobby Server Configuration:
Survival Server Configuration:
Other Servers:
Same
serverslist on all serversSame MySQL configuration on all servers
Different
localServerIdfor each serverAdjust
enableAllServersAnnouncementsper server needs
Test Synchronization (Step 7)
Connect to Lobby Server
Run
/announceguiCreate a test announcement:
Name: "Test Sync"
Message: "Testing multi-server sync"
Interval: 300
Server: "ALL"
Save
Wait 10-15 seconds (polling interval)
Connect to Survival Server
Run
/announceguiClick "Edit" - The "Test Sync" announcement should appear!
Edit on Survival - Change message
Check on Lobby - Changes should sync within 10-15 seconds
⚙️ Configuration Options
Polling Interval
Controls how often servers check for changes:
Recommendations:
2-5 servers
5-10 seconds
Fast sync, low overhead
5-10 servers
10-15 seconds
Balanced
10-20 servers
15-30 seconds
Reduce MySQL load
20+ servers
30-60 seconds
Minimize database queries
Trade-offs:
Lower values: Faster sync, more database queries
Higher values: Slower sync, fewer database queries
Enable/Disable ALL Announcements
Control whether a server runs network-wide (ALL) announcements:
Use Cases:
Enable on Hub/Lobby:
Disable on Minigame Servers:
MySQL Connection Parameters
Customize MySQL connection:
Common Parameters:
useSSL
Enable/disable SSL
useSSL=true
serverTimezone
Set timezone
serverTimezone=UTC
maxPoolSize
Connection pool size
maxPoolSize=10
autoReconnect
Auto-reconnect
autoReconnect=true
characterEncoding
Character encoding
characterEncoding=utf8
Production Example:
🎯 Server Targeting Strategies
Specific Server Announcements
Goal: Different announcements per server.
Configuration:
Each server has unique
localServerIdCreate announcements targeting specific servers
Example:
Result:
Lobby only shows "Lobby Welcome"
Survival only shows "Survival Rules"
Creative only shows "Creative Tips"
Network-Wide Announcements
Goal: Same announcements everywhere.
Configuration:
All servers have
enableAllServersAnnouncements: trueCreate announcements targeting "ALL"
Example:
Result:
All servers show the same message
Hybrid Approach
Goal: Mix of specific and network-wide.
Configuration:
All servers have
enableAllServersAnnouncements: trueMix of specific and ALL targets
Example:
Result:
All servers show "Vote Reminder"
Survival shows "Vote Reminder" + "Survival Events"
Creative shows "Vote Reminder" + "Creative Contests"
Hub-Only Network Announcements
Goal: Network announcements only in hub.
Configuration:
Hub:
enableAllServersAnnouncements: trueGame servers:
enableAllServersAnnouncements: false
Example:
Result:
Hub shows ALL + lobby-specific announcements
Game servers only show game-specific announcements
🔧 Advanced Configurations
Multiple Database Setups
Use Case: Separate databases for different server groups.
Setup:
Configuration:
Survival Servers:
Creative Servers:
Geographic Distribution
Use Case: Servers in different regions.
Considerations:
Latency: Higher ping to MySQL
Polling Interval: Increase if high latency
Replication: Consider MySQL master-slave replication
Example Setup:
High Availability
Use Case: Ensure uptime even if MySQL fails.
Strategy:
MySQL Replication: Master-slave setup
Failover: Automatic failover to replica
Load Balancing: Distribute queries
Tools:
MySQL Master-Slave Replication
ProxySQL
HAProxy
Kubernetes with MySQL Operator
📊 Monitoring and Maintenance
Monitoring Checklist
Maintenance Tasks
Weekly:
Check MySQL connection logs
Verify announcements syncing
Review server console for errors
Monthly:
Optimize MySQL tables
Review and clean old announcements
Check database size
Update MySQL credentials if needed
Quarterly:
Full MySQL backup
Test disaster recovery
Review polling intervals
Update plugin versions
MySQL Optimization
Optimize Tables:
Check Table Status:
View Active Connections:
🐛 Troubleshooting
Issue: Announcements not syncing
Symptoms:
Create on Server A, doesn't appear on Server B
Diagnosis:
Check
changePollingIntervalSeconds- wait at least that longCheck MySQL connectivity from both servers
Check console logs for errors
Verify same database in configs
Solutions:
Issue: Slow synchronization
Symptoms:
Changes take minutes to sync
Causes:
High polling interval
Network latency
MySQL performance issues
Solutions:
Reduce polling interval:
Check network latency:
Optimize MySQL:
Issue: MySQL connection errors
Symptoms:
"Failed to connect to MySQL" in console
Solutions:
Verify credentials:
Check firewall:
Verify MySQL user permissions:
Check MySQL max connections:
Issue: Duplicate announcements
Symptoms:
Same announcement appears multiple times
Causes:
Duplicate server IDs
Import with duplicate IDs
Solutions:
Verify unique server IDs: Each server must have different
localServerIdClean database:
Issue: Server-specific announcements not working
Symptoms:
Announcement targeting "survival" shows on all servers
Solutions:
Verify target: Check announcement target is correct
Verify localServerId: Check each server's
localServerIdCheck database: Verify stored
targetServerIdin database
📋 Best Practices
Related Documentation:
Configuration Guide - Detailed configuration
Installation Guide - Installation steps
Troubleshooting - Common issues
Features Guide - Feature overview