Skip to Content
PhantomBans is a premium plugin. Get it from the store or join the Discord.
ConfigurationStorage & Data

Storage & Data

PhantomBans saves every punishment, note, report, and appeal to a database. You choose which one.

Pick a backend

Set database.type in config.yml to one of sqlite, mysql, or mariadb.

SQLite stores everything in a single file at plugins/PhantomBans/data.db. It needs no setup and is a fine choice for a single server.

database: type: sqlite

The network settings (host, port, and so on) are ignored when using SQLite.

Connection settings

KeyWhat it controls
hostThe database server address.
portThe database server port.
nameThe database (schema) name.
usernameThe login user.
passwordThe login password. Leave "" for none.
pool-sizeHow many connections to keep open. Higher means more concurrency and more memory.
connection-timeoutHow long to wait (ms) for a free connection before failing.

Performance and caching

To cut database hits, PhantomBans can cache recent lookups in memory. The defaults suit most servers.

performance: cache-punishments: true cache-duration: 300 # seconds, minimum 5 async-lookup-timeout: 5000 # ms, minimum 1000

Lookups run off the main thread, so checking a player’s history does not lag the server.

Exporting data

You can export punishment data with:

/phantombans export

Moving from SQLite to MySQL later is possible, but plan it during a quiet time and back up your data first. Ask in the Discord  if you want a hand.

Always back up your database before big changes, server moves, or major updates.

Last updated on