Database

There are 4 available database providers:

  • PostgreSQL: Recommended for advanced & big servers.

  • MySQL: Recommended for advanced & big servers.

  • SQLite: Recommended for small servers.

  • YAML: Recommended for small servers.

Migrating Data to another provider

  1. Prepare your new provider's details (username, password...) in the config.yml file.

  2. Save the changes and reload the configuration via the command: /hsadmin reload

  3. Migrate the current data to the new provider using the command: /hsadmin migratedata [provider]

  4. Turn off your server, and change the provider to the provider you have migrated to earlier. Remember to save the changes!

  5. Start the server.

  6. You're good to go!

# How would you like to store regions data?
# Available database providers:
# - PostgreSQL: postgresql (Recommended for advanced servers)
# - MySQL: mysql (Recommended for advanced servers)
# - SQLite: sqlite (Recommended for small servers)
# - YAML: yaml
# WARNING 1: If you selected PostgreSQL or MySQL, please create a new database (postgre) or a new chema (mysql) with the name: "homestead_data"
# WARNING 2: PostgreSQL JDBC Driver is bundled within the plugin's dependencies! There is no need to download the driver and load it in the server's libraries.
database:
  provider: "sqlite"

  # PostgreSQL configuration:
  postgresql:
    username: "USERNAME"
    password: "PASSWORD"
    host: "localhost"
    port: 3306

  # MySQL configuration:
  mysql:
    username: "USERNAME"
    password: "PASSWORD"
    host: "localhost"
    port: 3306

  # SQLite configuration:
  # NOTE: The data file will be saved in the server's main directory.
  sqlite: "homestead_data.db"

Last updated