-
Notifications
You must be signed in to change notification settings - Fork 0
Storage
TownyAlerts does not require a database.
The default backend is:
storage:
type: memorySupported storage types:
- MEMORY
- SQLite
- MariaDB
- MySQL
Storage is used for TownyAlerts history and persistent deduplication. It does not replace or modify Towny's own database/storage.
Configuration:
storage:
type: memoryProperties:
- Default option
- No files created
- No external database
- Fast and simple
- Deduplication lasts only for the current process
After a full server restart, memory-only deduplication state is lost.
Configuration:
storage:
type: sqlite
sqlite:
file: "townyalerts.db"The database is stored inside the TownyAlerts plugin data folder.
Conceptually:
plugins/TownyAlerts/townyalerts.db
TownyAlerts rejects absolute paths and path traversal attempts for SQLite storage.
SQLite is a good choice for a single Minecraft server that wants persistence without running a separate database service.
Example:
storage:
type: mariadb
server-id: "towny-1"
remote:
host: "127.0.0.1"
port: 3306
database: "townyalerts"
username: "townyalerts"
password: ""
password-env: "TOWNYALERTS_DB_PASSWORD"
ssl: false
connection-timeout-ms: 5000Use:
storage:
type: mysqlThe remote database settings use the same configuration structure.
TownyAlerts does not create:
- Database server users
- Databases
- Grants/permissions
Create the database and database user through your hosting panel, Pterodactyl, MariaDB/MySQL administration tools, or another trusted management method.
TownyAlerts can create its own tables inside the configured database when allowed:
storage:
schema:
auto-create-tables: trueRecommended for servers where environment variables can be configured:
storage:
remote:
password: ""
password-env: "TOWNYALERTS_DB_PASSWORD"The environment variable value has priority over the literal password field.
The password is not displayed by TownyAlerts status commands.
storage:
server-id: "default"server-id separates records when multiple Minecraft servers use the same MariaDB/MySQL database.
Example:
storage:
server-id: "towny-production"Use a stable value and do not change it casually after production data has been written.
storage:
history:
enabled: true
retention-days: 0A value of 0 means indefinite retention when supported by the current implementation.
Database operations are asynchronous and isolated from Towny event handling.
A database failure must not:
- Cancel a Towny event
- Prevent Towny taxes/upkeep
- Crash New Day processing
Discord sending and database persistence are also isolated from each other.
Run:
/townyalerts storage test
The command performs a safe connectivity/query test and does not create Towny economy activity.
TownyAlerts — Community Towny alerts for Discord via DiscordSRV. Created by DynaDev.
TownyAlerts Wiki
- Home
- Installation
- Configuration
- Discord Setup
- Alerts and Events
- Commands and Permissions
- Languages
- Storage
- Missed New Day
- Compatibility
- Troubleshooting
- Security and Privacy
- FAQ
TownyAlerts
Created by DynaDev