Skip to content

Storage Backends

InviteMe supports four storage backends. Choose the right one for your server size and setup.

BackendBest ForSetupPerformanceMulti-Server
JSONTesting onlyNoneLowNo
SQLiteSmall/medium serversNoneGoodNo
MySQLProduction serversMediumExcellentYes
PostgreSQLLarge networksMediumExcellentYes

Stores data as plain text files in plugins/InviteMe/.

storage:
type: json

Files created:

  • plugins/InviteMe/invites.json
  • plugins/InviteMe/action_log.json
  • plugins/InviteMe/player_stats.json

Use only for:

  • Local testing and development
  • Reviewing raw data manually
  • Debugging strange behavior

Never use JSON for:

  • Servers with actual players
  • Production environments
  • Any server with > 10 players

Section titled “SQLite (Default — Recommended for Most Servers)”

Stores data in a single local database file. No external software needed.

storage:
type: sqlite

File created: plugins/InviteMe/invites.db

Pros:

  • Zero configuration — works out of the box
  • Single file — easy to back up (cp invites.db invites.db.backup)
  • Reliable — used by thousands of servers

Cons:

  • Cannot be shared between servers (single file)
  • Not suitable for > 500 concurrent players

Recommended for:

  • Single servers up to ~500 players
  • Survival servers, SMP, creative servers
  • Servers without a separate database host

Connects to an external MySQL or MariaDB server.

storage:
type: mysql
remote:
host: localhost # or db.myserver.com
port: 3306
database: inviteme
username: inviteme_user
password: "SecurePass123"
pool-size: 10

Step 1: Create the database

Connect to your MySQL server and run:

CREATE DATABASE inviteme CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'inviteme_user'@'%' IDENTIFIED BY 'SecurePass123';
GRANT ALL PRIVILEGES ON inviteme.* TO 'inviteme_user'@'%';
FLUSH PRIVILEGES;

Step 2: Update config.yml

storage:
type: mysql
remote:
host: your-database-host.com
port: 3306
database: inviteme
username: inviteme_user
password: "SecurePass123"
pool-size: 10

Step 3: Reload InviteMe

/im reload

Step 4: Verify connection

/im debug
Server sizeRecommended pool-size
< 20 players5
20–100 players10 (default)
100–500 players20
500+ players30–50

InviteMe uses the MariaDB JDBC driver, which is fully compatible with:

  • MariaDB 10.x and 11.x
  • MySQL 5.7+
  • MySQL 8.x

Alternative to MySQL with similar performance characteristics.

storage:
type: postgresql
remote:
host: localhost
port: 5432 # default PostgreSQL port
database: inviteme
username: inviteme_user
password: "SecurePass123"
pool-size: 10

Step 1: Create the database

Connect via psql and run:

CREATE DATABASE inviteme;
CREATE USER inviteme_user WITH ENCRYPTED PASSWORD 'SecurePass123';
GRANT ALL PRIVILEGES ON DATABASE inviteme TO inviteme_user;

Step 2: Update config.yml (note the port 5432)

storage:
type: postgresql
remote:
host: your-database-host.com
port: 5432
database: inviteme
username: inviteme_user
password: "SecurePass123"

Step 3: /im reload and verify with /im debug

Both work equally well for InviteMe. Choose based on:

  • What you already have running — don’t add a new database server just for InviteMe
  • Hosting panel — most Minecraft hosts provide MySQL, not PostgreSQL
  • Personal preference — both are excellent choices

InviteMe can migrate all your data automatically with zero downtime.

Example: SQLite → MySQL

  1. Set up your MySQL database (see above)
  2. Update config.yml with MySQL credentials
  3. Run the migration command:
    /im migrate mysql
  4. InviteMe migrates all data and renames the old file:
    • invites.dbinvites.db.migrated

Other migrations:

/im migrate sqlite # Any backend → SQLite
/im migrate mysql # Any backend → MySQL
/im migrate postgresql # Any backend → PostgreSQL
  • Original data is never deleted — only renamed to .migrated
  • If migration fails, nothing changes — your data is safe
  • Migration creates a log entry for auditing
/im debug
# Verify: Total records matches your previous count

Terminal window
cp plugins/InviteMe/invites.db backups/invites_$(date +%Y%m%d).db

Use your database’s native backup tools:

Terminal window
mysqldump -u inviteme_user -p inviteme > inviteme_backup.sql
pg_dump -U inviteme_user inviteme > inviteme_backup.sql

“Connection failed” on MySQL/PostgreSQL

  • ✅ Verify the host is reachable from your server
  • ✅ Check port is open in firewall (3306 for MySQL, 5432 for PostgreSQL)
  • ✅ Confirm username/password are correct
  • ✅ Verify the database exists
  • ✅ Check user has GRANT privileges on the database

“Storage shows JSON but I set SQLite”

  • ✅ Run /im reload after editing config.yml
  • ✅ Check for YAML indentation errors in config.yml

“Migration didn’t transfer all records”

  • ✅ Run /im sync after migration to verify whitelist
  • ✅ Check plugins/InviteMe/invites.db.migrated — data is preserved there
  • ✅ The .migrated file can be re-migrated if needed