Database & Communication
Setting up database backends and proxy-backend communication.
Database Backends
mineLogin supports four database backends. Choose one based on your deployment needs.
MongoDB (Recommended)
A document-based database. This is the recommended storage backend for production deployments.
database:
data-type: MONGODB
mongo-db-connection-string: "mongodb://localhost:27017"
base: "mineLogin"
| Option | Type | Default | Description |
|---|---|---|---|
mongo-db-connection-string | String | "mongodb://localhost:27017" | Full MongoDB connection URI |
base | String | "mineLogin" | Database name |
Best for: production environments, large communities, scalable deployments.
H2 (Default)
An embedded database that requires no external setup. Data is stored locally on the proxy server.
database:
data-type: H2
Best for: testing and small communities.
MySQL
A relational database for production deployments.
database:
data-type: MYSQL
hostname: "localhost"
base: "mineLogin"
port: 3306
username: "root"
password: "securepass"
ssl-use: false
max-life-time: 1800000
max-pool-size: 20
connection-timeout: 3000
| Option | Type | Default | Description |
|---|---|---|---|
hostname | String | "localhost" | MySQL server address |
base | String | "mineLogin" | Database name (must exist) |
port | Integer | 3306 | MySQL server port |
username | String | "root" | Database user |
password | String | "securepass" | Database password |
ssl-use | Boolean | false | Enable SSL for the database connection |
max-life-time | Integer | 1800000 | HikariCP max connection lifetime in milliseconds |
max-pool-size | Integer | 20 | HikariCP maximum pool size |
connection-timeout | Long | 3000 | Connection timeout in milliseconds |
show-mysql-errors | Boolean | true | Show database errors in the console |
Tip: mineLogin uses HikariCP for connection pooling, ensuring efficient database performance.
Flat (Deprecated)
YAML file-based storage. Not recommended for production use.
database:
data-type: FLAT
Tip: The FLAT storage type is deprecated and will be removed in a future version. Consider migrating to MongoDB, MySQL, or H2.
Proxy-Backend Communication
mineLogin supports three communication backends for synchronizing data between the proxy and backend servers.
Plugin Messaging Channel (Default)
Uses Bukkit/BungeeCord plugin messaging for proxy-to-backend communication. No additional setup required.
communication:
type: PLUGIN_MESSAGING_CHANNEL
Best for: simple setups where no external message broker is available.
Redis (Recommended)
Uses Redis pub/sub for proxy-to-backend communication. Recommended for production deployments.
communication:
type: REDIS
host: "localhost"
port: 6379
password: "securepass"
| Option | Type | Default | Description |
|---|---|---|---|
host | String | "localhost" | Redis server address |
port | Integer | 6379 | Redis server port |
password | String | "password" | Redis password |
Best for: production environments, large networks.
Redis Cloud
- Visit Redis Cloud and create a free account
- Create a new database using the free tier (30MB)
- Select a cloud provider and region close to your server
- Note down the connection details: endpoint, port, and password
communication:
type: REDIS
host: "your-redis-cloud-endpoint.com"
port: 12345
username: "default"
password: "your-redis-cloud-password"
Self-Hosted Redis with Docker
Create a docker-compose.yml file:
version: '3'
services:
redis:
image: redis:latest
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes --requirepass your_strong_password
volumes:
redis_data:
Start Redis:
docker-compose up -d
communication:
type: REDIS
host: "localhost"
port: 6379
username: null
password: "your_strong_password"
Tip: If your proxy runs inside Docker (e.g. Pterodactyl), use the Docker host IP (
172.18.0.1) instead oflocalhost.
Redis Security
- Always use a strong password for Redis
- Restrict network access using firewall rules — do not expose Redis to the internet
- Keep Redis updated with the latest security patches
NATS (Recommended)
An alternative message broker for proxy-to-backend communication. Also recommended for production.
communication:
type: NATS
host: "localhost"
port: 4222
username: "username"
password: "password"
| Option | Type | Default | Description |
|---|---|---|---|
host | String | "localhost" | NATS server address |
port | Integer | 4222 | NATS server port |
username | String | "username" | NATS username |
password | String | "password" | NATS password |
Best for: high-throughput environments, microservice architectures.
Data Migration
mineLogin can move your existing data between storage backends, and it can import accounts from other authentication plugins such as AuthMe or LimboAuth.
See the Migrations page for the full guide.