Database Plugins
Specifies the database plugin to use.Options:
Environment Variable:
sqlite3, mariadbEnvironment Variable:
TSSERVER_DATABASE_PLUGINSQLite Configuration
SQLite is the default database backend and requires minimal configuration. It’s ideal for small to medium-sized deployments.SQLite-Specific Options
Skip database integrity check at startup. Only applicable to SQLite.Environment Variable:
TSSERVER_DATABASE_SKIP_INTEGRITY_CHECKSQLite Example
- Docker Compose
- CLI
- YAML
docker-compose.yml
SQLite stores the database in a single file within the server’s data directory. No additional database server is required.
MariaDB Configuration
MariaDB is recommended for production deployments, high-availability setups, and servers with large user bases.Connection Parameters
The hostname or IP address of your database server.Environment Variable:
TSSERVER_DATABASE_HOSTThe port used to connect to your database server. For MariaDB, use 3306.Range: 1-65535
Environment Variable:
Environment Variable:
TSSERVER_DATABASE_PORTThe name of the database to use.Environment Variable:
TSSERVER_DATABASE_NAMEThe username for database authentication.Environment Variable:
TSSERVER_DATABASE_USERNAMEThe password for database authentication.Environment Variable:
TSSERVER_DATABASE_PASSWORDSocket file to use for database connection (alternative to host/port).Environment Variable:
TSSERVER_DATABASE_SOCKETTimeout in seconds when connecting to the database.Range: 1-432000
Environment Variable:
Environment Variable:
TSSERVER_DATABASE_TIMEOUTNumber of connections to establish to the database.Range: 2-100
Environment Variable:
Environment Variable:
TSSERVER_DATABASE_CONNECTIONSMariaDB Example
- Docker Compose
- CLI
- YAML
docker-compose.yml
Common Database Options
These options apply to both SQLite and MariaDB.SQL Paths
Path to folder containing SQL queries used by the server.Environment Variable:
TSSERVER_DATABASE_SQL_PATHSubdirectory in SQL path to use for database creation scripts.Values:
create_sqlite- For SQLitecreate_mariadb- For MariaDB
TSSERVER_DATABASE_SQL_CREATE_PATHThe
sql-create-path must match your database plugin. Use create_sqlite for SQLite or create_mariadb for MariaDB.Client Data Retention
Number of days to keep client data in the database. Older client records are automatically purged.Environment Variable:
TSSERVER_DATABASE_CLIENT_KEEP_DAYSQuery Logging
Enable logging of all SQL queries. Useful for debugging but can impact performance.Environment Variable:
TSSERVER_DATABASE_LOG_QUERIESDatabase Maintenance
Clear Database
Resets the database completely, deleting all servers, clients, channels, and permissions.
Permission Updates
Do not apply permission changes during server updates.Environment Variable:
TSSERVER_SKIP_PERMISSION_UPDATEBy default, TeamSpeak applies permission updates when upgrading to a new version. Use this flag if you have custom permission configurations that should not be modified.
Database Comparison
- SQLite
- MariaDB
Advantages:
- Zero configuration required
- No separate database server needed
- Fast for small to medium deployments
- Simple backup (single file)
- Small to medium servers (< 100 concurrent users)
- Single-server deployments
- Development and testing
- Simple backup requirements
- Single server only (no clustering)
- Lower concurrent connection performance
- File-based locking
Troubleshooting
Connection Issues
If the server cannot connect to MariaDB:- Verify the database server is running
- Check network connectivity from the TeamSpeak server
- Confirm the database user has proper permissions
- Verify the database name exists
- Check firewall rules allow connections on port 3306
Database Initialization
If the database fails to initialize:- Ensure
sql-create-pathmatches your database plugin - Verify SQL scripts exist in the specified path
- Check database user has CREATE and ALTER permissions
- Review server logs for specific error messages
Next Steps
Server Settings
Configure core server parameters
Ports & Networking
Set up ServerQuery and networking