Configuration
Table of Contents
Introduction
This document provides a comprehensive reference for all configuration options available in NexAuth. Use this as a reference when setting up or customizing your NexAuth installation.
Configuration Types
NexAuth uses HOCON (Human-Optimized Config Object Notation) format for configuration files. HOCON is:
Human-readable
Supports comments
Allows comments on same line
Supports includes and substitutions
Key Features
Type-safe: Values are validated against expected types
Default values: Sensible defaults for all options
Validation: Configuration is validated on load
Reloadable: Can be reloaded without restart (
/nexauth reload)
Configuration File Location
The configuration file location depends on your setup:
Velocity Proxy
BungeeCord/Waterfall Proxy
Paper Backend Server
Custom Location
You can specify a custom location using system property:
Configuration Format
Basic Syntax
String Values
Arrays and Lists
Includes
Substitutions
Complete Configuration Reference
Here's the complete structure of the NexAuth configuration file:
Database Configuration
MySQL
Pool Settings Explained:
maximumPoolSize: Maximum number of connections in poolminimumIdle: Minimum number of idle connectionsconnectionTimeout: Timeout when getting connection (ms)idleTimeout: Close connections after idle time (ms)maxLifetime: Maximum connection lifetime (ms)leakDetectionThreshold: Detect connection leaks (ms)
PostgreSQL
SQLite
SQLite Recommendations:
Best for small to medium servers (< 1000 users)
WAL mode improves concurrency
Regular backups (just copy the .db file)
Authentication Configuration
Security Recommendations:
Set
min-login-attemptsto 5 or lowerUse
temp-ban-durationof at least 5 minutesSet
minimum-password-lengthto at least 8Use
require-password-confirmationto prevent typos
Server Configuration
Setup Instructions:
Create Limbo Server:
Install NexLimbo
Or create a minimal server with just NexAuth
Name it "limbo" (or update config to match)
Create Lobby Server:
Create your main game server
Name it "lobby" (or update config to match)
Players will be sent here after authentication
Update Server Names:
If your servers have different names, update
limboandlobbyarraysExample:
limbo = ["auth-server"]
Crypto Configuration
Choosing an Algorithm
Argon2ID
⭐⭐⭐⭐⭐
Medium
RECOMMENDED - Best for new installations
BCrypt2A
⭐⭐⭐⭐
Slow
Good alternative to Argon2ID
SHA-256
⭐
Fast
NOT RECOMMENDED - Only for migration
Argon2ID Tuning
Memory Usage: Argon2ID will use approximately memory KB per hash. With default settings (64 MB), NexAuth can use 64 MB per concurrent authentication.
2FA Configuration
Options Explained:
issuer: Name shown in authenticator app (e.g., "MyMinecraftServer")code-length: Usually 6 digitstime-window: Seconds of time drift allowed (30 is standard)recovery-codes-count: How many recovery codes to generate (default: 10)enforce: Require ALL users to use 2FA (dangerous!)
Supported Authenticator Apps:
Google Authenticator
Microsoft Authenticator
Authy
1Password
LastPass Authenticator
Email Configuration
Gmail Setup
Enable 2-Factor Authentication on your Google account
Generate an App Password:
Go to Google Account settings
Security > 2-Step Verification
App passwords > Generate
Copy the generated password
Use the app password in
passwordfield (NOT your regular password)
Other SMTP Providers
Outlook/Hotmail:
Yahoo:
Custom SMTP Server:
Logging Configuration
Log Levels:
OFF: Disable loggingERROR: Only errorsWARN: Warnings and errorsINFO: General information, warnings, and errorsDEBUG: Detailed debug informationTRACE: Extremely detailed (usually not needed)
Debug Mode: Enable for troubleshooting. Remember to disable in production!
Advanced Configuration
MultiProxy Setup
Requirements:
Same shared secret on all proxies
Unique
proxy-idfor each proxyNexAuth installed on all proxies
BungeeGuard Integration
Session Management
Performance Tuning
Environment Variables
You can use environment variables in your configuration:
Setting Environment Variables:
Linux/macOS:
Windows:
Systemd:
Docker:
Configuration Migration
From LibreLogin
NexAuth automatically migrates LibreLogin configuration on first startup.
Migration Process:
NexAuth detects existing LibreLogin config
Migrates configuration values
Logs migration status
Creates new config with migrated values
Manual Migration
If automatic migration fails, manually copy settings:
Config Versioning
NexAuth tracks configuration versions:
When upgrading NexAuth:
Old config is backed up
New default config is created
Your settings are migrated if possible
Validation Rules
NexAuth validates configuration on load:
Database Validation
Validation Checks:
Type must be a valid provider
Host must not be empty
Port must be valid (1-65535)
Database name must not be empty
Username must not be empty
Authentication Validation
Validation Checks:
Login attempts: 1-20
Timeouts: > 0 milliseconds
Password length: 4-128 characters
Max length >= Min length
Server Validation
Validation Checks:
Limbo list must not be empty
Lobby root must not be empty
Server names must be valid
Crypto Validation
Validation Checks:
Provider must be registered
Iterations: 1-10
Memory: 1024-1048576 KB
Parallelism: 1-4
Troubleshooting
Common Configuration Errors
Error: "Database type doesn't exist"
Cause: Invalid database type in database.type
Solution:
Error: "Invalid port number"
Cause: Port outside valid range
Solution:
Error: "Memory must be between 1024 and 1048576"
Cause: Argon2ID memory setting invalid
Solution:
Error: "Lobby server is also a limbo server"
Cause: Server listed in both limbo and lobby
Solution:
Checking Configuration
Verify Config Syntax
Run NexAuth and check logs for validation errors:
Test Database Connection
Validate Configuration
Use /nexauth reload to reload and validate config:
Debugging Configuration
Enable Debug Logging
This will show:
Configuration loading process
Database connection attempts
Validation errors
Each config value being applied
Check Loaded Configuration
Logs show config values:
Resetting Configuration
To reset to defaults:
Stop your server
Delete
config.confStart server (creates new default config)
Edit with your settings
Using Includes
Split large config into multiple files:
config.conf:
database.conf (external file):
Then set environment variables:
Best Practices
1. Use Environment Variables for Secrets
2. Keep Config Version Controlled
3. Document Custom Settings
4. Use Includes for Modular Config
5. Validate Before Production
Test config with debug logging
Check all required fields
Verify database connection
Test authentication flow
Disable debug logging in production
6. Backup Before Changes
Quick Reference
Essential Settings
Recommended Settings
Performance Settings
Security Settings
Support
Getting Help
Configuration issues: Check User Guide - Troubleshooting
Community support: Discord
Bug reports: GitHub Issues
Questions: GitHub Discussions
Providing Configuration Help
When asking for configuration help, include:
Full configuration (hide sensitive data)
Server platform: Velocity/Bungee/Paper
Database type: MySQL/PostgreSQL/SQLite
Full error logs
What you're trying to achieve
Version: 0.0.1-beta3 Last Updated: 2025-10-30
For more help, visit: https://github.com/xreatlabs/NexAuth
Last updated
