You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace SQLite with MySQL as the default database for Torrust Tracker Demo deployment as part of the Hetzner migration plan.
📋 Background
This is Phase 1 of the Hetzner Migration Plan. Currently, the tracker uses SQLite as the default database, but for production deployments on Hetzner, we want to use MySQL for better production characteristics, scalability, and operational management.
📝 Tasks
Database Service Setup
Add MySQL service to application/compose.yaml
Configure MySQL 8.0+ with appropriate environment variables
Set up data volume persistence (mysql_data volume already exists)
🎯 Objective
Replace SQLite with MySQL as the default database for Torrust Tracker Demo deployment as part of the Hetzner migration plan.
📋 Background
This is Phase 1 of the Hetzner Migration Plan. Currently, the tracker uses SQLite as the default database, but for production deployments on Hetzner, we want to use MySQL for better production characteristics, scalability, and operational management.
📝 Tasks
Database Service Setup
application/compose.yamlmysql_datavolume already exists)backend_networkfor tracker connectivityTracker Configuration Updates
application/storage/tracker/etc/tracker.toml:[core.database].driverfrom"sqlite3"to"mysql"pathconfigurationEnvironment Configuration
application/.env.productiontemplate:Database Initialization
application/storage/mysql/init/directory structureDocumentation Updates
application/README.md- Update database requirementsapplication/docs/production-setup.md- Add MySQL setup instructions✅ Validation Criteria
Local Testing
make applyFunctional Testing
torrentstable exists and is populatedIntegration Testing
docker compose down && docker compose up)🔧 Implementation Notes
Current State Analysis
/var/lib/torrust/tracker/database/sqlite3.db)driver = "sqlite3"intracker.tomlmysql_datavolume already defined but unused.env.productionMySQL Configuration Requirements
utf8mb4withutf8mb4_unicode_cicollationEnvironment Variables Strategy
Follow existing pattern in
compose.yaml:TORRUST_TRACKER_CONFIG_OVERRIDE_prefix for configuration overridesTORRUST_TRACKER_CONFIG_OVERRIDE_CORE__DATABASE__DRIVER📦 Deliverable
Working local deployment with MySQL backend that:
make applyworkflow🔗 Related
infrastructure/local testing environment💡 Notes