Configuration
Database Selection
EchoLog supports both MySQL/MariaDB and SQLite:
- SQLite (default for quick start)
- MySQL/MariaDB
Environment Variables
Database Configuration
DB_TYPE: Database type -mysql(default) orsqlite
MySQL/MariaDB options:
- MYSQL_HOST: MySQL/MariaDB host (default: localhost)
- MYSQL_USER: Database user (default: root)
- MYSQL_PASSWORD: Database password (default: empty)
- MYSQL_DATABASE: Database name (default: echolog)
SQLite options:
- SQLITE_DB: Path to SQLite database file (default: echolog.db)
Application Configuration
SECRET_KEY: Flask secret key for sessions (REQUIRED in production!)TZ: Timezone for date handling (default: UTC)LOGIN_ENABLED: Enable login protection (default: false)LOGIN_USERNAME: Username for authentication (default: admin)LOGIN_PASSWORD: Password for authentication (default: admin)
Database Setup
MySQL/MariaDB
The application automatically initializes the database schema on first run. Ensure the database and user exist with appropriate permissions:
CREATE DATABASE echolog;
CREATE USER 'echolog'@'%' IDENTIFIED BY 'your_password';
GRANT ALL PRIVILEGES ON echolog.* TO 'echolog'@'%';
FLUSH PRIVILEGES;
SQLite
SQLite requires no setup - the database file is created automatically on first run. Ensure the directory where the database file is stored is writable by the application.