Storage types

SkinEngine supports three storage backends:

  • sqlite
  • mysql
  • mariadb

Configure the active backend in storage.type.

What SkinEngine stores

The active storage backend is used for:

  • player language selections
  • item-model registry allocations
  • pending-item recovery data

SQLite

SQLite is the default and the baseline supported setup.

storage:
  type: "sqlite"

Use SQLite when:

  • you want the simplest setup (it's already configured on first install)

The local database file lives in:

/plugins/SkinEngine/storage/database/sqlite.db

MySQL / MariaDB

[!WARNING] SkinEngine is currently in beta and this feature might not work as good as SQLite. Use at your own risk.

[!ERROR] MySQL / MariaDB are remote storage types, but this doesn't mean that you should connect two SkinEngine instances to the same database. Storage sharing is not supported and will cause serious issues (and item duplication risks)!

Remote storage is supported through MySQL and MariaDB.

storage:
  type: "mysql"
  remote:
    host: "127.0.0.1"
    port: 3306
    database: "skinengine"
    username: "root"
    password: ""
    table-prefix: "skinengine_"
    ssl: false
    connect-timeout-ms: 5000
    read-timeout-ms: 10000
storage:
  type: "mariadb"
  remote:
    host: "127.0.0.1"
    port: 3306
    database: "skinengine"
    username: "root"
    password: ""
    table-prefix: "skinengine_"
    ssl: false
    connect-timeout-ms: 5000
    read-timeout-ms: 10000

Use remote storage when:

  • you want the plugin state stored outside the local plugin folder

Switching storage types

[!WARNING] We do not recommend switching storage types in production. Do this at your own risk.

SkinEngine does not have an automatic live migration between backends for your own security. The supported workflow is snapshot export/import:

  1. Make sure the server is idle and has 0 online players.
  2. Run /se export <file>.
  3. Stop the server.
  4. Change storage.type and the related storage.remote.* values if needed.
  5. Start the server with the new backend.
  6. Run /se import <file> to preview the snapshot.
  7. Run /se import <file> confirm to apply it.

Important:

  • export/import is blocked while players are online
  • if the target backend is not empty, SkinEngine requires confirm

Related pages: