mirror of
https://github.com/WiIIiam278/HuskSync.git
synced 2025-12-19 14:59:21 +00:00
* Started impl for mongo * added docs * refactor of the mongo code, made mongodb artifacts download at run time, tested and working * complete all change requests * remove mongo and bson from relocations as they arnt needed * changed the config * updated docs * not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null * added postgres support (closes https://github.com/WiIIiam278/HuskSync/issues/212) * add support for mongodb atlas, added atlas and postrgres to docs, update the config example in docs, also updates mongodb driver bc apparently i was special and very very out of data * Rework how mongo connections are handled, **breaks config for mongo only**, allows for MongoDB Atlas, normal MongoDb AND MongoDB replica sets via the parameters in advanced mongo settings, added try and catch on all mongo operations so that it actually throws instead of a cutsie little warning * small doc change * whoops forgot to instantiate MongoCollectionHelper, and added missing step from docs for atlas users * why thats a tad embarrassing (grammar mistake) * add cluster id to `/husksync status`, shows "MongoDB Atlas" in status if using mongodb atlas --------- Co-authored-by: William <will27528@gmail.com>
3.1 KiB
3.1 KiB
This will walk you through installing HuskSync on your network of Spigot servers.
Requirements
Note: If the plugin fails to load, please check that you are not running an incompatible version combination
- A MySQL Database (v8.0+) (MariaDB, PostrgreSQL or MongoDB are also supported)
- A Redis Database (v5.0+) — see FAQs for more details.
- Any number of Spigot servers, connected by a BungeeCord or Velocity-based proxy (Minecraft v1.17.1+, running Java 17+)
Setup Instructions
1. Install the jar
- Place the plugin jar file in the
/plugins/directory of each Spigot server. - You do not need to install HuskSync as a proxy plugin.
2. Restart servers
- Start, then stop every server to let HuskSync generate the config file.
- HuskSync will throw an error in the console and disable itself as it is unable to connect to the database. You haven't set the credentials yet, so this is expected.
- Advanced users: If you'd prefer, you can just create one config.yml file and create symbolic links in each
/plugins/HuskSync/folder to it to make updating it easier.
3. Enter Mysql & Redis database credentials
- Navigate to the HuskSync config file on each server (
~/plugins/HuskSync/config.yml) - Under
credentialsin thedatabasesection, enter the credentials of your (MySQL/MariaDB/MongoDB/PostgreSQL) Database. You shouldn't touch theconnection_poolproperties. - Under
credentialsin theredissection, enter the credentials of your Redis Database. If your Redis server doesn't have a password, leave the password blank as it is. - Unless you want to have multiple clusters of servers within your network, each with separate user data, you should not change the value of
cluster_id.
For MongoDB Users
- Navigate to the HuskSync config file on each server (
~/plugins/HuskSync/config.yml) - Set
typein thedatabasesection toMONGO - Under
credentialsin thedatabasesection, enter the credentials of your MongoDB Database. You shouldn't touch theconnection_poolproperties.
MongoDB Atlas
- Navigate to the HuskSync config file on each server (
~/plugins/HuskSync/config.yml) - Set
using_atlasin themongo_settingssection totrue. - Remove
&authSource=HuskSyncfromparametersin themongo_settings.
(The port setting in credentials is disregarded when using Atlas.)
4. Set server names in server.yml files
- Navigate to the HuskSync server name file on each server (
~/plugins/HuskSync/server.yml) - Set the
name:of the server in this file to the ID of this server as defined in the config of your proxy (e.g., if this is the "hub" server you access with/server hub, put'hub'here)
5. Start every server again
- Provided your MySQL and Redis credentials were correct, synchronization should begin as soon as you start your servers again.
- If you need to import data from HuskSync v1.x or MySQLPlayerDataBridge, please see the guides below: