SkinsRestorer LogoSkinsRestorer

Configure shared storage

Choose file storage, MySQL, or PostgreSQL and connect a shared backend API.

SkinsRestorer 15.12.6All platformsReviewed

File storage is the default. Ordinary proxy-managed skins work without a shared database. A backend API integration in proxy mode needs shared MySQL or PostgreSQL storage.

Before you switch

Back up the existing data and configuration. Create a database and a dedicated database user. Allow access from each server that uses it.

Changing database.type selects another storage backend. It does not copy existing file records into SQL. Plan and check any data transfer separately before you replace production storage.

MySQL example

Stop each affected instance, then edit its existing database section:

config.yml (SkinsRestorer excerpt)
database:
  type: MYSQL
  host: "127.0.0.1"
  port: 3306
  database: "skinsrestorer"
  username: "skinsrestorer"
  password: "REPLACE_WITH_DATABASE_PASSWORD"
  maxPoolSize: 10
  tablePrefix: "sr_"
  connectionOptions: "sslMode=trust&serverTimezone=UTC"

PostgreSQL example

config.yml (SkinsRestorer excerpt)
database:
  type: POSTGRESQL
  host: "127.0.0.1"
  port: 5432
  database: "skinsrestorer"
  username: "skinsrestorer"
  password: "REPLACE_WITH_DATABASE_PASSWORD"
  maxPoolSize: 10
  tablePrefix: "sr_"
  connectionOptions: ""

Choose connection options for your driver and host's TLS requirements. Do not carry MySQL options into PostgreSQL without checking their meaning.

Share storage on a network

Use the same type, database, and table prefix on the proxy and API-enabled backends. Each instance must have database access.

Keep server.proxyMode.api: true on backends that call the API. For backends without API consumers, you can disable it and keep normal proxy skin forwarding.

Start the instances and inspect their database initialization logs. Change a test player's skin through the proxy, then resolve it through the backend integration.

If the connection fails

Check host resolution, port access, credentials, permissions to create tables, and driver options. /sr status does not prove that the database works.

The old database.enabled key belongs to earlier configuration. This release migrates older configuration, but new examples use database.type.

Read backup and recovery before another storage change.

Did this page help?

Last updated on

On this page