> **Warning:** Fabric support is currently in beta and is not production ready yet. Customers can get in touch on Discord to request the Fabric build, or you can self-compile.
This will walk you through installing HuskSync on your network of Spigot or Fabric servers.
## Requirements
> **Warning:** Mixing and matching Fabric/Spigot servers is not supported, and all servers must be running the same Minecraft version.
> **Note:** Please also note some specific legacy Paper/Purpur versions are [not compatible](Unsupported-Versions) with HuskSync.
* A MySQL Database (v8.0+)
* **OR** a MariaDB, PostrgreSQL or MongoDB database, which 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+)
* **OR** a network of Fabric servers, connected by a Fabric proxy (Minecraft v1.20.1, running Java 17+)
## Setup Instructions
### 1. Install the jar
- Place the plugin jar file in the `/plugins/` or `/mods/` directory of each Spigot/Fabric server respectively.
- You do not need to install HuskSync as a proxy plugin.
- _Spigot users_: You can additionally install [ProtocolLib ](https://www.spigotmc.org/resources/protocollib.1997/ ) or [PacketEvents ](https://www.spigotmc.org/resources/packetevents-api.80279/ ) for better locked user handling.
- _Fabric users_: Ensure the latest Fabric API mod jar is installed!
### 2. Restart servers
- Start, then stop every server to let HuskSync generate the [[config file]].
v3.0: New modular, more compatible data format, new API, better UX (#160)
* Start work on v3
* More work on task scheduling
* Add comment to notification display slot
* Synchronise branches
* Use new HuskHomes-style task system
* Bump to 2.3
* Remove HuskSyncInitializationException.java
* Optimise database for MariaDB
* Update libraries, move some around
* Tweak command registration
* Remove dummyhusksync
* Fixup core synchronisation logic to use new task system
* Implement new event dispatch subsystem
* Remove last remaining future calls
* Remove `Event#fire()`
* Refactor startup process
* New command subsystem, more initialization improvements, locale fixes
* Update docs, tweak command perms
* Reduce task number during data setting
* add todo
* Start work on data format / serialization refactor
* More work on Bukkit impl
* More serialization work
* Fixes to serialization, data preview system
* Start legacy conversion skeleton
* Handle setting empty inventories
* Start on-the-fly legacy conversion work
* Add advancement conversion
* Rewrite advancement get / apply logic
* Start work on locked map persistence
* More map persistence work
* More work on map serialization
* Move around persistence logic
* Add testing suite
* Fix item synchronisation
* Finalize more reliable locked map persistence
* Remove deprecated method call
* remove sync feature enum
* Fix held item slot syncing
* Make data types modular and API-extensible
* Remove some excessive debugging, minor refactor
* Fixup date formatting, improve menu UIs
* Finish up legacy data converting
* Null safety in item stack serializaiton
* Fix relocation of nbtapi, update dumping docs
* Add v1/MPDB Migrators back in
* Fix pinning/unpinning data not working
* Consumer instead of Function for editing data
* Show file size in DataSnapshotOverview
* Fix getIdentifier always returning empty
* Re-add items and inventory GUI commands
* Improve config file, fixup data restoration
* Add min time between backups (more useful backups!)
* More work on backups
* Fixup backup rotation frequency
* Remove stdout debug print in `#getEventPriority`
* Improve sync complete locale logic, fix synchronization spelling
* Remove `static` on exception
* Use dedicated thread for Redis, properly unsubscribe
* Refactor `player` package -> `user`
* `PlayerDataHolder` -> `UserDataHolder`
* Make `StatisticsMap` public, but `@ApiStatus.Internal`
* Suppress unused warnings on `Data`
* Add option to disable Plan hook
* Decompress legacy data before converting
* Decompress bytes in fromBytes
* Check permission node before serving TAB suggestions
* Actually convert legacy item stack data
* Fix syntax errors
* Minor method refactor in items command
* Fixup case-sensitive parsing in HuskSync command
* Start API work
* More work on API, fix potion effects
* Fix cross-server, config formatting for auto-pinned issue
* Fix confusion with UserData command, update docs images
* Update commands docs
* More docs updating
* Fix sync feature enabled/disabled checking logic
* Fix `#isCustom()`
* Enable persistent_data syncing by default
* docs: update Sync-Features config snippet
* docs: correct typo in Sync Features
* More API work
* bukkit: slightly optimized schedulers
* More API work, various refactorings
* docs: Start new API docs
* bump dependencies
* Add some basic unit tests
* docs: Correct typos
* More docs work, annotate DB methods as `@Blocking`
* Encapsulate `RedisMessage`, minor optimisations
* api: Simplify `#getCurrentData`
* api: Simplify `editCurrentData`, using `ThrowingConsumers` for better error handling
* docs: More Data Snapshot API documenting
* docs: add TOC to Data Snapshot API page
* bukkit: Make data types extend BukkitData
* Move where custom data is stored, finish up Custom Data API docs
* Optimise imports
* Fix `data_manager_advancements_preview_remaining` locale
* Fix advancement and playtime previews
* Fix potion effect deserialization
* Make snapshot_backup_frequency default to 4, more error handling/logging
* docs: Add ToC to Custom Data API
* docs: Minor legacy API tweaks
* Remove some unneeded catch logic
* Suppress a few warnings
* Fix Effect constructor being supplied in wrong order
1 year ago
- 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.
### 3. Enter Mysql & Redis database credentials
- Navigate to the new config file on each server (`~/plugins/HuskSync/config.yml` on Spigot, `~/config/husksync/config.yml` on Fabric)
feat: PostgreSQL, Mongo Atlas & Replica Support (#255)
* 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>
8 months ago
- Under `credentials` in the `database` section, enter the credentials of your (MySQL/MariaDB/MongoDB/PostgreSQL) Database. You shouldn't touch the `connection_pool` properties.
v3.0: New modular, more compatible data format, new API, better UX (#160)
* Start work on v3
* More work on task scheduling
* Add comment to notification display slot
* Synchronise branches
* Use new HuskHomes-style task system
* Bump to 2.3
* Remove HuskSyncInitializationException.java
* Optimise database for MariaDB
* Update libraries, move some around
* Tweak command registration
* Remove dummyhusksync
* Fixup core synchronisation logic to use new task system
* Implement new event dispatch subsystem
* Remove last remaining future calls
* Remove `Event#fire()`
* Refactor startup process
* New command subsystem, more initialization improvements, locale fixes
* Update docs, tweak command perms
* Reduce task number during data setting
* add todo
* Start work on data format / serialization refactor
* More work on Bukkit impl
* More serialization work
* Fixes to serialization, data preview system
* Start legacy conversion skeleton
* Handle setting empty inventories
* Start on-the-fly legacy conversion work
* Add advancement conversion
* Rewrite advancement get / apply logic
* Start work on locked map persistence
* More map persistence work
* More work on map serialization
* Move around persistence logic
* Add testing suite
* Fix item synchronisation
* Finalize more reliable locked map persistence
* Remove deprecated method call
* remove sync feature enum
* Fix held item slot syncing
* Make data types modular and API-extensible
* Remove some excessive debugging, minor refactor
* Fixup date formatting, improve menu UIs
* Finish up legacy data converting
* Null safety in item stack serializaiton
* Fix relocation of nbtapi, update dumping docs
* Add v1/MPDB Migrators back in
* Fix pinning/unpinning data not working
* Consumer instead of Function for editing data
* Show file size in DataSnapshotOverview
* Fix getIdentifier always returning empty
* Re-add items and inventory GUI commands
* Improve config file, fixup data restoration
* Add min time between backups (more useful backups!)
* More work on backups
* Fixup backup rotation frequency
* Remove stdout debug print in `#getEventPriority`
* Improve sync complete locale logic, fix synchronization spelling
* Remove `static` on exception
* Use dedicated thread for Redis, properly unsubscribe
* Refactor `player` package -> `user`
* `PlayerDataHolder` -> `UserDataHolder`
* Make `StatisticsMap` public, but `@ApiStatus.Internal`
* Suppress unused warnings on `Data`
* Add option to disable Plan hook
* Decompress legacy data before converting
* Decompress bytes in fromBytes
* Check permission node before serving TAB suggestions
* Actually convert legacy item stack data
* Fix syntax errors
* Minor method refactor in items command
* Fixup case-sensitive parsing in HuskSync command
* Start API work
* More work on API, fix potion effects
* Fix cross-server, config formatting for auto-pinned issue
* Fix confusion with UserData command, update docs images
* Update commands docs
* More docs updating
* Fix sync feature enabled/disabled checking logic
* Fix `#isCustom()`
* Enable persistent_data syncing by default
* docs: update Sync-Features config snippet
* docs: correct typo in Sync Features
* More API work
* bukkit: slightly optimized schedulers
* More API work, various refactorings
* docs: Start new API docs
* bump dependencies
* Add some basic unit tests
* docs: Correct typos
* More docs work, annotate DB methods as `@Blocking`
* Encapsulate `RedisMessage`, minor optimisations
* api: Simplify `#getCurrentData`
* api: Simplify `editCurrentData`, using `ThrowingConsumers` for better error handling
* docs: More Data Snapshot API documenting
* docs: add TOC to Data Snapshot API page
* bukkit: Make data types extend BukkitData
* Move where custom data is stored, finish up Custom Data API docs
* Optimise imports
* Fix `data_manager_advancements_preview_remaining` locale
* Fix advancement and playtime previews
* Fix potion effect deserialization
* Make snapshot_backup_frequency default to 4, more error handling/logging
* docs: Add ToC to Custom Data API
* docs: Minor legacy API tweaks
* Remove some unneeded catch logic
* Suppress a few warnings
* Fix Effect constructor being supplied in wrong order
1 year ago
- Under `credentials` in the `redis` section, 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` .
< details >
< summary > MongoDB users — additional instructions< / summary >
- Navigate to the HuskSync config file on each server (`~/plugins/HuskSync/config.yml`)
feat: PostgreSQL, Mongo Atlas & Replica Support (#255)
* 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>
8 months ago
- Set `type` in the `database` section to `MONGO`
- Under `credentials` in the `database` section, enter the credentials of your MongoDB Database. You shouldn't touch the `connection_pool` properties.
- Under `parameters` in the `mongo_settings` section, ensure the specified `&authSource=` matches the database you are using (default is `HuskSync` ).
#### Additional setup for MongoDB Atlas
feat: PostgreSQL, Mongo Atlas & Replica Support (#255)
* 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>
8 months ago
- Set `using_atlas` in the `mongo_settings` section to `true` .
- Remove `&authSource=HuskSync` from `parameters` in the `mongo_settings` .
(The `port` setting in `credentials` is disregarded when using Atlas.)
< / details >
< details >
< summary > Pterodactyl self-hosts — Redis setup instructions< / summary >
If you are hosting your Redis server on the same node as your servers, you need to use `172.18.0.1` as your host (or equivalent if you changed your network settings), and bind it in the Redis config `nano /etc/redis/redis.conf` .
You will also need to uncomment the `requirepass` directive and set a password to allow outside connections, or disable `protected-mode` . Once a password is set and Redis is restarted `systemctl restart redis` , you will also need to update the password in your pterodactyl `.env` (`nano /var/www/pterodactyl/.env`) and refresh the cache `cd /var/www/pterodactyl && php artisan config:clear` .
You may also need to allow connections from your firewall depending on your distribution.
< / details >
### 4. Set server names in server.yml files
- Navigate to the server name file on each server (`~/plugins/HuskSync/server.yml` on Spigot, `~/config/husksync/server.yml` on Fabric)
- 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
v3.0: New modular, more compatible data format, new API, better UX (#160)
* Start work on v3
* More work on task scheduling
* Add comment to notification display slot
* Synchronise branches
* Use new HuskHomes-style task system
* Bump to 2.3
* Remove HuskSyncInitializationException.java
* Optimise database for MariaDB
* Update libraries, move some around
* Tweak command registration
* Remove dummyhusksync
* Fixup core synchronisation logic to use new task system
* Implement new event dispatch subsystem
* Remove last remaining future calls
* Remove `Event#fire()`
* Refactor startup process
* New command subsystem, more initialization improvements, locale fixes
* Update docs, tweak command perms
* Reduce task number during data setting
* add todo
* Start work on data format / serialization refactor
* More work on Bukkit impl
* More serialization work
* Fixes to serialization, data preview system
* Start legacy conversion skeleton
* Handle setting empty inventories
* Start on-the-fly legacy conversion work
* Add advancement conversion
* Rewrite advancement get / apply logic
* Start work on locked map persistence
* More map persistence work
* More work on map serialization
* Move around persistence logic
* Add testing suite
* Fix item synchronisation
* Finalize more reliable locked map persistence
* Remove deprecated method call
* remove sync feature enum
* Fix held item slot syncing
* Make data types modular and API-extensible
* Remove some excessive debugging, minor refactor
* Fixup date formatting, improve menu UIs
* Finish up legacy data converting
* Null safety in item stack serializaiton
* Fix relocation of nbtapi, update dumping docs
* Add v1/MPDB Migrators back in
* Fix pinning/unpinning data not working
* Consumer instead of Function for editing data
* Show file size in DataSnapshotOverview
* Fix getIdentifier always returning empty
* Re-add items and inventory GUI commands
* Improve config file, fixup data restoration
* Add min time between backups (more useful backups!)
* More work on backups
* Fixup backup rotation frequency
* Remove stdout debug print in `#getEventPriority`
* Improve sync complete locale logic, fix synchronization spelling
* Remove `static` on exception
* Use dedicated thread for Redis, properly unsubscribe
* Refactor `player` package -> `user`
* `PlayerDataHolder` -> `UserDataHolder`
* Make `StatisticsMap` public, but `@ApiStatus.Internal`
* Suppress unused warnings on `Data`
* Add option to disable Plan hook
* Decompress legacy data before converting
* Decompress bytes in fromBytes
* Check permission node before serving TAB suggestions
* Actually convert legacy item stack data
* Fix syntax errors
* Minor method refactor in items command
* Fixup case-sensitive parsing in HuskSync command
* Start API work
* More work on API, fix potion effects
* Fix cross-server, config formatting for auto-pinned issue
* Fix confusion with UserData command, update docs images
* Update commands docs
* More docs updating
* Fix sync feature enabled/disabled checking logic
* Fix `#isCustom()`
* Enable persistent_data syncing by default
* docs: update Sync-Features config snippet
* docs: correct typo in Sync Features
* More API work
* bukkit: slightly optimized schedulers
* More API work, various refactorings
* docs: Start new API docs
* bump dependencies
* Add some basic unit tests
* docs: Correct typos
* More docs work, annotate DB methods as `@Blocking`
* Encapsulate `RedisMessage`, minor optimisations
* api: Simplify `#getCurrentData`
* api: Simplify `editCurrentData`, using `ThrowingConsumers` for better error handling
* docs: More Data Snapshot API documenting
* docs: add TOC to Data Snapshot API page
* bukkit: Make data types extend BukkitData
* Move where custom data is stored, finish up Custom Data API docs
* Optimise imports
* Fix `data_manager_advancements_preview_remaining` locale
* Fix advancement and playtime previews
* Fix potion effect deserialization
* Make snapshot_backup_frequency default to 4, more error handling/logging
* docs: Add ToC to Custom Data API
* docs: Minor legacy API tweaks
* Remove some unneeded catch logic
* Suppress a few warnings
* Fix Effect constructor being supplied in wrong order
1 year ago
- 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:
- [[Legacy Migration]]
- [[MPDB Migration]]